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)

);

SQL create table queries : Create table author( Authorid int primary key,

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 Integrity

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!