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

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 3SA: Determine the value of each of the following expressions. (For decimal numbers, round your answer to...
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.
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning