After Creating the Database Schema, Use Insert, Update, and Delete Commands to Populate the Tables with the Following Information. Notice That the Values for the Primary Key Columns (Classid in the Classes Table,

2177 WordsDec 24, 20129 Pages
After creating the database schema, use Insert, Update, and Delete commands to populate the tables with the following information. Notice that the values for the primary key columns (ClassId in the Classes table, AdvisorId in the Advisors table and StudentId in the Students table) are not listed. It is assumed that they will be “Identity” or “Auto-increment” columns and the DBMS will determine the proper identity value when the row is inserted. You may have to either modify your original data types for some of your table columns or modify the values below to fit your data types. For example, if you defined your gender column to be a 1-character column, you will need to use the values M or F instead of Male and Female. The IsActive column…show more content…
Finally Student is a one to many relationship with Student_Classes. Please see diagram below: Modification of class In order to have the class name fit I went into MySQL and modified the class table. The datatype was not large enough so I changed the datatype to VarChar (200). Modification class table code Below is a screen shot of the code before it is applied in MySQL. Modification code You can see code and it shows that the table has been altered. ALTER TABLE `ctuonline`.`classes` CHANGE COLUMN `ClassCode` `ClassCode` VARCHAR(20) NOT NULL , CHANGE COLUMN `ClassName` `ClassName` VARCHAR(200) NOT NULL , CHANGE COLUMN `Description` `Description` VARCHAR(600) NOT NULL ; Modification of Students Table In this screen shot I had to change the Bio Varchar to 150 so that way there was enough space for the information. Modification of Students code Code:ALTER TABLE `ctuonline`.`student` CHANGE COLUMN `Bio` `Bio` VARCHAR(150) NOT NULL ; Data Entered In Classes Here are screen shots that have the data entered into Classes table. Code for Classes Data Classes Data Code INSERT INTO `ctuonline`.`classes` (`ClassCode`, `ClassName`, `Description`) VALUES ('ACCT306', 'Accounting 1', 'This course introduces accounting concepts and explores the accounting environment. It covers the basic structure of accounting, how to maintain accounts, use account balances to prepare financial statements, and complete the accounting

    More about After Creating the Database Schema, Use Insert, Update, and Delete Commands to Populate the Tables with the Following Information. Notice That the Values for the Primary Key Columns (Classid in the Classes Table,

      Open Document