Question: Table: Student Student _ ID Student _ Email Student _ FName Student _ LName Student _ Phone Table: Class _ Instructor Instructor _ ID Instructor

Table: Student
Student_ID
Student_Email
Student_FName
Student_LName
Student_Phone
Table: Class_Instructor
Instructor_ID
Instructor_Name
Instructor_Pref
Instructor_Email
Instructor_Education
Table: Class
Class_ID
Class_Name
Class_Credits
Class_Start_Date
Class_Fee
Table: Registrater_Class
Reg_ID
Reg_Date
Student_ID_KF
Instructor_ID_KF
Class_FK
Class_Price
Q1: Database Table Creation and Constraints -[30 Points]
Task: Create tables with proper Primary Key (PK), Foreign Key (FK), Data Types, Data Size, Constraints, and Naming Standards. All tables should have the student's Campus_ID in the name. Example: TableName_Student_IM19182.
A. Create the Student_XXXXXXX Table -[3 Points]
Query: Provide the SQL query to create the table.
Explanation: Explain the structure and reasoning behind the chosen data types, constraints, and naming conventions.
Screenshot: Include a screenshot of the successful creation of the table.
B. Create the Class_Instructor_XXXXXXX Table -[3 Points]
Query: Provide the SQL query to create the table.
Explanation: Explain the structure and reasoning behind the chosen data types, constraints, and naming conventions.
Screenshot: Include a screenshot of the successful creation of the table.
C. Create the Class_XXXXXXX Table -[3 Points]
Query: Provide the SQL query to create the table.
Explanation: Explain the structure and reasoning behind the chosen data types, constraints, and naming conventions.
Screenshot: Include a screenshot of the successful creation of the table.
D. Create the Registrater_Class_XXXXXXX Table -[3 Points]
Query: Provide the SQL query to create the table.
Explanation: Explain the structure and reasoning behind the chosen data types, constraints, and naming conventions.
Screenshot: Include a screenshot of the successful creation of the table.
E. Create Named Constraints for Primary and Foreign Keys -[5 Points]
Query: Provide the SQL query to create named constraints for Primary and Foreign Keys.
Explanation: Explain why the specific constraints were used, their naming conventions, and how they maintain data integrity.
Screenshot: Include a screenshot of the successful application of constraints.
F. Add Not Null Constraint to Student Name -[3 Points]
Query: Provide the SQL query to add a Not Null constraint to the Student name.
Explanation: Explain the importance of this constraint and how it will affect data entry.
Screenshot: Include a screenshot of the successful addition of the constraint.
G. Add Check Constraint for Class_Name in Classes Table -[5 Points]
Query: Provide the SQL query to add a Check constraint for Class_Name to ensure it is one of the following: (IS147, IS247, IS310, IS410).
Explanation: Explain how the check constraint works and its purpose.
Screenshot: Include a screenshot of the successful addition of the constraint.
H. Create a Sequence for the Students Table -[5 Points]
Query: Provide the SQL query to create a sequence for the Student_ID in the Students table.
Explanation: Explain the purpose of the sequence and how it will be used.
Screenshot: Include a screenshot of the successful creation of the sequence.
Q2: Data Insertion and Foreign Key Accuracy -[20 Points]
Task: Insert records into tables while ensuring the correct Foreign Key relationships and data accuracy.
A. Insert 3 Records into Students Table Using Sequence for Student_ID -[5 Points]
Query: Provide the SQL query to insert 3 records.
Explanation: Explain how the sequence is used in the insert statement and why it ensures unique IDs.
Screenshot: Include a screenshot of the successfully inserted records.
B. Insert 3 Records into Class_Instructor Table -[5 Points]
Query: Provide the SQL query to insert 3 records.
Explanation: Explain the data being inserted and its relation to the other tables.
Screenshot: Include a screenshot of the successfully inserted records.
C. Insert 5 Records into Class Table -[5 Points]
Query: Provide the SQL query to insert 5 records.
Explanation: Explain the data being inserted and its relevance to the course registration process.
Screenshot: Include a screenshot of the successfully inserted records.
D. Insert 5 Records into Registrater_Class Table -[5 Points]
Query: Provide the SQL query to insert 5 records.
Explanation: Explain how the foreign keys in this table relate to the other tables and ensure data integrity.
Screenshot: Include a screenshot of the successfully inserted records.
Q3: Data Retrieval and Manipulation Queries -[25 Points]
Task: Write and execute SQL queries to retrieve, update, and manipulate data in the created tables.
A. Show All Records from Students Table -[2 Points]
Query: Provide the SQL query to retrieve all records from the Students table.
Explanation: Describe what the query does and how it retrieves data.
Screenshot: Include a screenshot of the output.
B. Show Total Student Count from Students Table -[2 P

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!