Homework Assignment: Insert Data Into for the Homework Assignment: for the CCP Vehicle Loan System Database
- Due Nov 11, 2021 by 11:59pm
- Points 200
- Submitting a text entry box or a file upload
- Available Nov 1, 2021 at 12am - Nov 19, 2021 at 11:59pm
One of the main goals in both the previous CREATE TABLE Assignments and this INSERT INTO Assignment is to reinforce the concept of referential integrity. These two linked assignments should make sure that all students understand the rules associated with enforcing referential integrity. In the last assignment, when Creating Tables in a Relational Database Management System (RDMBS) that enforces referential integrity, you should have discovered that it is important to understand that the tables on the one side of 1_M Relationships must be created before the tables that are on the many sides of 1_M Relationships.
In this segment of the development process for the Homework Database, should also discover that it is equally important to insert the test data for the database and the real-time data in the same order. The data for the tables on the 1 side of 1_M Relationships must be inserted into their tables before the data on the many sides of the 1_M Relationships can be inserted into their tables.
If the guideline is not followed, then the tables involved with the INSERT INTO Statements that do not follow the guideline will not get data inserted when the INSERT INTO Statement executes. This can have cascading errors in other INSERT INTO Statements that are dependent on another INSERT INTO Statement executing without syntax errors. This will also have cascading errors down into the INSERT INTO Statements that are dependent on specific data on the one side of relationships being inserted successfully. If a Primary Key data value that a Foreign Key data value is referencing does not exist in the Primary Key Table, a Parent/Child Referential Integrity Error will occur. This will prevent the record/rows containing the Foreign Key value from being inserted successfully into the Foreign Key Table.
The SQL Text File that you upload should contain the INSERT INTO Statements for the Tables of the CCP Vehicle Loan System Database
Just Create 5 to 7 instances for each table to write the INSERT INTO STATEMENT for.
Students should attempt to use the CREATE TABLE Statements from the earlier CREATE TABLE Assignment for the CCP Vehicle Loan System Database. Students that did not get perfect scores on the CREATE TABLE Assignment for the Art Exhibition Tour Database should use the feedback that I provided to make corrections to the SQL Script for the CREATE TABLE Assignment for the CCP Vehicle Loan System Database.
You should combine the SQL Script for the CREATE DATABASE and TABLE Statements into a single SQL script file that runs continuously.
Files to Upload
SQL File containing your INSERT INTO Statements. The file must contain the following
- SQL Statements to Create the Database and Tables in the Database
- SQL Statements to INSERT the sample data into the tables of the database
Submit an SQL Text File for the SQL portion of this assignment. An SQL Text File is a text file with a ".SQL" extension on the file name.
- The script should be well documented with comments
- All the scripts should be placed in one file
- The script should run continuously without errors
Submit the following file artifacts
- CREATE TABLE Statements that Work
- ER Diagram that matches the script
- Relational Schema to Match the ER Diagram and Script
Submit all SQL Script in a Single SQL Text File with an SQL Extension