Does modeling entity-relationship using SQL Server built-in "Diagrams" have performance benefits on the execution of queries?
As database designing go I have never modeled the relationships of my tables by way of SQL Server diagrams, drawing how two 开发者_如何学编程or more tables are related using their primary and foreign keys. I am using Entity Framework and LINQ and for the most part I write the queries in code and that seems to be fine.
So my question is will it make execution of my queries faster if I do SQL Server diagrams? Does it help the database engine at all?
No.
The SQL Server diagrams are merely graphical representations of your database structure. Using the diagrams instead of using raw T-SQL to create your tables has no impact whatsoever on runtime behavior or performance. In the end, the tables, views, constraints etc. are all the same - whether done via diagrams or via raw T-SQL commands....
Diagrams in Entity Framework are for visual Representation only. you form the Relationship in SQL Server or Entity Framework and apply it Database does the same. EF is a layer of Abstraction in top of ADO.NET. So it is always slower when compared to regular ADO.NET.
精彩评论