ZiBaT => Peter Levinsky => PBA-Database => exercise
Data Definition Language DDL in SQL
Updated : 2018-02-08

Data Definition Language DDL in SQL

Idea : Group-work to understand and present diffrent aspect of defining data in SQL databases.
Background: http://www.w3schools.com/sql/default.asp 
(create table, constraints, primary,foreign key, check, index, auto incretement, dates etc.)

 

Case 1 : Simple creation Of Tables

Background:

 

Present how to create, delete, modify a simple table and how to define a primary key with or without auto increment.

An example could be:

Person

PersonID (PK) Address Phone

 

 

 

Case 2 : Simple Data types in Tables

Background:

 

Present how to use different data types in SQL including Date

 

 

 

Case 3 : More Data types in Tables

Background:

 

Present how to make different constraints on datatypes, the presentations should contain check, default, index and unique

 

 

 

Case 4 : Relationships between Tables

Background:

Present how to create foreign key between tables and describe the constraints. Describe how to obtain Referential Integrity by using ON Delete/On Update.

An example could be:

Customer

CustomerID (PK) Address Phone

Reservation

ReservationID (PK) Date Customer (FK) NoOfSeats

Case 5 : Creating Views

Background:

Present how to create and use Views.

Case 6 : Creating Users and Grants

Background:

Present how to create users and how to grant privileges to users for tables and views..