Database System and Data Models - DBMS - MU

surabhigosavi 22 views 36 slides Jun 05, 2024
Slide 1
Slide 1 of 36
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

About This Presentation

DBMS


Slide Content

UNIT 1
Database System and Data Models
Database Management System
(09CE1302)
Department of Computer Engineering
Faculty of Diploma Studies
- Surabhi Palkar (Assistant Professor)
1

What is Data?
Prof. Surabhi PalkarDatabase Management System (09CE1302)
2

What is Data?
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Data is a collection of one or more values.
These values are nothing meaningful but raw, unstructured facts
and descriptions such as characters, numbers or any other data
type.
Generally, the data has no meaningful purpose or significance.
The data is processed appropriately to make it meaningful
otherwise it has little or no meaning to human beings.
3

What is Information?
4
Prof. Surabhi PalkarDatabase Management System (09CE1302)

What is Information?
5
Information is a set of organized or interpreted data that has
already been processed in a meaningful manner according to
given requirements.
It is processed, structured or presented in the desired context
to make it meaningful and useful so that human beings can
read, understand and use it.
Information is processed data that includes data with context,
relevance, and purpose which helps to reduce undetectability
and reduce uncertainty.
Prof. Surabhi PalkarDatabase Management System (09CE1302)

What is Database?
6
Prof. Surabhi PalkarDatabase Management System (09CE1302)

What is Database?
7
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Adatabaseisanorganizedcollectionofdata,sothatit
canbeeasilyaccessedandmanaged.
Youcanorganizedataintotables,rows,columns,and
indexittomakeiteasiertofindrelevantinformation.
Themainpurposeofthedatabaseistooperatealarge
amountofinformationbystoring,retrieving,and
managingdata.
Moderndatabasesaremanagedbythedatabase
managementsystem(DBMS).
SQLorStructuredQueryLanguageisusedtooperateon
thedatastoredinadatabase.

What is Database Management System?
8
Prof. Surabhi PalkarDatabase Management System (09CE1302)

What is Database Management System?
9
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Adatabase-managementsystem(DBMS)isacollectionof
interrelateddataandasetofprogramstoaccessthose
data.
Thecollectionofdata,usuallyreferredtoasthe
database,containsinformationrelevanttoanenterprise.
TheprimarygoalofaDBMSistoprovideawaytostore
andretrievedatabaseinformationthatisbothconvenient
andefficient.

What is File System?
10
Prof. Surabhi PalkarDatabase Management System (09CE1302)
AFileManagementsystemallowsaccesstosinglefilesor
tablesatatime.
InaFileSystem,dataisdirectlystoredinasetoffiles.
Itcontainsflatfilesthathavenorelationtootherfiles(when
onlyonetableisstoredinasinglefile,thenthisfileisknown
asaflatfile).
Thistypicalfile-processingsystemissupportedbya
conventionaloperatingsystem.
Thesystemstorespermanentrecordsinvariousfiles,andit
needsdifferentapplicationprogramstoextractrecordsfrom,
andaddrecordsto,theappropriatefiles.

What is Relational Database
Management System?
11
Prof. Surabhi PalkarDatabase Management System (09CE1302)
AnRDBMSisatypeofdatabasemanagementsystem
(DBMS)thatstoresdatainarow-basedtablestructure
whichconnectsrelateddataelements.
AnRDBMSincludesfunctionsthatmaintainthesecurity,
accuracy,integrityandconsistencyofthedata.
ThisisdifferentthanthefilestorageusedinaDBMS.

Advantages of DBMS over File System
12
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Data
Redundancy
Data
Inconsistency
Data Sharing
Data
Concurrency
Data
Searching
Data
Integrity
Data
Security
System
Crashing
Maintenance

Summary
13
Prof. Surabhi PalkarDatabase Management System (09CE1302)

Data Models
14
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Datamodelsarevisualrepresentationsofdataelementsand
connectionsbetweenthem.
Theyallowsustodecidehowdatawillbestored,accessed,
sharedandupdated.
Datamodelingistheprocessofdevelopingdatamodelforthe
datatobestoredinaDatabase.

Types of Data Models
15
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Data Models
1. Relational Data
Model
2. Entity Relationship
Data Model
3. Object based Data
Model
4. Semistructured
Data Model
5. Network Data
Model
6. Hierarchical Data
Model

Evolution of Data Model
16
Prof. Surabhi PalkarDatabase Management System (09CE1302)

