Question
Below is a schema of Southern Arkansas University database. Create the database and all tables using SQL command. Also, insert at least 3 rows in
Below is a schema of Southern Arkansas University database. Create the database and all tables using SQL command. Also, insert at least 3 rows in each table using SQL command. In phpMyAdmin, Name your database as universitydb.
Shcema:
Department (dept_name, building, budget)
Course (course_id, title, dept_name, credits)
Instructor (ID, name, dept_name, salary)
Section (course_id, sec_id, semester, year, building, room_number)
Teaches (ID, course_id, sec_id, semester, year)
Student (ID, name, dept_name, tot_cred)
Note:
Data type/domain of each attribute should be appropriate.
You should maintain referential integrity (primary key-foreign key relationship. Below are example codes for creating two tables maintaining referential integrity.
create table department (
dept_name varchar(20),
building varchar(15),
budget numeric(10,2),
Primary key (dept_name));
create table course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0),
primary key (course_id),
foreign key (dept_name) references department (dept_name));
What to submit: Create a report by putting all SQL commands for table creation and data insertion in a word document. In addition, display your table data using SQL commands in phpMyAdmin and put snapshots of all tables with data in your report. Submit the report through Blackboard.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started