Question
SQL create table queries : Create table author( Authorid int primary key, Name varchar (20), Surname varchar(20), Gender varchar (20), Birthdate date , Country varchar
SQL create table queries :
Create table author(
Authorid int primary key,
Name varchar (20),
Surname varchar(20),
Gender varchar (20),
Birthdate date ,
Country varchar (20)
);
Create table book(
ISBN int primary key,
Title varchar (20),
Category varchar (20),
Numberofpages int,
Authorid int ,
Publisherid int,
Foreign key (publisherid) references publisher (publisherid) ,
Foreign key (authorid) references author(authorid)
);
Create table publisher(
Publisherid int primary key,
Name varchar (20),
Surname varchar (20)
);
Create table people (
Id int primary key,
Name varchar (20),
Surname varchar (20),
Bookid int ,
Birthdate date,
Bookyear int,
Foreign key (bookid) references book(bookid)
);
Can you help me e-f-g-h qestions
e. Show the name and surname of the author whose books were read the most in a given year. f. Update the address of a given publisher. g. Insert a book that a person has read in a specific year. Before insertion, check if the given book data exists in the DB. h. Delete a person (from all the relevant tables of your DB) who has not read a book for the last 20 years. Make sure to maintain the Referential IntegrityStep 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