Hierarchical Data Model
17
Prof. Surabhi PalkarDatabase Management System (09CE1302)
InHierarchicalModel,ahierarchicalrelationisformedby
collectionofrelationsandformsatree-likestructure.
Therelationshipcanbedefinedintheformofparentchild
type.

Hierarchical Data Model
18
Prof. Surabhi PalkarDatabase Management System (09CE1302)
ThehierarchicalModelisoneoftheoldestmodelsinthedata
modelwhichwasdevelopedbyIBM,inthe1950s.
Inahierarchicalmodel,dataareviewedasacollectionof
tables,orwecansaysegmentsthatformahierarchical
relation.
Inthis,thedataisorganizedintoatree-likestructurewhere
eachrecordconsistsofoneparentrecordandmanychildren.

Network Data Model
19
Prof. Surabhi PalkarDatabase Management System (09CE1302)
TheHierarchicalModelcreateshierarchicaltreewithparent/
childrelationship,whereastheNetworkModelhasgraphandlinks.
Therelationshipcanbedefinedintheformoflinksandithandles
many-to-manyrelations.Thisitselfstatesthatarecordcanhave
morethanoneparent.

Network Data Model
20
Prof. Surabhi PalkarDatabase Management System (09CE1302)
TheNetworkModelwasformalizedbytheDatabaseTaskgroup
inthe1960s.
Thismodelisthegeneralizationofthehierarchicalmodel.
Thismodelcanconsistofmultipleparentsegmentsandthese
segmentsaregroupedaslevelsbutthereexistsalogical
associationbetweenthesegmentsbelongingtoanylevel.
Mostly,thereexistsamany-to-manylogicalassociation
betweenanyofthetwosegments.

Relational Data Model
21
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Thistypeofmodeldesignsthedataintheformofrowsand
columnswithinatable.
Thus,arelationalmodelusestablesforrepresentingdataand
in-betweenrelationships.Tablesarealsocalledrelations.
ThismodelwasinitiallydescribedbyEdgarF.Codd,in1969.
Therelationaldatamodelisthewidelyusedmodelwhichis
primarilyusedbycommercialdataprocessingapplications.

Entity-Relationship Data Model
22
Prof. Surabhi PalkarDatabase Management System (09CE1302)
AnERmodelisthelogicalrepresentationofdataasobjects
andrelationshipsamongthem.
Theseobjectsareknownasentities,andrelationshipisan
associationamongtheseentities.
ThismodelwasdesignedbyPeterChenandpublishedin1976
papers.Itwaswidelyusedindatabasedesigning.
Asetofattributesdescribetheentities.
Forexample,student_name,student_iddescribesthe
'student'entity.

Object based Data Model
23
Prof. Surabhi PalkarDatabase Management System (09CE1302)
AnextensionoftheERmodelwithnotionsoffunctions,
encapsulation,andobjectidentity,aswell.Thismodelsupportsa
richtypesystemthatincludesstructuredandcollectiontypes.
Thus,in1980s,variousdatabasesystemsfollowingtheobject-
orientedapproachweredeveloped.
Here,theobjectsarenothingbutthedatacarryingitsproperties.
IntheObject-OrientedDataModel,dataandtheirrelationshipsare
containedinasinglestructurewhichisreferredtoasanobjectin
thisdatamodel.
Inthis,real-worldproblemsarerepresentedasobjectswith
differentattributes.Allobjectshavemultiplerelationships
betweenthem.
Basically,itisacombinationofObjectOrientedprogramminganda
RelationalDatabaseModel.

Semi-structured Data Model
24
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Thistypeofdatamodelisdifferentfromtheotherthreedata
models.
Thesemistructureddatamodelallowsthedataspecificationsat
placeswheretheindividualdataitemsofthesametypemayhave
differentattributessets.
TheExtensibleMarkupLanguage,alsoknownasXML,iswidelyused
forrepresentingthesemistructureddata.
AlthoughXMLwasinitiallydesignedforincludingthemarkup
informationtothetextdocument,itgainsimportancebecauseof
itsapplicationintheexchangeofdata.
Semi-Structureddatamodelsdealwiththedatainaflexibleway.
Someentitiesmayhaveextraattributesandsomeentitiesmay
havesomemissingattributes.Basically,youcanrepresentdata
hereinaflexibleway.

