Introduction to Database Management Systems: Structure, Applications, and Key Benefits

19,667 views 37 slides Nov 06, 2022
Slide 1
Slide 1 of 37
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37

About This Presentation

Explore the essentials of Database Management Systems (DBMS), including fundamental concepts, key applications in various industries, and advantages like data integrity, security, and independence. This presentation delves into data models such as hierarchical, network, relational, and object-orient...


Slide Content

DATABASE MANAGEMENT SYSTEM

INTRODUCTION TO DATABASES
Adatabaseisacollectionofdataorganizedtoservemany
application.Byusingcentralizeddataitcaneasilybeaccessed,
managed,andupdated.
AndaDATABASEMANAGEMENTSYSTEM(DBMS)isacollection
ofprogramsthatenablesyoutostore,modify,andextract
informationfromadatabase.

ADVANTAGES OF USING A DATABASE APPROACH
•FlexibleDataAccess.
•ImprovedDataIntegrity(purity,).
•ImprovedDataSecurity.
•DataIndependence.
•ReducedDataRedundancy(excess).
•AbilitytoShareandRelateData
•StandardisationofData.
•IncreasedProductivity.

DBMS and Its Applications:
ADATABASEMANAGEMENT SYSTEM(DBMS)isa
computerizedrecord-keepingsystem.Itisarepositoryora
containerforcollectionofcomputerizeddatafiles.
Applicationareasfollows:
–Banking
–Airlines
–Universities
–Manufacturingandselling
–Humanresources
–Railwayreservationsystem
–Librarymanagementsystem
–Socialmediasites
–Telecommunications
–Onlineshopping
–Humanresourcemanagement

ELEMENT OF DATABASE
FIELDS:Afieldispartofarecordandcontainsa
singlepieceofdataforthesubjectoftherecord.
InthedatabasetableillustratedinFigure4,each
recordcontainsfourfields:

RECORDS:Dataisstoredinrecords.Arecordis
composedoffieldsandcontainsallthedata
aboutoneparticularperson,company,oritem
inadatabase.Inthisdatabase,arecordcontains
thedataforonecustomersupportincident
report.Recordsappearasrowsinthedatabase
table.ArecordforLogID1201242ishighlighted
inBelowmentionedFigure.

TABLES:Adatabasetableiscomposedof
recordsandfieldsthatholddata.Tablesarealso
calleddatasheets.Eachtableinadatabaseholds
dataaboutadifferent,butrelated,subject.

An Example of a Table
Records
Fields
Name GatorLinkPhone College
Graff rgraff 392-3900Pharmacy
Harris bharris 392-5555Medicine
Ipswich zipswich846-5656PHHP

KEYFIELD:Afieldofadatabase(typicallya
relationaldatabase)tablewhichtogetherform
auniqueidentifierforarecord(atableentry).
Theaggregateofthesefieldsisusuallyreferred
tosimplyas"thekey".

PRIMARY KEY
•Thecolumnorsetofcolumnsthatprovidethe
uniquenessfortherow.
•Atablecanhaveonlyoneprimarykey.
•Existingvaluesinprimarykeycolumnsmaynotbe
modified(insertnewvalueandthendeleteold
value)
•Thetableofarelationshipcontainingtheprimarykey
iscalledtheParentTable.

FOREIGN KEYS
•Aprimarykeyreferencedfromanothertableis
calledaforeignkey
•Foreachforeignkeyvalue,theremustbearowin
atablewhoseprimarykeyhasthesamevalue.
•Theforeignkeycanbemadeupofoneormore
columnsofatablebutmustmatchtheprimary
keyitisreferencing
•Atablecanhaveanynumberofforeignkeys.

PRIMARY KEYS & FOREIGN KEYS
Name User Phone College
Graff rgraff 392-3900Pharmacy
Harris bharris 392-5555Medicine
Ipswich zipswich846-5656PHHP
Toensurethateachrecordisuniqueineach
table,wecansetonefieldtobeaPrimaryKey
field.
APrimaryKeyisafieldthatthatwillcontain
noduplicatesandnoblankvalues.
ForeignKeyslinktodatainothertables

DATA MODELS
1.HIERARCHICAL
2.NETWORK
3.RELATIONAL
4.OBJECT

1. HIERARCHICAL MODEL
Storesdataashierarchicallyrelatedtoeach
other.Recordshapearetreestructure.
BUET
Faculty of
Civil Engineering
Faculty of
Architectural
CE WRE URP Archit.

HIERARCHICAL DATABASE MODEL

HIERARCHICALDATABASEMODEL
•Logicallyrepresentedbyanupsidedown
tree
–Eachparentcanhavemanychildren
–Eachchildhasonlyoneparent

HIERARCHICAL MODEL
•Severalrecordsorfilesarehierarchicallyrelatedwitheach
other.Forexample,anorganizationhasseveraldepartments,
eachofwhichhasattributessuchasnameofdirector,number
ofstaffs,annualproductsetc.
•Eachdepartmenthasseveraldivisionswithattributesofname
ofmanager,numberofstaffs,annualproductsetc.
•Theneachdivisionhasseveralsectionswithattributessuchas
nameofhead,numberofstaff,numberofPCsetc.

Advantage and Disadvantages of
Hierarchical Model
Advantages
Highspeedaccesstolargedatabases
Easytoupdate-(toaddordeletenewnodes)
Disadvantages
LinksareonlypossibleinVerticalDirection(fromtopto
bottom)butnotforhorizontalordiagonalunlessthey
havesameparents.
Forexample,itishardtofindwhatistherelation
betweenURPandDCEfromthisdatamodel.

