This exercise is based on the data sets associated with Figure 2.25 in Chapter 2. a. Use
Question:
a. Use the SQL Data Definition Language to create a relational schema that consists of the following three relations:
COMPANY (Co_name, Co_size, Co_headquarters)
STUDENT (St_name, St_major, St_status)
INTERNSHIP (In_co_name, In_st_name, In_year, In_qtr, In_location, In_stipend)
When you create a table for each relation, in addition to defining its primary key, define all the appropriate referential integrity constraints. Assume that Co_name is a character data type of size 5, Co_size is an integer data type of size 4, Co_headquarters is a character data type of size 10, St_name is a Varchar data type of size 10, St_major is a character data type of size 20, St_status is a character data type of size 2, In_co_name is a character data type of size 5, In_st_name is a Varchar data type of size 10, In_year is an integer data type of size 4, In_qtr is a character data type of size 10, In_location is a character data type of size 15, and In_stipend is an integer data type of size 4. In_stipend represents the monthly stipend associated with the internship.
b. Use the SQL Insert statement to populate the three tables with the following data:
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Data Modeling and Database Design
ISBN: 978-1285085258
2nd edition
Authors: Narayan S. Umanath, Richard W. Scammel
Question Posted: