Question: Use the SQL Workbench: 4. Run the script file for the KimTay Pet Supplies database to create the five tables and add records to the
Use the SQL Workbench:








4. Run the script file for the KimTay Pet Supplies database to create the five tables and add records to the tables. Be sure to select the script file for the particular DBMS that you are using (MySQL, Oracle, or SQL Server). (Note: If you do not have the script files for this text, ask your instructor for assistance.) 5. Confirm that you have created the tables correctly by describing each table and comparing the results to Figures 315,339,341,343, and 345. 6. Confirm that you have added all data correctly by viewing the data in each table and comparing the results to Figure 21 in Module 2 . Figure 3-45 contains the CRI Notice the way that the primary key is defined command for the INVOICE LINE table. column. FIGURE 3-45 CREATE TABLE command for the INVOICE_LINE tabie This CREATE TABLE command, which uses the data definition features of SQL a table named SALES_REP. The table contains ten columns: REP_ID, FIRST_NAME NAYE, ADDRESS, CITY, STATE, POSTAL, CELL_PHONE, COMMISSION, and RAT REP ID colum Module 3 Figure 3-43 contains the CREATE TABLE command for the ITEM table. FIGURE 3-43 CREATE TABLE command for the ITEM table Figure 3-44 contains the INSERT commands to load data into the ITEM talk: Figures 3-41 through 3-46 show the scripts for the CREATE TABLE and INSERT commands for creating and inserting data into the INVOICES, ITEM, and INVOICE LINE tables in the KimTay Pet Supplies database. Figure 3-41 contains the CREATE TABLE command for the INVOICES table. FIGURE 3-41 CREATE TABLE command tor the INVUICES tavie Figure 3-42 contains the INSERT commands to load data into the INVOICES tabl Notice the way that dates are entered. Database Design Fundamentals FIGURE 2-1 Sample data for KimTay Pet Supplies (Continued) SALES REP FIGURE 2-1 Sample data for KimTay Pet Supplies Your ansad Stadent Acoommodation databases and to insert daka into them Ktariny Pre supplies had Figure 3-39 shows the CREATE TABLE command for the CUSTOMER table. Notice that the FIRST_NAME and LAST_NAME columns are specified as NOT NULL. Additionally, the CUST_ID column is the table's primary key, indicating that the CUST_ID column is the unique identifier of rows in the table. With this column designated as the primary key, the DBMS rejects any attempt to store a customer ID that already exists in the table. FIGURE 3-39 CREATE TABLE command for the CUSTOMEH tabie After creating the CUSTOMER table, you can create another file containing the INSERT commands to add the customer rows to the table. When a script file contains more than one command, each command must end with a semicolon. Figure 3-40 show
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
