Database Modelling in SQL



Database Modelling


As mention in the beginning of the chapter, you should always start with database modelling before you start implementing the tables in a database system. Below we see a database model in created with ERwin.



Database Modelling, Algae Services, algaestudy, database, SQL, crate table



With this tool we can transfer the database model as tables into different database systems, such as e.g., SQL Server. CA ERwin Data Modeler Community Edition is free with a 25 objects limit. It has support for Oracle, SQL Server, MySQL, ODBC and Sybase.

Below we see the same tables inside the design tool in SQL Server.

Database Modelling, Algae Services, algaestudy, database, SQL, crate table


Database Modelling, Algae Services, algaestudy, database, SQL, crate table

 

Create Tables using the Designer Tools

Even if you can do “everything” using the SQL language, it is sometimes easier to do it in the designer tools in the Management Studio in SQL Server. Instead of creating a script you may as well easily use the designer for creating tables.
Step1: Select “New Table …”:

Designer Tools, Algae Services, algaestudy, database, SQL, crate table


Step2: Next, the table designer pops up where you can add columns, data types, etc


Database Tools, Algae Services, algaestudy, database, SQL, crate table


In this designer we may also specify Column Names, Data Types, etc. Step 3: Save the table by clicking the Save button.
 




No comments:
Write comments

Please do not enter spam links

Meet US

Services

More Services