Starting from:

$25

CSIS3280 – Lab 07 Solved

Visual Studio Code

1. Download the lab template from Blackboard

2. Extract it

3. Fill in the relevant code to create the solution and meet the requirements

Solution

Create a .sql file that does the following:

You must drop your database if it exists

You must create the appropriate SQL file that specifies 3 tables for a web application (that you will make up) your tables must have your naming convention at the end of the table for example (Lab07_SWh-56789.sql).

   Your solution will include the Lab07_SWh_56789.sql file that will be run via the command line MySQL utility.

You must provide the proper command to run the mysql file and have tested its creation by entering it either into the MySQL command line.

Requirements:

1. Create three tables representing three entities in mysql. (ex: Student_SWh_56789, Course_SWh_56789, Enrollment_SWh_56789)

2. Be sure that you append the naming convention to your tables

3. You cannot use the example above.

4. You must CREATE a database to populate the tables and records specified below you must drop the database if it already exists. Be sure to stick to the naming connection for example: Database_SWh_56789 where Database is the name of your database.

5. Your tables must enforce proper referential integrity between each other (they must be related and have the primary and foreign key constraints – What this means is that two of your tables must have at least one foreign key reference).

6. Your script in addition to creating the database and tables must INSERT 5 records into each table.

7. You must then demonstrate CRUD operations on your database (see the template file)

1. Create (this will be coverd by inserting at least 5 rows per table)

2. An UPDATE Query that updates one of the values in your table in your strong entity.

3. Read ( A SELECT query that references all of your tables and joins by primary and foreign key). This query should verify that your UPDATE query worked.

4. Delete ( A DELETE query that that removes one of the records in your strong entity)

8. You may assume that the root user will execute the mysql command with no password and that the mysql command is set in the PATH on the machine executing the code.

Note: Please refer to the attached sample .sql file.

1 / 1

More products