Day 8. Defining Data

In the previous week, you have seen how to use Transact-SQL to manipulate the data contained within columns. The columns were organized in tables and one or more of these tables are contained in a database. SQL can be divided into two types of SQL: DML (Data Manipulation Language) and DDL (Data Definition Language). All the SQL you have used so far is DML SQL. Today, you will see how to create and set up the databases and tables for your data by using DDL SQL statements. This enables you to automate the installation of your application by having the program itself create the required database on the user's computer and the needed tables and columns. In addition, you can have maintenance functions in the application modify some of the properties in the database by using the DDL statements you will learn today. The topics we will cover are

  • Creating and altering databases

  • Creating and altering tables

  • Choosing column properties

  • Defining constraints

  • Discussing primary keys and foreign keys

  • Defining table relationships

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset