Would you please let me know a reference document or web references for a good E-R diagram displaying Parent Child relationships between the tables (Min. of 8 tables) with MS SQL Server 2008 database?
I am planning to design a big database, so looking forward for your help.
Take a look at Oracle's Datamodeler Tool.
Related
In databases you can define relationships between tables. But what exactly is the use, besides documentation, of making these relationships explicit in a diagram (for example by connecting the keys in SQL server management studio)?
Does it give you any advantage in writing SQL statements? Computation time? Memory usage? Usually you "repeat" the relationship in the join statement. I have the feeling I'm missing something trivial.
Thanks
From the fine manual
You can use Object Explorer to create new database diagrams. Database diagrams graphically show the structure of the database. Using database diagrams you can create and modify tables, columns, relationships, and keys. Additionally, you can modify indexes and constraints.
You asked:
Does it give you any advantage in writing SQL statements?
They can tell you how the datase is structured. That's usually pretty key to understanding it, and reading all the FKs into your head and remembering which table relates to what can be quite the puzzle and even then not actually relate to how the data is used and related in-application
Computation time?
Not quite sure what this means, but the presence or absence of a database diagram won't impact the amount of time your SQL Server spends planning or executing queries
Memory usage?
Not really
Usually you "repeat" the relationship in the join statement
Sometimes; there are ways of joining data without using joins, and presence or absence of FKs or database diagrams have nothing to do with SQLS ability to join data
It might be best to think of DB Diagrams as a visual design aid and tool
Consider there is a huge SQL database that works fine but no constraints made during database conception. I need to make a relation diagram of database tables. Is there any tool I can use to do at least part of it for me?
Is there any way to auto create ERD of any existing CRM applicaton.
I have MS CRM 11 On Premise and want to take a short look on entities and their relationship diagram. Do we need to create it manually by digging one by one entity and their relationship or is there any other way or any tool do it ?
OR This is not a valid question at all ?
Ideas will be appreciated if any.
Thanks in advance.
You should check out this article on MSDN. The section at the bottom titled Generate Entity Diagrams with the Metadata Diagram Tool describes how to use a program from the SDK to generate an ERD.
It's recently fallen upon the shoulders of another developer and I to pull information from a database spanning some 669 tables with no useful documentation or accessible experts/DBAs of the database. We're not even exactly sure what all information is locked away in the tables that we can pull from to create our--effectively--reports.
Is there any tool or method of generating a diagram (or any other way) to visualize the information to speed up the process?
I was thinking about a generic SQL tool, but the specific database technology is Sybase.
I have been using Sybase Powerdesigner for reverse-engineering database schemas some years ago. I used it to generate a database diagram of the tables with foreign keys to show the relation between the tables. It supports other databases than Sybase too.
Suppose I have a big database, about 800 tables. In this database there is a table that serves as a metatable describing all of the fields of the other tables in the database, for documentation purposes. This table is read by a self written tool of the company I work at.
I'm new at the company and I'm rather inexperienced, so please forgive me for asking this...
In SSMS 2008 R2 I want to make an entity relationship diagram, which seems possible, which is great. I also see that it is possible to show a description for each field in the diagram, without clicking on a table/entity first to show the descriptions. Is there any way to automatically insert the relavant data of the previous mentioned "metatable" into the description/note entry of each field of the corresponding table shapes in the diagram? I could do it manually but I thought I better ask here before I do anything stupid (lot of work). I thought about SQL Procedures, but the thing I am trying to do involves the description fields of the diagram editor itsself, so I don't think that is covered with Transact SQL.
BTW, if somebody knows how to set/show the cardinality of the relationships in the diagramm please tell me.
By the way, we (the company) have Visio 2007 too (not that it would solve any of the problems..), but I'd like to use SSMS 2008 R2 first to set foreign keys (which are not there) and then import that into Visio through the reverse engineering option. Seems more logical for me, instead of using Visio in the first step. Of course I'm using a backup of our database.
The diagram description is not a property of the diagram it is a property of the table itself.
See sp_addextendedproperty in SQL Server books online:
http://msdn.microsoft.com/en-us/library/ms180047.aspx
You need to add an extended property with the name 'MS_Description'.
For a useful extended description, see here:
http://www.simple-talk.com/sql/sql-tools/towards-the-self-documenting-sql-server-database/