SQL Queries For Library Database Design

pages Pages: 4word Words: 890

Question :

Create The Book Library Database Design using sql queries with output .

Show More

Answer :

SQL Queries with output 


  1. Table For Student


create table Student_tbl(StudentId  int primary key,

StudentFirstName  varchar(50) ,

StudentLastName  varchar(50) 

 );


Table for student


2.Table For  AUCTION

create table AUCTION (LoneId int primary key,

Date_Of_Returned DATE,

Borrow varchar(50),

StudentId int,

CONSTRAINT fk_StudentId FOREIGN KEY (StudentId) 

REFERENCES Student_tbl(StudentId)

 );

Table for auction


3. Table For  Author

create table Author(AuthorId  int primary key,

FirstName varchar(50) ,

LastName varchar(50) 

 );


Table for author


4.Table For Book

create table Book(ISBN_No   int primary key,

Title  varchar(50) ,

Date_Of_Publication DATE

 );

Table for book



5.Table For Category

create table Category(CategoryId int primary key,

CategoryName  varchar(50) 

 );

table for category


6.Table For Publisher

create table Publisher(PublisherId int primary key,

Address  varchar(50) ,

Telno  varchar(20)

 );

Table for publisher




7.Table For AmazonBook

create table AmazonBook(BookId  int primary key,

Title  varchar(50) ,

Date_Of_Publication DATE

 );

Table for amazon book