2. NETWORK DATABASE MODEL
•Doesn’tforcedataintohierarchicallevels
•Owner/Memberrelationships:
–Ownerrecordtype
–Memberrecordtype
•Eachownermayhaveoneormoremembertypes
•Eachmembertypeandcorrespondingownerrecord
typeformset,whichrepresentsrelationship

Network Database Model

Network Database Model
•Each record can have multiple parents
–Composed of sets -relationships
–Each set has owner record and member record
–Member may have several owners
–A set represents a 1:M relationship between the
owner and the member
Figure 1.10

3. RELATIONAL MODEL
•Based on two important
concepts:
–Key of relation-one to
one, one to many, many to
many
–Primary attribute–which
can’t be duplicate
Student
ID
Name CourseID
1 Mr. X 001
2 Mr. X 002
3 Mr. Y 003
Cour
seID
Title Cre
dit
001RS & GIS in WM 3
002Watershed Hydrology3
003Risk Management 3
Coursetable
StudentTable
Student Table Course Table
* *
Many to many relationship

WHAT IS A RELATIONAL DATABASE?
•Adatabaseismorethanjustacollectionof
information.Suchasstudentandcourseinformation,
facultyandgrades.
•Adatabaseisarepresentationofthepeopleand
thingsyourbusinessneedstooperate,andtheway
thosepeopleandthingsrelatetoeachother.
•Adatabasesystemsupportsthebusinessrules
definedbythecustomer.

RELATIONSHIP TYPES
1.One-to-One:relationshipissinglevaluedinbothdirections.A
managermanagesonedepartment;adepartmenthasonly
onemanager.
2.One-to-Many:relationshipismulti-valuedinonedirection-
onerowintheparenttableisassociatedwithmanyrowsin
thedependenttable.Onedepartmenthasmanyemployees.
3.Many-to-Many:relationshipsaremulti-valuedinboth
directions.Thistypeofrelationshipcanbeexpressedina
tablewithacolumnforeachentity.(crosswalktable)-An
employeecanworkonmorethanoneproject,andaproject
canhavemorethanoneemployeeassigned.Employee,
Project,andEmployee/Projecttables.

Relational Database Model

Relational Database Model
Figure 1.11

WHAT IS QUERY LANGUAGE?
•Querylanguage(QL)referstoanycomputer
programminglanguagethatrequestsand
retrievesdatafromdatabaseandinformation
systemsbysendingqueries.

WHAT IS QUERY ?
Aqueryisarequestforinformationfroma
database.

SQL
Whatisit?
StructuredQueryLanguage
•UsedinORACLEandotherDBsystems
•Non-procedural-i.e.Specifywhatyouwantnothow
togetit
•SQL-(alsopronouncedSEQUEL)
directlyrelatedtothedevelopmentofthe
RELATIONALMODELbyE.F.Codd.

SQL
•SQLisusedtoperformqueryinrelationsdatabases.
•Forexample,findthenameofthestudentwhotook
morethanorequalto6credithourinthisterm
SELECTStudent.Name,Course.Credit
FROMStudent,Course
WHEREStudent.CourseID=Course.CourseID
ANDCredit>=6
•Theansweris:
Mr.X6

Find the relationship between this two
tables in the BUET Library
ISBN Title Author
050 Applied
Hydrology
David
Maidmen
060 IrrigationCheng
ID Name ISBN
1 Mr. P050
2 Mr. Q060
3 Mr. R070
Book Table
Borrow Table
One to one
Many to Many
One to Many
?

Advantage of Relational Database
Advantages
thereisnoredundancy.
typeofbuildingofanownercanbechangedwithoutdestroyingthe
relationbetweentypeandrate.
anewtypeofbuildingforexample"Clay"canbeinserted.(rowinsert
iseasy).
Disadvantages
Requireanumberoftablesandrelationship
Itsdifficulttoaddanewcolumninthetable.

4. OBJECT DATABASES
•Currentgenerationsystemshaveaneedtohandlecomplex
dataforcomplexapplicationssuchas
–computeraideddesign
–computeraidedsoftwareengineering
–geographicinformationsystems
–interactivewebsites
•Relationalsystemsareinadequateforthesesystems
–Whydoyouthinkthisis?

Object Database Types
•Object-oriented
–extendaprogramminglanguagesuchasJavawith
persistencyandaquerylanguage
•Object-relational
–extendacurrentRDBMS(e.g.Oracle)withobject-
orientedextensions

Object Oriented Model
BUET
Departments Institutes
CE
WRE
DCE IWFM
URP
AIT
Faculty, Staff, StudentsAttributes:
Is a
Is a Is a
Is a = Inheritance
Part of = association
Part of
Part of

OBJECT ORIENTED DATABASE
•AnObjectOrientedmodelusesfunctionstomodelspatialandnon-
spatialrelationshipsofgeographicobjectsandtheattributes.
•Anobjectisanencapsulatedunitwhichischaracterizedbyattributes,
asetoforientationsandrules.Anobjectorientedmodelhasthe
followingcharacteristics.
•GENERICPROPERTIES:thereshouldbeaninheritancerelationship.
•ABSTRACTION:objects,classesandsuperclassesaretobegenerated
byclassification,generalization,associationandaggregation.
•ADHOCQUERIES:userscanorderspatialoperationstoobtainspatial
relationshipsofgeographicobjectsusingaspeciallanguage.