Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

);

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

=+ Who is the negotiation partner at company level?

Answered: 1 week ago

Question

=+Which associations exist?

Answered: 1 week ago