Solved

Relational Database Schemas (RDS)

Posted on 2011-09-02
10
772 Views
Last Modified: 2012-05-12
I want to produce an image like the one below:

One way to have the table’s relational schema is to select Query/Design Query in Editor… from the menu to bring up Query Designer and Add Table interfaces.

After doing this I can get screen-shot of this and I am done.

Q1: Is there a better way of doing this (I am using SQL-Server 2008R). Please list the steps for me to be able to duplicate it.
Q2: Is Relational Database Schemas (RDS) a proper title for this image?

Thank you.
RelationalSchema.png
0
Comment
Question by:Mike Eghtebas
  • 6
  • 3
10 Comments
 
LVL 6

Expert Comment

by:markterry
ID: 36475111
Q1: MS Visio rocks for this, but you can do it in SQL
Q2: Sure, some might just call it a database diagram.
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 36475189
re:> Q1: MS Visio rocks for this, but you can do it in SQL

Could you show me how is it done in 2008R?

0
 
LVL 6

Expert Comment

by:markterry
ID: 36475271
Create a database, Expand database diagrams, select yes to creating one... right click, new database diagram. add your tables. However, this relies on tables being created, with required columns. Visio is much easier, and you can create the tables on the fly, and even script it to create the tables in a database.I would just get a free trial of that if you are just starting out.
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 36475336
> Create a database

I have this already.

> Expand database diagrams

How? give me the steps to do this as requested in the origninal question.

> Visio is much easier

I will not be working with visio.

I have tables ready and wand the proper way of viewing the relational diagram.
0
 
LVL 6

Expert Comment

by:markterry
ID: 36475408
Database Diagrams is a node under the database. If you do not have it, it may not be available in your version of SQL.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 42

Accepted Solution

by:
dqmq earned 500 total points
ID: 36475436
>Expand database diagrams

Not quite that simple.  In object explorer, click on the plus sign next to the database of interest to expand the list sub-objects.  One of them will be database diagrams.  Right click and choose "New Diagram".   Then customize to for the tables and relationships that you want to see in the diagram.  You can have multiple diagrams using subsets of the tables to present different perspectives or to keep a single diagram from getting too busy.

As an aside, you do realize that your design only permits one inventory item on an invoice?
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 36479269
I am not able to test the posted solutions because:

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_27289906.html

I am not able to log-in. I wonder if you have the time to post a comment in this link.

Thanks,

Mike
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 36479503
dqmq,

This was interesting. As you can see below, I am getting a diagram a bit different than what I have submitted above. My diagram connects PKs to FKs but with your solution it shows the links between the tables without identifying what fields are involved in the relationship.

I guess my submission may be called Relationship Schema and what I got from your solution below could be called Entity Relationship Diagram (ERD).

Do you have any comment on this?

Thanks,

Mike
EntityRelationShipDiagram.png
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 36479575
Also, please note the diamond shapes on the original diagram on the top. It seems they are used in entity relationship diagram. Meaning, that one may be an Entity Relationship Diagram and the one here is Relationship Schema Diagram.
0
 
LVL 33

Author Closing Comment

by:Mike Eghtebas
ID: 36479670
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now