Question 3: Create the DDL statements to create the tables described in your modified ER diagram in question 2: DDL Statement: CREATE TABLE School ( school_code integer Primary Key(10), location varchar(25), name varchar(10) ); CREATE TABLE Professors ( staff_id integer(10), name varchar(20), school varchar(30) ); CREATE TABLE Course ( subject_code varchar(10), school varchar(30), name varchar(10) ); CREATE TABLE Subject ( subject_code(10), school varchar(30), name varchar(10) ); CREATE TABLE Student ( student_id number(10), name varchar(10), address varchar(30), phone number(10) ); Table Description desc table School; Select * from School; Name                       Null              Type school_code Not null integer location Not null varchar(25) name Not null varchar(10)   desc table Professor; Select * from Professor; Name               Null              Type staff_id Not null number(10) name   varchar(20) school   varchar(30)   desc table Course; Select * from Course; Name                        Null               Type subject_code Not Null varchar(10) school   varchar(30) name   varchar(20)   desc table Subject; Select * from Subject; Name                   Null                    Type subject_code Not Null varchar(10) school   varchar(30) name   varchar(20)   desc table Student; Select * from Student; Name                     Null               Type student_id Not Null number(10) name   varchar(20) address   varchar(30) phone   number(10) Question: In your Database you created in Question 3, assume there is a student record for student 12543 Paul Darbyshire who is enrolled in the course BIS Bachelor of Information Systems It is the beginning of Semester 1 2020. Paul wants to drop all his current subjects for this semester and change courses from the BIS course to the BHR Bachelor of Human Resources course. This is a new course and won’t begin until Semester 2 2020. Paul needs to be enrolled in the following 3 subjects for semester 2 2020 HR101 Introduction to Human Resources HR211 HR for Medium Level Enterprises HR201 HR for Dummies

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Question 3: Create the DDL statements to create the tables described in your modified ER diagram in question 2:

DDL Statement:

CREATE TABLE School

(

school_code integer Primary Key(10),

location varchar(25),

name varchar(10)

);

CREATE TABLE Professors

(

staff_id integer(10),

name varchar(20),

school varchar(30)

);

CREATE TABLE Course

(

subject_code varchar(10),

school varchar(30),

name varchar(10)

);

CREATE TABLE Subject

(

subject_code(10),

school varchar(30),

name varchar(10)

);

CREATE TABLE Student

(

student_id number(10),

name varchar(10),

address varchar(30),

phone number(10)

);

Table Description

desc table School;

Select * from School;

Name                       Null              Type

school_code Not null integer
location Not null varchar(25)
name Not null varchar(10)

 

desc table Professor;

Select * from Professor;

Name               Null              Type

staff_id

Not null number(10)
name   varchar(20)
school   varchar(30)

 

desc table Course;

Select * from Course;

Name                        Null               Type

subject_code Not Null varchar(10)
school   varchar(30)
name   varchar(20)

 

desc table Subject;

Select * from Subject;

Name                   Null                    Type

subject_code Not Null varchar(10)
school   varchar(30)
name   varchar(20)

 

desc table Student;

Select * from Student;

Name                     Null               Type

student_id Not Null number(10)
name   varchar(20)
address   varchar(30)
phone   number(10)

Question:
In your Database you created in Question 3, assume there is a student record for student 12543 Paul Darbyshire who is enrolled in the course
BIS Bachelor of Information Systems
It is the beginning of Semester 1 2020. Paul wants to drop all his current subjects for this semester and change courses from the BIS course to the BHR Bachelor of Human Resources course. This is a new course and won’t begin until Semester 2 2020. Paul needs to be enrolled in the following 3
subjects for semester 2 2020

HR101 Introduction to Human Resources
HR211 HR for Medium Level Enterprises
HR201 HR for Dummies

Discuss any changes you may need to make to your database from Question 3 given this information and provide the SQL statements in order to accomplish the above tasks.

location
schoolcode
name
Faculty
has
School
name
coursecode
school
Course
offers
employs
staffid
offers
Professor
name
name
has
school
enrolls
school
Subject
subjectcode
enrolls
studentid
Student
name
address
phone
Transcribed Image Text:location schoolcode name Faculty has School name coursecode school Course offers employs staffid offers Professor name name has school enrolls school Subject subjectcode enrolls studentid Student name address phone
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education