0% found this document useful (0 votes)
26 views1 page

Library

Uploaded by

Zion Santos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

Library

Uploaded by

Zion Santos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

--Library Management System Create Table

--Table For Student


Create Table Student(
Id Int Primary Key Identity(1,1) Not Null,
FirstName Varchar(200) Not Null,
LastName Varchar(200) Not Null,
Address Varchar(100) Not Null Default('Kathmandu') ,
PhoneNo Varchar(10) Unique,
BirthDate Date ,
Class Varchar(50) ,
Gender Char Not Null,
Point Decimal(10,2) ,
)

--Table For Author


Create Table Author(
Id Int Primary Key Identity(1,1) Not Null,
FirstName Varchar(200) Not Null,
LastName Varchar(200) Not Null,
)

--Table For Book Type


Create Table Type(
Id Int Primary Key Identity(1,1) Not Null,
Name Varchar(200) Not Null,
)

--Table For Book


Create Table Book(
Id Int Primary Key Identity(1,1) Not Null,
Name Varchar(200) Not Null,
PageCount Int ,
Point Decimal(10,2),
AuthorId Int Foreign Key References Author(Id),
TypeId Int Foreign Key References Type(Id)
)

--Table For Borrowed Book


Create Table Borrow(
Id Int Primary Key Identity(1,1) Not Null,
StudentId Int Foreign Key References Student(Id),
BookId Int Foreign Key References Book(Id),
TakenDate Date,
BroughtDate Date
)

You might also like