From book \"Data Modeling and Database Design (2nd Edition)\" The answer for pro
ID: 3856490 • Letter: F
Question
From book "Data Modeling and Database Design (2nd Edition)"
The answer for problem 11 is not there.
This exercise is based on the data sets associated with Figure 2.25 in Chapter 2. Use the SQL Data Definition Language to create a relational schema 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 pr all the appropriate referential integrity constraints. Assume that Co_name is character data type of size 5, Co_ size is an integer data type of size 4, Co_headquaters is a character data type of size 10, St name is a Varchar data type of size 10, St_name is a Varchar data type of size 10, St_major's 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 size 10. In_year is an integer data type of size 4, In_qtr is a character data type 10 In_location is a character data type of size 15, and In stipend is an integer date size 4. In_stipend represents the monthly stipend associated with the intership. Use the SQL Insert statement to populate the three tables with the following data:Explanation / Answer
a)
CREATE TABLE COMPANY (
Co_name character(5) PRIMARY KEY,
Co_size int CHECK (Co_size<10000),
Co_headquater character(10)
);
CREATE TABLE STUDENT (
St_name varchar(10) PRIMARY KEY,
St_major character(20),
St_status character(2)
);
CREATE TABLE INTERNSHIP (
In_co_name character(5) ,
In_st_name varchar(20),
In_year integer CHECK(In_year<10000),
In_qtr character(10),
In_location character(15),
In_stipend integer CHECK(In_stipend<10000)
);
Here are the DDL, let me know if you also need the instructions in DML (i.e. answer part b)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.