Given the ERD in this document, write the CREATE TABLE statements to construct the tables for this database.
Lab: Structured Query Language (SQL) Queries Data Definition Language (DDL) Create Table Assignment Instructions
Instructions
In SQL Server, create a new database called University.
Given the ERD in this document, write the CREATE TABLE statements to construct the tables for this database. Be sure to use reasonable data types and create all tables, attributes, primary keys, foreign keys, and “not null” constraints in your statements where appropriate.
To receive full credit for this assignment, your CREATE TABLE statements must be executed in SQL Server.
In a new Word document, copy the ERD and type your CREATE TABLE statements below the ERD. Then, in SQL Server, after you execute each CREATE TABLE statement, issue these two statements:
SELECT * FROM [table name]
exec sp_help [table name].
Note: exec sp_help [table name] is a built-in stored procedure that you run to easily see your table structure, including fieldnames, data types, primary keys, foreign key constraints, etc. It’s a very useful tool.
Take a screen shot of your queries and their results and paste the screenshot below each CREATE TABLE statement. Put each table on a separate page of your word document.
To illustrate, the Campuses table has been created for you on the page following the ERD and Narrative Description section.