David Ly
David Ly

Reputation: 31606

How do you generate a database schema diagram in visual studio (express)?

Right now all I did was use the Dataset designer and dragged tables into it from the Database Explorer. It works (for what I need anyway) but it feels like it's a misuse of Datasets. (Actually I'm not really sure how to use Datasets or what the intended usage is, I was planning on using LINQ2SQL to interact with the DB)

Is this ok? I only need it for the designer view and it's a very simple DB layout (just 4 tables). I'm sure there's other tools out there, but is there anything integrated into VS Express that I should be using instead?

Upvotes: 1

Views: 14114

Answers (2)

lc.
lc.

Reputation: 116528

You say it works, and you want just want to make a diagram, so go with it. You should make sure it doesn't build the generated code file, however, as it could cause bloat in your final product.

If you're not going to use it for code and it provides adequate output for you, what does it matter if it's a "misuse"? I know people who used Excel to design documents because it was easier to line things up that way. I would use Word, and it's clearly not Excel's stated main purpose, but does it mean using Excel was wrong?

Upvotes: 1

Zachary Scott
Zachary Scott

Reputation: 21188

You download MS SQL Express with the SQL Studio Management Studio Express. Only in the Studio Express can you connect to the server, select the database, open the database diagrams and edit diagrams.

Then, you can drag and drop the entire set of Tables in to Linq to SQL. Entity Framework is nice, but I have yet to get it to render my tables well yet. I would stick to Linq to SQL until they release another upgrade to EF (easier for you).

Upvotes: 2

Related Questions