Вы находитесь на странице: 1из 8

Www.freestudentprojects.

com
www.studentprojectcode.com
www.dreamworldproject.info www.studentprojectsstore.com

DATABASEDESIGN
1.Introduction:
Thedatabaseisacollectionofinformationandissystematicallystoredintablesinthe
formofrowsandcolumns.Thetableinthedatabasehasuniquenamethatidentifiesits
contents.Thedatabaseinturnisfurtherdescribedindetailgivingallthefieldsusedwiththe
datatypes,constraintsavailable,primarykeyandforeignkey.
Databasedesignisusedtomanagelargeofinformation.Inthisdatabasewedescribe
theentire4tableavailableinthesoftware,whichareusedtostorealltherecords.

2.Datatypesanditsdescription:
Fieldsindatabasetablehaveadatatypeusedindatabasetableareexplainedbelow.
1.

Integer
:oneoptionalsigncharacter(+or)followedbyatleastonedigit(09).Leading
andtrailingblanksareignored.Noothercharacterisallowed.

2.

Varchar
:Itisusedtostorealphanumericcharacters.Inthisdatatypewecansetthe
maximumnumberofcharactersupto8000rangesbydefaultsSQLserverwillsetthe
sizeto50charactersrange.

3.

Data/time
:Data/timedatatypeisusedforrepresentingdateortime.

DatabaseName:bookdetails
FieldName
Accno
Author
Title
Publication
Edition
No_of_copies

DataType
Varchar
Varchar
Varchar
Varchar
Varchar
int

Size
50
50
50
50
50

Relation
Primarykey
Notnull
Notnull
Notnull
Notnull
Notnull

Www.freestudentprojects.com
www.studentprojectcode.com
www.dreamworldproject.info www.studentprojectsstore.com

Volumn
Date_pur
Price
Status

Varchar
Varchar
Decimal
Varchar(50)

50
50
(18,2)
50

Notnull
Notnull
Notnull
Notnull

DatabaseName:student
FieldName

DataType

Size

Name

Varchar

50

Regno

Varchar

50

Date_of_issue

Datetime

R
e
l
a
t
i
o
n
N
o
t
n
u
ll
P
r
i
m
a
r
y
k
e
y
N
o
t
n
u
ll

Www.freestudentprojects.com
www.studentprojectcode.com
www.dreamworldproject.info www.studentprojectsstore.com

Addresss

Varchar

50

Date_of_return

Datetime

Course

Varchar

50

Accno

Varchar

50

Gender

V
a
r
c
h
a
r

DatabaseName:issue

50

N
o
t
n
u
ll
N
o
t
n
u
ll
N
o
t
n
u
ll
F
o
r
e
i
g
n
k
e
y

Notnull

Www.freestudentprojects.com
www.studentprojectcode.com
www.dreamworldproject.info www.studentprojectsstore.com

FieldName
Regno
Date_of_issue_books
Date_of_return_book
s
Accno
Name
Course
Author
Volumn
Edition

DataType

Size

Relation

Varchar
Datetime
Datetime

50

Foreignkey
Notnull
Notnull

Varchar
Varchar
Varchar
Varchar
Varchar
Varchar

50
50
50
50
50
50

NotNull
Notnull
Notnull
Notnull
Notnull
Notnull

DataType
Varchar
Varchar
Datetime
Datetime
Varchar
Varchar
Varchar
Varchar
Varchar

Size
50
50

50
50
50
50
50

Relation
Foreignkey
NotNull
Notnull
Notnull
Notnull
Notnull
Notnull
Notnull
Notnull

DatabaseName:return
FieldName
Regno
Accno
Date_of_return_books
Date_of_issue_books
Name
Course
Author
Volumn
Edition

EntityRelationshipDiagram:
EntityRelationshipDiagramisusedinmoderndatabasesoftwareengineeringtoillustrate

Www.freestudentprojects.com
www.studentprojectcode.com
www.dreamworldproject.info www.studentprojectsstore.com

logicalstructureofdatabase.Itisarelationalschemadatabasemodelingmethodusedto
Modelasystemandapproach.Thisapproachcommonlyusedindatabasedesign.The
diagramcreatedusingthismethodiscalledERdiagram.
TheERdiagramdepictsthevariousrelationshipsamongentities,consideringeach
objectasentity.Entityisrepresentedasrectangleshapeandrelationshiprepresentedas
diamondshape.Itdepictstherelationshipbetweendataobject.TheERdiagramisthe
notationthatisusedtoconductthedatamodelingactivity.

Entity:
Entityisthethingswhichwewanttostoreinformation.Itisanelementarybasic
buildingblockofstoringinformationaboutbusinessprocess.Anentityrepresentsanobject
definedwithintheinformationsystemaboutwhichyouwanttostoreinformation.Entities
aredistinctthingsintheenterprise.
Relationship:
Arelationshipisnormalconnectionorassociationbetweenentitiesusedto
relatetwoormoreentitieswithsomecommonattributesormeaningfulinteraction
betweentheobject.
Attributes:
Attributesarethepropertiesoftheentitiesandrelationshipdescriptorofthe
entity.Attributesareelementarypiecesofinformationattachedtoanentity.

symbols

Meaning

Entity

Relationship

Attributes

Keyattributes

Www.freestudentprojects.com
www.studentprojectcode.com
www.dreamworldproject.info www.studentprojectsstore.com

1
E1

N
E2

Library
Status
Title
Accno
Publisher
N:1Author
Book
Edition
Returndate
Regno
Bookissue

CardinalityratioN:1forE1:E2inR

Www.freestudentprojects.com
www.studentprojectcode.com
www.dreamworldproject.info www.studentprojectsstore.com

Bookreturn
Date_of_issue
Address
Date_ofreturn
Regno
Student
Volumn
Price
Date_pur
N:1No_of_copies
Selected_by
Female
State
Gender
PinNo
Male
1PhoneNo
Name

Course
Accno
Issues
Returns
11

Www.freestudentprojects.com
www.studentprojectcode.com
www.dreamworldproject.info www.studentprojectsstore.com

Accno
Issuedate
Regno
Accno
Returndate

1
1

A1