You are on page 1of 31

Chapter1:Introduction

Silberschatz,KorthandSudarshan Seewww.dbbook.comforconditionsonreuse

DatabaseSystemConcepts,5thEd.

Chapter1:Introduction
s PurposeofDatabaseSystems s ViewofData s DatabaseLanguages s RelationalDatabases s DatabaseDesign s Objectbasedandsemistructureddatabases s DataStorageandQuerying s TransactionManagement s DatabaseArchitecture s DatabaseUsersandAdministrators s OverallStructure s HistoryofDatabaseSystems

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

DatabaseManagementSystem(DBMS)
s DBMScontainsinformationaboutaparticularenterprise
q q q

Collectionofinterrelateddata Setofprogramstoaccessthedata Anenvironmentthatisbothconvenientandefficienttouse Banking:alltransactions Airlines:reservations,schedules Universities:registration,grades Sales:customers,products,purchases Onlineretailers:ordertracking,customizedrecommendations Manufacturing:production,inventory,orders,supplychain Humanresources:employeerecords,salaries,taxdeductions

s DatabaseApplications:
q q q q q q q

s Databasestouchallaspectsofourlives

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

PurposeofDatabaseSystems
s Intheearlydays,databaseapplicationswerebuiltdirectlyontopof

filesystems
q

s Drawbacksofusingfilesystemstostoredata:

Dataredundancyandinconsistency

Multiplefileformats,duplicationofinformationindifferentfiles Needtowriteanewprogramtocarryouteachnewtask

Difficultyinaccessingdata

q q

Dataisolationmultiplefilesandformats Integrityproblems

Integrityconstraints(e.g.accountbalance>0)become buriedinprogramcoderatherthanbeingstatedexplicitly Hardtoaddnewconstraintsorchangeexistingones

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

PurposeofDatabaseSystems(Cont.)
s Drawbacksofusingfilesystems(cont.)
q

Atomicityofupdates

Failuresmayleavedatabaseinaninconsistentstatewithpartial updatescarriedout Example:Transferoffundsfromoneaccounttoanothershould eithercompleteornothappenatall Concurrentaccessedneededforperformance Uncontrolledconcurrentaccessescanleadtoinconsistencies Example:Twopeoplereadingabalanceandupdatingitatthe sametime

Concurrentaccessbymultipleusers

Securityproblems

Hardtoprovideuseraccesstosome,butnotall,data

s Databasesystemsoffersolutionstoalltheaboveproblems

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

LevelsofAbstraction
s Physicallevel:describeshowarecord(e.g.,customer)isstored. s Logicallevel:describesdatastoredindatabase,andtherelationships

amongthedata.

typecustomer=record customer_id:string; customer_name:string; customer_street:string; customer_city:integer; end;


s Viewlevel:applicationprogramshidedetailsofdatatypes.Viewscan

alsohideinformation(suchasanemployeessalary)forsecurity purposes.

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

ViewofData
Anarchitectureforadatabasesystem

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

InstancesandSchemas
s s

Similartotypesandvariablesinprogramminglanguages Schemathelogicalstructureofthedatabase
q

Example:Thedatabaseconsistsofinformationaboutasetofcustomersand accountsandtherelationshipbetweenthem) Analogoustotypeinformationofavariableinaprogram Physicalschema:databasedesignatthephysicallevel Logicalschema:databasedesignatthelogicallevel Analogoustothevalueofavariable

q q q

Instancetheactualcontentofthedatabaseataparticularpointintime
q

PhysicalDataIndependencetheabilitytomodifythephysicalschemawithout changingthelogicalschema
q q

Applicationsdependonthelogicalschema Ingeneral,theinterfacesbetweenthevariouslevelsandcomponentsshouldbe welldefinedsothatchangesinsomepartsdonotseriouslyinfluenceothers.

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

DataModels
s Acollectionoftoolsfordescribing

Data q Datarelationships q Datasemantics q Dataconstraints


q

