Create a new database (named MyUniversity) Student (sid: integer, sname: string(100 chars), GPA: real, dateOfBirth: date, Did: integer, FirstYear: integer) Department (did: integer, dname: string(30 chars), capacity: integer) Course (cid: integer, cname: string(50 chars), credit: integer) Enroll (studentID: integer, courseID: integer, departmentID: integer, enrollmentDate: date, finalGrade: real) studentID, courseID, and departmentID in Enroll are foreign keys referencing the primary keys of the student, course, and department relations, respectively. Did in Student is a foreign key referencing the primary key of the department relation. Using SQL create these relations under the MyUniversity database. Place the constraints (e.g., default values, check, primary keys) you find appropriate:

Fundamentals of Information Systems
8th Edition
ISBN:9781305082168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter3: Database Systems And Applications
Section: Chapter Questions
Problem 15SAT: An in-memory database (IMDB) is a database management system that stores the entire data-base in...
icon
Related questions
Question

Create a new database (named MyUniversity)

Student (sid: integer, sname: string(100 chars), GPA: real, dateOfBirth: date, Did: integer, FirstYear: integer)

Department (did: integer, dname: string(30 chars), capacity: integer)

Course (cid: integer, cname: string(50 chars), credit: integer)

Enroll (studentID: integer, courseID: integer, departmentID: integer, enrollmentDate: date, finalGrade: real)

studentID, courseID, and departmentID in Enroll are foreign keys referencing the primary keys of the student, course, and department relations, respectively. Did in Student is a foreign key referencing the primary key of the department relation.

Using SQL create these relations under the MyUniversity database. Place the constraints (e.g., default values, check, primary keys) you find appropriate:

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Table
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning