Concept explainers
PLZ help with the following:
1. Populate every relation with “sufficient” representative rows (at least 4 for each table).
Create table book (title varchar(80) not null, year INT not null , num INT primary key , subject Varchar(50) null);
Create table client (CID int primary key,fname varchar(20), lname varchar(20), type varchar(6), constraint checkclient check (type in ('Faculty', 'Student')));
Create table author (year INT, ID INT primary key, fname varchar(50) not null,lname varchar(50));
Create table BookAuthors(booknum int, authorID int, primary key (booknum, authorID),
constraint fk_book foreign key (booknum) references book(num),
constraint fk_author foreign key (authorid) references author(id));
create table bookcheckouts( booknum int, clientID int, checkoutdate date, expectedDuedate date not null, returnedate date, primary key (booknum, clientID, checkoutDate),
constraint book_checks foreign key(booknum) references book(num),
constraint book_clients foreign key (clientid) references client(CID));
Step by stepSolved in 2 steps
- Task 6: The Car Maintenance team considered that the available maintenance tasks should also have the price information in the database. Alter the MAINTENANCE_TYPES table to include a new column named MAINTENANCE_PRICE of type FLOAT. ANSWER IN MYSQL PLEASEarrow_forwardEmp:- Id is Primary keyProject:- EmpId foreign key.Find out the output of the left outer join, right outer join and inner join.Take the below columns in output:-Emp table ID, name.Project table projectID, NAMEarrow_forwardAssume a candidate key is a main key attribute. Your response?arrow_forward
- which object describes a set of values in a table? a) A relationship b) An attribute c) An entity d) A rulearrow_forwardDefine the term referential integrity constraint. Give an example of a referential integrity constraint for the tables you created for question 1.8.arrow_forwardComposite main keys have candidate keys. Your reaction?arrow_forward
- Create a view vLab3_xxx in the class database list the staff who have the highest salary in each of the branch city. You will need both Staff and Branch table. The output header should be (city, name, salary) where the name is "fname lname".arrow_forwardHi triggers Update and using Xampp and this table: CREATE TABLE MEMBER(STUDENT_ID CHAR(6) NOT NULL,CLUB_CODE VARCHAR(4) NOT NULL,MEMBER_DATE DATE NOT NULL,MEMBER_POSITION VARCHAR(15) NOT NULL,MEMBER_ATTENDANCE CHAR(2) NOT NULL,PRIMARY KEY (STUDENT_ID,CLUB_CODE),FOREIGN KEY (STUDENT_ID) REFERENCES STUDENT (STUDENT_ID) ON DELETE RESTRICT ON UPDATE CASCADE,FOREIGN KEY (CLUB_CODE) REFERENCES CLUB (CLUB_CODE) ON DELETE RESTRICT ON UPDATE CASCADE); INSERT INTO MEMBER VALUES('100027','C201','2020-03-25','Secretary','12'),('100027','C202','2020-04-11','Member','11'),('100032','C201','2020-02-23','President','12'),('100050','C201','2020-03-25','Member','10'),('100132','C202','2020-04-11','Treasurer','10'),('100074','C203','2020-04-09','President','12'),('100074','C204','2020-04-25','Treasurer','12'),('100051','C204','2020-04-25','Member','9'),('100064','C207','2020-04-25','Vice…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education