s Relationalmodel s EntityRelationshipdatamodel(mainlyfordatabasedesign) s Objectbaseddatamodels(ObjectorientedandObjectrelational) s Semistructureddatamodel(XML) s Otheroldermodels:


q q

Networkmodel Hierarchicalmodel

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

DataManipulationLanguage(DML)
s Languageforaccessingandmanipulatingthedataorganizedbythe

appropriatedatamodel
q

DMLalsoknownasquerylanguage Proceduraluserspecifieswhatdataisrequiredandhowtoget thosedata Declarative(nonprocedural)userspecifieswhatdatais requiredwithoutspecifyinghowtogetthosedata

s Twoclassesoflanguages
q

s SQListhemostwidelyusedquerylanguage

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

DataDefinitionLanguage(DDL)
s Specificationnotationfordefiningthedatabaseschema

Example: createtableaccount( accountnumberchar(10), balanceinteger)


s DDLcompilergeneratesasetoftablesstoredinadatadictionary s Datadictionarycontainsmetadata(i.e.,dataaboutdata)
q q

Databaseschema Datastorageanddefinitionlanguage

Specifiesthestoragestructureandaccessmethodsused Domainconstraints Referentialintegrity(referencesconstraintinSQL) Assertions

Integrityconstraints

Authorization

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

RelationalModel
s Exampleoftabulardataintherelationalmodel
Attributes

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

ASampleRelationalDatabase

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

SQL
s SQL:widelyusednonprocedurallanguage
q

Example:Findthenameofthecustomerwithcustomerid192837465 select customer.customer_name from customer where customer.customer_id=192837465 Example:Findthebalancesofallaccountsheldbythecustomerwith customerid192837465 select account.balance from depositor,account where depositor.customer_id=192837465and depositor.account_number=account.account_number LanguageextensionstoallowembeddedSQL Applicationprograminterface(e.g.,ODBC/JDBC)whichallowSQL queriestobesenttoadatabase

s Applicationprogramsgenerallyaccessdatabasesthroughoneof
q q

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

DatabaseDesign
Theprocessofdesigningthegeneralstructureofthedatabase:
s LogicalDesignDecidingonthedatabaseschema.Databasedesign

requiresthatwefindagoodcollectionofrelationschemas.
q

BusinessdecisionWhatattributesshouldwerecordinthe database? ComputerSciencedecisionWhatrelationschemasshouldwe haveandhowshouldtheattributesbedistributedamongthevarious relationschemas?

s PhysicalDesignDecidingonthephysicallayoutofthedatabase

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

TheEntityRelationshipModel
s Modelsanenterpriseasacollectionofentitiesandrelationships
q

Entity:athingorobjectintheenterprisethatisdistinguishable fromotherobjects

Describedbyasetofattributes

Relationship:anassociationamongseveralentities

s Representeddiagrammaticallybyanentityrelationshipdiagram:

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

ObjectRelationalDataModels
s Extendtherelationaldatamodelbyincludingobjectorientationand

constructstodealwithaddeddatatypes. valuessuchasnestedrelations.

s Allowattributesoftuplestohavecomplextypes,includingnonatomic s Preserverelationalfoundations,inparticularthedeclarativeaccessto

data,whileextendingmodelingpower.

s Provideupwardcompatibilitywithexistingrelationallanguages.

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

XML:ExtensibleMarkupLanguage
s DefinedbytheWWWConsortium(W3C) s Originallyintendedasadocumentmarkuplanguagenota

databaselanguage

s Theabilitytospecifynewtags,andtocreatenestedtagstructures

madeXMLagreatwaytoexchangedata,notjustdocuments formats.

s XMLhasbecomethebasisforallnewgenerationdatainterchange s Awidevarietyoftoolsisavailableforparsing,browsingand

queryingXMLdocuments/data

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

StorageManagement
s Storagemanagerisaprogrammodulethatprovidestheinterface

betweenthelowleveldatastoredinthedatabaseandtheapplication programsandqueriessubmittedtothesystem.
q q

