Description:
Welcome to the comprehensive guide on Relational Database Management System (RDBMS) concepts, tailored for final year B.Sc. Computer Science students affiliated with Alagappa University. This document covers fundamental principles and advanced topics in RDBMS, offering a structured appr...
Description:
Welcome to the comprehensive guide on Relational Database Management System (RDBMS) concepts, tailored for final year B.Sc. Computer Science students affiliated with Alagappa University. This document covers fundamental principles and advanced topics in RDBMS, offering a structured approach to understanding databases in the context of modern computing. PDF content is prepared from the text book Learn Oracle 8I by JOSE A RAMALHO.
Key Topics Covered:
Main Topic : Introduction to Database Management System
Sub-Topic :
DBMS Definition, Database System Applications, Purpose of database system, View of data (Data Abstraction, Instance and Schema, Data Model, Database Languages- Data Manipulation language and data definition language), Relational databases (DDL, DML , database access from other application programs), Database design (Design process,Database design for banking enterprise, The entity relationship model, Normalization), Object based data model, semi structured data model, data structure and querying, storage manager, The query processor, Transaction management, Database architecture, database users and administrators, History of database system
Target Audience:
Final year B.Sc. Computer Science students at Alagappa University seeking a solid foundation in RDBMS principles for academic and practical applications.
URL for previous slides
Unit V
Chapter 20:
https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter20-transaction/270998760
Chapter 19:
https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter19-cursor-in-pl-sql/270998251
Chapter 18: https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter18-packages-pdf/270845026
Chapter 17: https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter17-stored-procedures-and-functions/270844763
Chapter 16 : https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter16-trigger-creation/270631080
Chapter 15 : https://www.slideshare.net/slideshow/lecture-notes-unit5-chapter-15-pl-sql-programming/270383949
About the Author:
Dr. S. Murugan is Associate Professor at Alagappa Government Arts College, Karaikudi. With 23 years of teaching experience in the field of Computer Science, Dr. S. Murugan has a passion for simplifying complex concepts in database management.
Disclaimer:
This document is intended for educationalpurpose
Size: 919.18 KB
Language: en
Added: Aug 28, 2024
Slides: 69 pages
Slide Content
RDBMS -Unit I
Chapter 1
Introduction
Prepared By
Dr.S.Murugan, Associate Professor
Department of Computer Science,
AlagappaGovernmentArts College, Karaikudi.
(Affiliated by AlagappaUniversity)
Mailid: [email protected]
Reference Book:
Database System Concepts by Abraham Silberschatz,
Henry F.Korth, S. Sudharshan
1.2 Purpose of Database Systems
➢ThepurposeofDatabasesystemisresponsetoearly
methodsofcomputerizedmanagementof
commercialdata.
➢Forexample,inbankingenterprise,Toallowusersto
manipulatetheinformation,thesystemhasanumber
ofapplicationprogramsthatmanipulatesthefiles,
includingprogramsto:
➢Debit or credit an account
➢Add a new account
➢Find the balance of an account
➢Generate monthly statements
➢Systemprogrammerswrotetheseapplication
programstomeettheneedsofthebank.
1.2 Purpose of Database Systems
➢Beforedatabasemanagementsystems(DBMSs)came
along,organizationswereusedthefileprocessing
system.Thedrawbacksoffileprocessingsystemsare:
Dataredundancy:Thesameinformationmaybe
duplicatedinseveralplaces(files).
➢Forexample,theaddressandtelephonenumberofa
particularcustomermayappearinafilethatconsists
ofsavings-accountrecordsandchecking-account
records.
➢Thisredundancyleadstohigherstorageandaccess
cost.
1.2 Purpose of Database Systems
Datainconsistency:Thevariouscopiesofthesamedata
maynolongeragree.
Forexample,achangedcustomeraddressmaybe
reflectedinsavings-accountrecordsbutnotelsewherein
thesystem.
1.2 Purpose of Database Systems
Difficulty in accessing data:Retrieve the information
based on the particular selection criteria.
➢Forexample,thebankofficersneedstofindoutthe
namesofallcustomerswholivewithinaparticular
postal-codearea.
➢Thebankofficerhasnowtwochoices:eitherobtain
thelistofallcustomersandextracttheneeded
informationmanuallyoraskasystemprogrammerto
writethenecessaryapplicationprogram.
➢Thequerymaybedifferentfromtimetotime.So,the
programmerneedtowriteprogramforeveryquery.
1.2 Purpose of Database Systems
Dataisolation:Thedataarescatteredinvariousfiles,
andfilesmaybeindifferentformats,writingnew
applicationprogramstoretrievetheappropriatedatais
difficult.
Integrityproblems:Thedatavaluesstoredinthe
databasemustsatisfycertaintypesofconsistency
constraints.
Forexample,theminimumbalanceofbankaccountsmay
neverfallbelowaprescribedamount(say,Rs.1000)
1.2 Purpose of Database Systems
Dataisolation:Thedataarescatteredinvariousfiles,
andfilesmaybeindifferentformats,writingnew
applicationprogramstoretrievetheappropriatedatais
difficult.
Integrityproblems:Thedatavaluesstoredinthe
databasemustsatisfycertaintypesofconsistency
constraints.
Forexample,theminimumbalanceofbankaccountsmay
neverfallbelowaprescribedamount(say,Rs.1000)
1.2 Purpose of Database Systems
Atomicityproblems:Acomputersystem,Iikeanyother
mechanicalorelectricaldevice,issubjecttofailure.
Ifafailureoccurs,thedatashouldberestoredtothe
consistentstate.
➢ConsideraprogramtotransferRs.1000fromaccount
AtoaccountB.
➢Ifasystemfailureoccursduringtheexecutionofthe
Program,itispossiblethattheRs.1000wasdebitted
fromaccountAbutwasnotcreditedtoaccountB,
resultinginaninconsistentdatabasestate.
1.2 Purpose of Database Systems
Concurrent-accessanomalies:Manysystemsallows
multipleuserstoupdatethedatasimultaneously.
Theinteractionofconcurrentupdatesispossibleandmay
resultininconsistentdata.
➢Forexample,Iftwocustomerswithdrawntheamount
Rs.1000,Rs.500fromAccountA.(Thecurrent
balanceofAccountAmaybe5000.)
➢Ifthetransactionissimultaneousthenthedatamaybe
storedaseither4000or4500insteadof3500.
1.2 Purpose of Database Systems
Securityproblems:Noteveryuserofthedatabase
systemshouldbeabletoaccessaallthedata.
➢Forexample,inabankingsystem,payrollpersonnel
needtoseeonlythepartofthedatabasesystem.
1.3 View of Data
➢Adatabasesystemisacollectionofinter-relateddata
andasetofprogramsthatallowuserstoaccessand
modifythesedata.
➢Amajorpurposeofadatabasesystemistoprovide
userswithanabstractviewofthedata.Thatis,the
systemhidescertaindetailsofhowthedataarestored
andmaintained.
1.5 Relational Databases
A relational database is based on the relational model and
uses a collection of tables to represent both data and the
relationships among those data.
1.5.1 Table
➢Eachtablehasmultiplecolumns,andeachcolumnhas
auniquename.
➢Figure1.2presentsasamplerelationaldatabase
comprisingthreetables:
➢oneshowsdetailsofbankcustomers,thesecond
showsaccounts,andthethirdshowswhichaccounts
belongtowhichcustomers
1.5 Relational Databases
1.5.2 Data-Manipulation Language
➢ThequerylanguageofSQLisnonprocedural.Ittakes
asinputseveraltables(possiblyonlyone)andalways
returnsasingletable.
➢HereisanexampleofanSQLquerythatfindsthe
namesofallcustomerswhoresideinHarrison:
1.5.3 Data-Definition Language
➢SQLprovidesarichDDLthatallowsonetodefine
tables,integrityconstraints,assertions,etc.
➢Forinstance,thefollowingstatementintheSQL
languagedefinestheaccounttable:
1.6.3 The Entity-Relationship Model
ERModel:Entity-Relationmodelisbasedonthenotion
ofreal-worldentitiesandtherelationshipbetweenthem.
AnERmodelconsistsofacollectionofbasicobjects,
calledentities,andofrelationshipsamongtheseObjects.
Entity:Anentityisa"thing"or"object"intherealworld
thatisdistinguishablefromotherobjects.Forexample,
eachpersonisanentity,andbankaccountscanbe
consideredasentities.
1.6.3 The Entity-Relationship Model
Entities:Entitiesaredescribedinadatabasebyasetof
attributes.Forexample,attributescustomer-name,
customer-street,addressandcustomercitymaydescribea
customerentity.
Relationship:Arelationshipisanassociationamong
severalentities.Forexample,adepositorrelationship
associatesacustomerwithaccountno.
Entityset:Thesetofallentitiesofthesametypeis
termedasanentityset.
Relationshipset:Thesetofallrelationshipsofthesame
typeistermedasrelationshipset.
1.6.3 The Entity-Relationship Model
➢Theoveralllogicalstructure(schema)ofadatabase
canbeexpressedgraphicallybyanE-Rdiagram.It
containsthefollowingcomponents.
➢Rectangles,whichrepresententitysets
➢Ellipses,whichrepresentattributes
➢Diamonds,whichrepresentsetsofrelationships
➢Lines,whichlinkattributestoentitysetsand
entitysetstorelationships.
1.6.3 The Entity-Relationship Model
➢TheE-Rdiagramindicatesthattherearetwoentity
sets,customerandaccountwithasetofattributes.The
diagramalsoshowsarelationshipdepositorbetween
customerandaccount.
1.8.1 Storage Manager
A storage manager is a program module that provides
the interface between the low level data stored in the
database and the application programs and queries
submitted to the system.
The storage manager translates the various DML
statements into low-level file-system commands.
Thus, the storage manager is responsible for storing,
retrieving, and updating data in the database.
Transaction -Example
Account AAccount B State
Initial
Balance
5000 10000
Rs. 2000 Transferred from Account A to Account B
5000
3000
10000
12000
Atomicity
(Either Old or new)
3000 12000
Consistency
3000 12000
Durability (Permanent
changes into the
database)
1.11 Database Architecture
➢TheDatabaseapplicationsareusuallypartitionedinto
twoorthreeparts,asinFigure1.7.
➢Inatwo-tierarchitecture,theapplicationisresidesat
theclientmachine,whichinvokesdatabasesystem
functionalityattheservermachinethroughquery
languagestatements.
➢ApplicationPrograminterfacestandardslikeODBC
andJDBCareusedforinteractionbetweentheclient
andtheServer.
Client Request to Server (Select * from emp)
Server Receives request and response to client.
1.13 History of Database Systems
❑1950s and early 1960s:
➢Data processing using magnetic tapes for storage.Tapes
provided only sequential access.
➢Punched cards for input
❑Late 1960s and 1970s:
➢Hard disks allowed direct access to data
➢Network and hierarchical data models in widespread use
➢Ted Codddefines the relational data model
➢Would win the ACM Turing Award for this work
➢IBM Research begins System R prototype
➢UC Berkeley begins Ingres prototype
➢High-performance (for the era) transaction processing
1.13 History of Database Systems
❑1980s:
➢Research relational prototypes evolve into commercial
systems
➢SQL becomes industrial standard
➢Parallel and distributed database systems
➢Object-oriented database systems
❑1990s:
➢Large decision support and data-mining applications
➢Large multi-terabyte data warehouses
➢Emergence of Web commerce
❑Early 2000s:
➢XML and XQuery standards
➢Automated database administration
❑Later 2000s:
➢Giant data storage systems
➢Google BigTable, Yahoo PNuts, Amazon, ..