Advantages of Data Models
25
Prof. Surabhi PalkarDatabase Management System (09CE1302)
DataModelshelpusinrepresentingdataaccurately.
Ithelpsusinfindingthemissingdataandalsoinminimizing
DataRedundancy.
DataModelprovidesdatasecurityinabetterway.
Thedatamodelshouldbedetailedenoughtobeusedfor
buildingthephysicaldatabase.
Theinformationinthedatamodelcanbeusedfordefining
therelationshipbetweentables,primaryandforeignkeys,
andstoredprocedures.

Basic Building blocks of Data Models
26
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Adatamodelconstitutesoffollowingbuildingblocks:
Entities
Attributes
Relationships
Constraints

Basic Building blocks of Data Models
27
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Entities:Entitiesarerealtimeobjectsthatexist.Itcanbeaperson,
place,object,event,concept.Entitiesarerepresentedbyarectanglebox
containingtheentitynameinit.Example:Student,employee.
Attributes:Itisthesetofcharacteristicsrepresentinganentity.Itis
representedbyaellipsesymbolwithattributenameonit.Example:A
studenthasattributeslikename,rollnumber,ageandmuchmore.
Relationship:Itdescribestheassociationbetweentwoentities.Itis
representedusingdiamondsymbolcontainingrelationshipnamewithit.
Thedatamodelgenerallyusesthreekindsofrelationships:onetomany,
manytomany,onetoone.Example:Therelationshipbetweentwo
entitiesStudentandClasshasmanytomanyrelationship.
Constraints:Constraintsareconditionsappliedonthedata.Itprovides
thedataintegrity.Example:Astudentcantakeamaximumof2books
fromthelibraryisappliedasaconstraintonthestudentdatabase.

Business Rules
28
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Businessrulesaresetofapprovedguidelinesorframework
withinanorganization.Theysimplifydailyoperationsofany
organization.
Fromanengineeringperspective,abusinessruleissetof
reusablelogic.
Examples:
Hierarchyofdecisionmakingandapprovingcompanyinvoices
Companypoliciesintakingmedicalleave
Atdatabaselevel,businessruleswillbecomeconstraints.
Example:Eachcustomersinvoiceshouldhaveanunique
identifyingnumber.

Business Rules
29
Prof. Surabhi PalkarDatabase Management System (09CE1302)
SowhatareConstraints?
Thewordgivesyouthemeaning–Limitations!
Whatdowelimit?
Thebehavior/process/mechanism/patternoforganization.
Constraintsallowsyoutomaintainauniquestructureofthe
database.

What is Data Abstraction?
30
Prof. Surabhi PalkarDatabase Management System (09CE1302)

What is Data Abstraction?
31
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Dataabstractionistheprocedureofconcealingirrelevantor
unwanteddatafromtheenduser.

Degrees of Data Abstraction
32
Prof. Surabhi PalkarDatabase Management System (09CE1302)

1. Physical or Internal Level
33
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Thephysicalorinternallevelisthelowestlevelofdata
abstractioninthedatabasemanagementsystem.
Itisthelayerthatdefineshowdataisactuallystoredinthe
database.Itdefinesmethodstoaccessthedatainthedatabase.
Itdefinescomplexdatastructuresindetail,soitisverycomplex
tounderstand,whichiswhyitiskepthiddenfromtheenduser.
DataAdministrators(DBA)decidehowtoarrangedataandwhere
tostoredata.
TheDataAdministrator(DBA)isthepersonwhoseroleisto
managethedatainthedatabaseatthephysicalorinternallevel.
Thereisadatacenterthatsecurelystorestherawdataindetail
onharddrivesatthislevel.

2. Logical or Conceptual level
34
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Thelogicalorconceptuallevelistheintermediateornext
levelofdataabstraction.
Itexplainswhatdataisgoingtobestoredinthedatabaseand
whattherelationshipisbetweenthem.
Itdescribesthestructureoftheentiredataintheformof
tables.
Thelogicallevelorconceptuallevelislesscomplexthanthe
physicallevel.
Withthehelpofthelogicallevel,DataAdministrators(DBA)
abstractdatafromrawdatapresentatthephysicallevel.

3. View or External Level
35
Prof. Surabhi PalkarDatabase Management System (09CE1302)
VieworExternalLevelisthehighestlevelofdataabstraction.
Therearedifferentviewsatthislevelthatdefinethepartsof
theoveralldataofthedatabase.
Thislevelisfortheend-userinteraction;atthislevel,end
userscanaccessthedatabasedontheirqueries.

Advantages of Data Abstraction
36
Prof. Surabhi PalkarDatabase Management System (09CE1302)
Users can easily access the data based on their queries.
It provides security to the data stored in the database.
Database systems work efficiently because of data abstraction.
Tags