s Thestoragemanagerisresponsibletothefollowingtasks:

Interactionwiththefilemanager Efficientstoring,retrievingandupdatingofdata Storageaccess Fileorganization Indexingandhashing

s Issues:
q q q

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

QueryProcessing
1. Parsingandtranslation 2. Optimization 3. Evaluation

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

QueryProcessing(Cont.)
s Alternativewaysofevaluatingagivenquery
q q

Equivalentexpressions Differentalgorithmsforeachoperation

s Costdifferencebetweenagoodandabadwayofevaluatingaquerycan

beenormous
q

s Needtoestimatethecostofoperations

Dependscriticallyonstatisticalinformationaboutrelationswhichthe databasemustmaintain Needtoestimatestatisticsforintermediateresultstocomputecostof complexexpressions

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

TransactionManagement
s Atransactionisacollectionofoperationsthatperformsasingle

logicalfunctioninadatabaseapplication

s Transactionmanagementcomponentensuresthatthedatabase

remainsinaconsistent(correct)statedespitesystemfailures(e.g., powerfailuresandoperatingsystemcrashes)andtransactionfailures. concurrenttransactions,toensuretheconsistencyofthedatabase.

s Concurrencycontrolmanagercontrolstheinteractionamongthe

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

DatabaseArchitecture
Thearchitectureofadatabasesystemsisgreatlyinfluencedby theunderlyingcomputersystemonwhichthedatabaseisrunning:
s Centralized s Clientserver s Parallel(multiprocessor) s Distributed

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

DatabaseUsers
Usersaredifferentiatedbythewaytheyexpecttointeractwith thesystem
s ApplicationprogrammersinteractwithsystemthroughDMLcalls s Sophisticatedusersformrequestsinadatabasequerylanguage s Specializeduserswritespecializeddatabaseapplicationsthatdo

notfitintothetraditionaldataprocessingframework havebeenwrittenpreviously
q

s Naveusersinvokeoneofthepermanentapplicationprogramsthat

Examples,peopleaccessingdatabaseovertheweb,banktellers, clericalstaff

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

DatabaseAdministrator
s Coordinatesalltheactivitiesofthedatabasesystem;the

databaseadministratorhasagoodunderstandingofthe enterprisesinformationresourcesandneeds.
q q q q q q q

s Databaseadministrator'sdutiesinclude:

Schemadefinition Storagestructureandaccessmethoddefinition Schemaandphysicalorganizationmodification Grantinguserauthoritytoaccessthedatabase Specifyingintegrityconstraints Actingasliaisonwithusers Monitoringperformanceandrespondingtochangesin requirements

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

OverallSystemStructure

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

HistoryofDatabaseSystems
s 1950sandearly1960s:
q

Dataprocessingusingmagnetictapesforstorage

Tapesprovideonlysequentialaccess

Punchedcardsforinput Harddisksallowdirectaccesstodata Networkandhierarchicaldatamodelsinwidespreaduse TedCodddefinestherelationaldatamodel


s Late1960sand1970s:
q q q

WouldwintheACMTuringAwardforthiswork IBMResearchbeginsSystemRprototype UCBerkeleybeginsIngresprototype

Highperformance(fortheera)transactionprocessing

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

History(cont.)
s 1980s:
q

Researchrelationalprototypesevolveintocommercialsystems

SQLbecomesindustrialstandard

q q

Parallelanddistributeddatabasesystems Objectorienteddatabasesystems Largedecisionsupportanddataminingapplications Largemultiterabytedatawarehouses EmergenceofWebcommerce XMLandXQuerystandards Automateddatabaseadministration

s 1990s:
q q q

s 2000s:
q q

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

EndofChapter1

Silberschatz,KorthandSudarshan Seewww.dbbook.comforconditionsonreuse

DatabaseSystemConcepts,5thEd.

Figure1.4

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

Figure1.7

DatabaseSystemConcepts5thEdition,May23,2005

1.<number>

Silberschatz,KorthandSudarshan

You might also like