Assume you have these tables.. Q) Write in SQL queries to populate the above tables by inserting minimum 4 tuples in each one. CREATE TABLE Student (studid Char(9) Primary Key, FirstName Varchar2(50) NOT NULL, LastName Varchar2(50) NOT NULL, Email Varchar2(50) NOT NULL UNIQUE, PhoneNumber Number(8) NOT NULL UNIQUE, DateOfBirth Date NOT NULL, GPA Number(1,2) NOT NULL); CREATE TABLE Club (clubID Number(3) Primary Key, ClubName Varchar2(20) NOT NULL, studid Char(9) NOT NULL UNIQUE, Foreign key(studid) references Student(studid)); CREATE TABLE MemberOf (ClubID Number(3) Primary Key, Studid char(9), JoiningDate date, Foreign Key(ClubID) references club(clubID), Foreign Key(Studid) references Student(studid)); CREATE TABLE Activities (Actid Number(3) Primary Key, Acdt DATE NOT NULL, Place Varchar2(50) NOT NULL, durationNbHour Number NOT NULL); CREATE TABLE Organize (actid Number(3) Primary Key, clubID Number(3), Fee Number(4,2), Foreign Key(actid) references Activities(Actid), Foreign Key(clubID) references MemberOf(ClubID));

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Assume you have these tables..

Q) Write in SQL queries to populate the above tables by inserting minimum 4 tuples in each one.

CREATE TABLE Student (studid Char(9) Primary Key,
FirstName Varchar2(50) NOT NULL,
LastName Varchar2(50) NOT NULL,
Email Varchar2(50) NOT NULL UNIQUE,
PhoneNumber Number(8) NOT NULL UNIQUE,
DateOfBirth Date NOT NULL,
GPA Number(1,2) NOT NULL);

 

CREATE TABLE Club (clubID Number(3) Primary Key,
ClubName Varchar2(20) NOT NULL,
studid Char(9) NOT NULL UNIQUE, Foreign key(studid) references Student(studid));


CREATE TABLE MemberOf (ClubID Number(3) Primary Key, 
Studid char(9), 
JoiningDate date, 
Foreign Key(ClubID) references club(clubID), Foreign Key(Studid) references Student(studid));


CREATE TABLE Activities (Actid Number(3) Primary Key,
Acdt DATE NOT NULL,
Place Varchar2(50) NOT NULL,
durationNbHour Number NOT NULL);


CREATE TABLE Organize (actid Number(3) Primary Key, 
clubID Number(3), 
Fee Number(4,2), Foreign Key(actid) references Activities(Actid),
Foreign Key(clubID) references MemberOf(ClubID));

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY