
- #Show adventureworkslt database diagrams install
- #Show adventureworkslt database diagrams download
- #Show adventureworkslt database diagrams windows
And if I select it in here it will give me information and if I go in to select the actual relationship. Both of these tables are related into this Sales Order Detail. So, you can see, I have Sales Order Details, Sales Order Header, and Special Offer Products. And again, if I right-click down here, and I say Arrange Tables for me, now the tables are arranged. You can see, also, other tables that are related. Which I want to see, what tables have a relationship into Sales Order Details. And down here it will say Add Related Tables. Now that I'm in the diagram, I'm going to right-click on the table. And now you notice, it will allow me to add any other tables that I want. I want to come down here and let's select Sales Border Detail. So, if we come down here and I select, say, let's move on down and see if we can find something that's a little more interesting.

But the schemas in database diagrams are sorted differently. This is sorted by schema and then by table. If I expand out the tables, now you see here's my schema.

And you see the schema name in parentheses. The way database diagrams are laid out is alphanumeric based on the name of the table, not on the name of the schema. So the window skips this step, but just so that you see, that's what it is. New database diagram, and this pops open. Okay, and it created them and immediately, it goes into this diagram.
#Show adventureworkslt database diagrams install
Well, I just told it that I want to install it. The database does not have one or more of the support objects. Right-click, Install Diagram Support, which is a class of objects. And now we've got SQL and I'm going to say OK here. So we're going to say, let this owner now be the Administrator. And it's just a legacy thing that I tend to do.
#Show adventureworkslt database diagrams windows
I do that for various reasons, experiences I've had in the past when, for some reason, we couldn't get the Windows credentials to work. That is because when I install SQL, I always install SQL in mixed security mode, so that I can login both with my active directory credentials or with just SQL credentials. Normally, these would be like My Company.whatever com.biz etc. It says SQL_TRAIN because I created an active directory domain and I named it, just simply, SQL_TRAIN. So, I'm going to come down here and I'm going to click on SQL_TRAIN\Administrator. And I'm browsing into the logins that are within this database. If we move on down here to Files, you see, the owner is empty down here on this Property page on file. So, how can there be no owner? Well, it's a little bit of an odd thing. And over here in General, look, owner is SQL Administrator. I'll go OK, and I'll go back up to my database and I'll right-click on it and go into Properties. It says, if you go through and read it, that there's no database owner. And if I come over here and select Database Diagram and right-click, you see I have Install Diagram Support, which I'm going to click.
#Show adventureworkslt database diagrams download
And I want to show you something that you'll probably run into if you download AdventureWorks 2014 or the other databases and install it into your instance of SQL Server so that you can follow along. So, I've got Management Studio running, and you see I have Object Explorer. Another thing you can do is to document your database with a database diagram so that the other administrators can use it, or the other developers can use it to understand how the overall database works together. There's a number of different reasons for creating these database diagrams, one of which is, it really helps you to understand an existing database by doing that, by going through and creating the database diagram, so that you can see the various tables and the relationships between those tables.

Okay, let's take a look at creating database diagrams.
