-1

Please help me letting know how to create a database schema for an existing database in mssql, could this be done through Microsoft SQL Server Management Studio Express?

My Boss has asked me generate a database schema for a database of an existing application.

Dp's
  • 21
  • 2
  • 4

1 Answers1

0

Yes, this can absolutely be done.

In Management Studio, expand the database. You'll see a folder option called "Database Diagrams":

enter image description here

Expand that, and in case there's nothing present yet, you'll be presented with a dialogue asking whether you want to create a new diagram:

enter image description here

Should that not work for some reason, you can right-click the same Database Diagrams folder, and select "New Database Diagram"" from there.

You'll now be asked to add the tables you want to include in the schema. Add whichever tables necessary, and in case of relations defined in the table-schema, those will be added to the schema.

If you do not have the relationships in place, you can create them by dragging and dropping related columns manually from one table to the other.

SchmitzIT
  • 9,227
  • 9
  • 65
  • 92
  • Hi, Thanks, with the above guidance i could create the tables, but the relation between these tables and their columns has not got created. I have no idea about the relationship between these tables and their columns as i have not developed this applications or database. Please help me as how could i figure out the relationship between these tables. Thanks in advance. – Dp's Aug 27 '14 at 09:58
  • If there are existing relations, they would be mapped by the tool. If there are not, you will have to manually define them, by dragging related columns to other related columns. I really have no way to guide you in that, though, as it'd greatly depend on how your database designer set things up. Sometimes it can be easy (user table has a column called `id`, and other tables refer to `user_id`), other architects might not have been so helpful though (HR systems tend to be very dynamic, and might have non-intuitive names). – SchmitzIT Aug 27 '14 at 10:36