Using this tables.. Write in SQL queries to populate the above tables by inserting minimum 4 tuples in each one.      1. Student (studid, email, name) CREATE TABLE Student (     studid char(9) NOT NULL,     email varchar2(50) NOT NULL UNIQUE,     name varchar2(50) NOT NULL,     PRIMARY KEY (studid) ); 2. Club (clubid, telephone, name, #president) CREATE TABLE Club (     clubid int(3) NOT NULL,     telephone int(8),     name varchar2(20) NOT NULL,     president varchar2(20),      PRIMARY KEY (studid) );   3. MemberOf(#clubid, #studid ) CREATE TABLE MemberOf (     clubid int(3) ,     studid char(9),     FOREIGN KEY (clubid) REFERENCESClub(clubid)     FOREIGN KEY (studid) REFERENCESStudent(studid) ); 4. Activities(actid, actdt, place) CREATE TABLE Activities (     actid int(3) NOT NULL,     actdt Date NOT NULL,     place varchar2(50),      PRIMARY KEY (actid) );   5.Organize(#actid , #clubid , fee) CREATE TABLE Organize (     actid int(3) ,     clubid int(3),     fee Number (4,2),     FOREIGN KEY (actid) REFERENCESActivities(actid)     FOREIGN KEY (clubid) REFERENCESClub(clubid) );

Database Systems: Design, Implementation, & Management
11th Edition
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Chapter7: Introduction To Structured Query Language (sql)
Section: Chapter Questions
Problem 21P: Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table in the...
icon
Related questions
Question

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

 

 

1. Student (studid, email, name)

CREATE TABLE Student (
    studid char(9) NOT NULL,
    email varchar2(50) NOT NULL UNIQUE,
    name varchar2(50) NOT NULL,
    PRIMARY KEY (studid)
);

2. Club (clubid, telephone, name, #president)

CREATE TABLE Club (
    clubid int(3) NOT NULL,
    telephone int(8),
    name varchar2(20) NOT NULL,
    president varchar2(20), 
    PRIMARY KEY (studid)
);

 

3. MemberOf(#clubid, #studid )

CREATE TABLE MemberOf (
    clubid int(3) ,
    studid char(9),
    FOREIGN KEY (clubid) REFERENCESClub(clubid)
    FOREIGN KEY (studid) REFERENCESStudent(studid)
);

4. Activities(actid, actdt, place)

CREATE TABLE Activities (
    actid int(3) NOT NULL,
    actdt Date NOT NULL,
    place varchar2(50), 
    PRIMARY KEY (actid)
);

 

5.Organize(#actid , #clubid , fee)

CREATE TABLE Organize (
    actid int(3) ,
    clubid int(3),
    fee Number (4,2),
    FOREIGN KEY (actid) REFERENCESActivities(actid)
    FOREIGN KEY (clubid) REFERENCESClub(clubid)
);

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps

Blurred answer
Knowledge Booster
Complex Datatypes
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
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning