Question
CREATE TABLE Instructor ( FName VARCHAR2(20), LName VARCHAR2(20), Email VARCHAR2(20), Username VARCHAR2(20), passwrd VARCHAR2(20), PRIMARY KEY(Username, Email)); CREATE TABLE RegUsers ( FName VARCHAR2(20), LName VARCHAR2(20),
CREATE TABLE Instructor (
FName VARCHAR2(20),
LName VARCHAR2(20),
Email VARCHAR2(20),
Username VARCHAR2(20),
passwrd VARCHAR2(20),
PRIMARY KEY(Username, Email));
CREATE TABLE RegUsers (
FName VARCHAR2(20),
LName VARCHAR2(20),
Email VARCHAR2(20),
Username VARCHAR2(20),
passwrd VARCHAR2(20),
PRIMARY KEY (Username, Email));
CREATE TABLE Messages (
Dte DATE,
Subject VARCHAR2(20),
Email VARCHAR2(20),
SName VARCHAR2(20),
MSG VARCHAR2(300));
CREATE TABLE Dictionary (
words VARCHAR2(20),
picture BLOB,
video BLOB );
CREATE TABLE Categories (
CatId INTEGER,
CatName VARCHAR2(20),
CatPicture BLOB,
PRIMARY KEY (CatId));
CREATE TABLE Lst (
Lid INTEGER,
Lname VARCHAR2(20),
PRIMARY KEY (Lid) );
/*week entity takes primary keys from other relation_INSTRUCTOR&USERS??*/
CREATE TABLE Comments (
CId INTEGER,
Text VARCHAR2(200),
Cdate DATE,
Username VARCHAR2(20),
Email VARCHAR2(20),
PRIMARY KEY (CId, Username,Email),
FOREIGN KEY (Username, Email) REFERENCES RegUsers
ON DELETE CASCADE);
/*error with TIME DATATYPE*/
CREATE TABLEtest (
testNo INTEGER,
Lv VARCHAR2(20),
PRIMARY KEY (testNo) );
CREATE TABLE Question (
Qid INTEGER,
Qtext VARCHAR2(60),
Canswer VARCHAR2(40),
option1 VARCHAR2(40),
option2 VARCHAR2(40),
option3 VARCHAR2(40),
PRIMARY KEY (Qid) );
CREATE TABLE Answer (
Qid INTEGER,
ActAns varchar(40),
Email VARCHAR2(20),
Username VARCHAR2(20),
PRIMARY KEY (Qid, Username, Email),
FOREIGN KEY (Qid) REFERENCES Question,
FOREIGN KEY (Username, Email) REFERENCES RegUsers);
CREATE TABLE Has2 (
Qid INTEGER,
testNo INTEGER,
PRIMARY KEY (Qid, testNo),
FOREIGN KEY (Qid) REFERENCES Question,
FOREIGN KEY (testNo) REFERENCES test );
CREATE TABLE Has (
CatId INTEGER,
PRIMARY KEY (CatId),
FOREIGN KEY (CatId) REFERENCES Categories );
/*NEED TO CHECK WITH THE TA*/
CREATE TABLE Contact (
);
/*NEED TO CHECK WITH THE TA*/
CREATE TABLE Post (
Cid INTEGER,
PRIMARY KEY (CId),
FOREIGN KEY (CId) REFERENCES Comments );
/*NEED TO CHECK WITH THE TA*/
CREATE TABLE crte (
Lid INTEGER,
PRIMARY KEY (LId),
FOREIGN KEY (LId) REFERENCES Lst );
>>>>>>>>>>>>>>>>>>>>>>>>>>
Parent:
They have the same queries and modifications that the registered users have except for the following:
List all their children (registered users) with their scores in the test.
List all their children (registered users) with all their information that they provided to the application when they registered.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
provide SQL statement as query
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started