Using the table below, Write 2 simple/short TRIGGER STATEMENTS (WITH GOOD BUSINESS VALUE),
After writing the trigger statements, please comment on what the TRIGGER IS DOING.
CREATE TABLE STUDENT_TBL
(
STU_ID NUMBER (8) NULL,
F_NAME VARCHAR (20)
NULL,
L_NAME VARCHAR (30)
NULL,
STU_MAJOR VARCHAR (20)
NULL,
STU_ADDR VARCHAR (50) NULL,
STU_EMAIL VARCHAR (30) NULL,
CONSTRAINT PKSTU primary key (STU_ID)
);
DESCRIBE STUDENT_TBL;
CREATE TABLE ENROLL_TBL
(
ENR_ID NUMBER (8),
ENR_DATE DATE (10) NULL,
ENR_LOCATION VARCHAR (10)
NULL,
ENR_GRADE VARCHAR (10) NULL,
CL_ID VARCHAR (10) NULL,
CONSTRAINT PKENR primary key (ENR_ID),
);
DESCRIBE ENROLL_TBL;
CREATE TABLE CLASS_TBL
(
CL_ID NUMBER (8),
CL_SECTION VARCHAR (10) NULL,
CL_TIME VARCHAR (18) NULL,
ROOM_CAPACITY VARCHAR (10) NULL,
PROFESSOR_ID VARCHAR (10) NULL,
CONSTRAINT PKCL primary key
(CL_ID),
CONSTRAINT FKPROF foreign key (PROF_ID)
references PROFESSOR,
CONSTRAINT FKRMCAPACITY foreign key
(ROOM_CAPACITY) references ROOM
);
DESCRIBE CLASS_TBL;
CREATE TABLE COURSE_TBL
(
CRS_ID NUMBER (8),
CRS_DESCRIPTION VARCHAR (20) NULL,
CRS_NAME VARCHAR (20)
NULL,
CRS_CREDIT VARCHAR (5)
NULL,
CRS_LOCATION VARCHAR (10)
NULL,
CONSTRAINT PKCRS primary key (CRS_ID)
);
DESCRIBE COURSE_TBL;
CREATE TABLE PROFESSOR_TBL
(
PROF_ID NUMBER,
PROF_FNAME VARCHAR (10)
NULL,
PROF_LNAME VARCHAR (20)
NULL,
PROF_EMAIL VARCHAR (30) NULL,
PROF_DEPT VARCHAR (20) NULL,
PROF_PHONE VARCHAR (18) NULL,
CONSTRAINT PKPROF primary key (PROF_ID)
);
DESCRIBE PROFESSOR_TBL;
CREATE TABLE ROOM_TBL
(
RM_ID
NUMBER,
RM_NAME VARCHAR (10)
NULL,
RM_TYPE VARCHAR (20)
NULL,
RM_TIME VARCHAR (18) NULL,
RM_CAPACITY VARCHAR (10) NULL,
CONSTRAINT PKRM primary key (RM_ID)
);
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
Using the table below, Write 2 simple/short TRIGGER STATEMENTS (WITH GOOD BUSINESS VALUE), After writing the...
-- Schema definition create table Customer ( cid smallint not null, name varchar(20), city varchar(15), constraint customer_pk primary key (cid) ); create table Club ( club varchar(15) not null, desc varchar(50), constraint club_pk primary key (club) ); create table Member ( club varchar(15) not null, cid smallint not null, constraint member_pk primary key (club, cid), constraint mem_fk_club foreign key (club) references Club, constraint mem_fk_cust...
SQL Query Question: I have a database with the tables below, data has also been aded into these tables, I have 2 tasks: 1. Add a column to a relational table POSITIONS to store information about the total number of skills needed by each advertised position. A name of the column is up to you. Assume that no more than 9 skills are needed for each position. Next, use a single UPDATE statement to set the values in the new...
I NEED TO WRITE THE FOLLOWING QUERIES IN MYSQL (13)Next, grant to a user admin the read privileges on the complete descriptions of the customers who submitted no orders. For example, these are the customers who registered themselves and submitted no orders so far. The granted privilege cannot be propagated to the other users. 0.3 (14)Next, grant to a user admin the read privileges on information about the total number of orders submitted by each customer. Note, that some customers...
Write an SQL query to return the users who posted the most number of jokes on 1/1/2019. Database: create table User( userid varchar(30) not null, password varchar(30), firstname varchar(30), lastname varchar(50), email varchar(50), gender char(1), age integer, banned boolean, primary key(userid), unique(email)); create table MyFriends( userid varchar(30), friendid varchar(30), primary key(userid,friendid), foreign key(userid) references User, foreign key(friendid) references User(userid)); Create table Jokes( Jokeid integer, title varchar(100), description varchar(255), authorid varchar(30) not null, primary key(jokeid), posttime Datetime, foreign key(authorid) references User(userid));...
Hello, Does anyone have any input on how to fragment this table in visual studio? CREATE TABLE [dbo].[Stock] ( [itemNo] INT NOT NULL , [store] VARCHAR(50) NOT NULL, [qtyOnHand] INT NULL, [qtyHand] INT NULL, [qtyOnOrder] INT NULL, [reorderPoint] INT NULL, CONSTRAINT [FK_Stock_Item] FOREIGN KEY ([itemNo]) REFERENCES [Item]([itemNo]), CONSTRAINT [FK_Stock_Store] FOREIGN KEY ([store]) REFERENCES [Store]([storeName]), CONSTRAINT [PK_Stock] PRIMARY KEY ([itemNo], [store]), The other tables are: CREATE TABLE [dbo].[Item] ( [itemNo] INT NOT NULL PRIMARY KEY, [itemName] VARCHAR(50) NULL, [supplier] VARCHAR(50) NULL,...
Based on reference below. Write a relational algebra expression to return those users who have posted “excellent” reviews but never “poor” reviews. CREATE TABLE Users ( userId varchar (30) NOT NULL, pass varchar (30), fname varchar (50), lname varchar (50), email varchar (50), gender char(1), age integer, banned boolean, PRIMARY KEY (userId), UNIQUE(email)) CREATE TABLE FavSellers ( userId varchar (30), sellerId varchar (30), PRIMARY KEY (userId, sellerId),...
NEED HELP IN INSERT STATEMENTS FOR THE TABLES CAN YOU PLEASE ADD SOME INSERT STATEMENTS FOR A COMPANY SCHEMA SCRIPT. PLEASE ADN THANK YOU DROP TABLE dependent; DROP TABLE works_on; DROP TABLE project; DROP TABLE dept_locations; DROP TABLE department; DROP TABLE employee; CREATE TABLE employee ( fname varchar(15) not null, minit varchar(1), lname varchar(15) not null, ssn char(9), bdate date, address varchar(50), sex char, salary numeric(10,2), superssn char(9), dno numeric, primary key (ssn), foreign key (superssn) references employee(ssn) ); CREATE...
Given the schema, write a query and subquery to do the following: CREATE TABLE Majors major VARCHAR(12), description VARCHAR, PRIMARY KEY (major) ); CREATE TABLE Course ( courseMajor VARCHAR(12), courseNo VARCHAR(6), credits INTEGER NOT NULL, enroll_limit INTEGER, PRIMARY KEY(courseNo, courseMajor), FOREIGN KEY (courseMajor) REFERENCES Majors (major) CREATE TABLE Tracks trackMajor VARCHAR(12), trackCode VARCHAR(10), title VARCHAR, PRIMARY KEY(trackMajor, trackCode), FOREIGN KEY (trackMajor) REFERENCES Majors(major) CREATE TABLE Student ( SID CHAR(8), sName VARCHAR(30), studentMajor VARCHAR(12), trackCode VARCHAR(10), PRIMARY KEY(SID), FOREIGN KEY (studentMajor,...
SQL Command - Create a view called S LIST that lists the Cardholder Number, last name, first name and due date for all cardholders who have not returned a book. Use the CREATE OR REPLACE VIEW AS ... command. TABLE CARD HOLDERS Cardholder Numberint NOT NULL CONSTRAINT CH PK PRIMARY KEY, First_Name varchar(10) NULL, LastName varchar(15) NULL, Address varchar(20) NULL, varchar(15) NULL, State char(2) NULL, Zip_Code char(5) NULL) City TABLE BOOKS CHECKED OUT Cardholder_Numberint NOT NULL, Book Numberint NOT NULL,...