MatshushimaSumaya
2,717 views
57 slides
Nov 25, 2022
Slide 1 of 57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
About This Presentation
Organizing Data in a Traditional File Environment
File organization Term and Concepts
Computer system organizes data in a hierarchy
Bit: Smallest unit of data; binary digit (0,1)
Byte: Group of bits that represents a single character
Field: Group of characters as word(s) or number
Record: Group of r...
Organizing Data in a Traditional File Environment
File organization Term and Concepts
Computer system organizes data in a hierarchy
Bit: Smallest unit of data; binary digit (0,1)
Byte: Group of bits that represents a single character
Field: Group of characters as word(s) or number
Record: Group of related fields
File: Group of records of same type
Size: 619.06 KB
Language: en
Added: Nov 25, 2022
Slides: 57 pages
Slide Content
Database Management
Systems
Dr. Md. Rakibul Hoque
University of Dhaka
Organizing Data in a Traditional
File Environment
•File organization Term and Concepts
•Computer system organizes data in a hierarchy
•Bit:Smallestunitofdata;binarydigit(0,1)
•Byte:Groupofbitsthatrepresentsasingle
character
•Field:Groupofcharactersasword(s)or
number
•Record:Groupofrelatedfields
•File:Groupofrecordsofsametype
Organizing Data in a Traditional
File Environment
•File organization Term and Concepts
•Computer system organizes data in a hierarchy
•Database:Groupofrelatedfiles
•Entity:Person,place,thingonwhichwe
storeinformation.
•Attribute:Eachcharacteristic,orquality,
describingentity
•E.g.,AttributesDateorGradebelongtoentity
COURSE
The Data Hierarchy
A computer system
organizes data in a
hierarchy that starts
with the bit, which
represents either a 0 or
a 1. Bits can be
grouped to form a byte
to represent one
character, number, or
symbol. Bytes can be
grouped to form a field,
and related fields can
be grouped to form a
record. Related records
can be collected to form
a file, and related files
can be organized into a
database.
Organizing Data in a Traditional
File Environment
Traditional File Processing
The use of a traditional approach to file processing encourages each
functional area in a corporation to develop specialized applications and files.
Each application requires a unique data file that is likely to be a subset of the
master file. These subsets of the master file lead to data redundancy and
inconsistency, processing inflexibility, and wasted storage resources.
Organizing Data in a Traditional
File Environment
Some Commercial Database
Management Software
For Personal Computers
1. Microsoft Access
2. FoxPro
3. dBase
Some Commercial Database
Management Software
1.Oracle –Oracle 8i, Oracle9i, Oracle 10g, 11g
2. Microsoft SQL Server
3. IBM DB2/DB2UDB
4. Informix
5. Sybase
6. Ingress
Some Open Source Database
Management Software
1. CUBRID
2. Firebird
3. MariaDB
4. MongoDB
5. Postgre SQL
6. MySQL
7. SQLite
Database Systems Vs File
Systems ( Why DBMS?)
Ordinaryfilesystemhasanumberofmajor
drawbacks:
1.Dataredundancyandinconsistency-
Multiplefileformats,duplicationof
informationindifferentfiles.
2.Difficultyin accessing data
-Needtowriteanewprogramtocarryout
eachnewtask
Database Systems Vs File
Systems ( Why DBMS?)
3.Dataisolation
-Multiplefilesand formats
4.Integrityproblems
-Integrityconstraints(e.g.account
balance>0)becomepartofprogram
code
-Hardtoaddnewconstraintsor
changeexistingones.
Database Systems Vs File
Systems ( Why DBMS?)
5.Atomicityproblems
-Failuresmayleavedatabaseinan
inconsistentstatewithpartialupdates
carriedout.E.g.,transferoffundsfrom
oneaccounttoanothershouldeither
completeornothappenatall.
Database Systems Vs File
Systems ( Why DBMS?)
6.Concurrent-accessanomalies
-Neededforsystemperformanceand
usability
-Uncontrolledconcurrentaccesses
canleadtoinconsistencies.E.g.two
peoplereadingabalanceandupdating
itatthesametime.
Database Systems Vs File
Systems ( Why DBMS?)
7.Securityproblems:Noteveryuserof
thedatabasesystemshouldbeableto
accessallthedata.
Databasesystemsoffersolutionsto
alltheseproblems
View of Data
Adatabasesystemisacollectionof
interrelatedfilesandsetofprograms
thatallowuserstoaccessandmodify
thesefiles.Amajorpurposeofa
databasesystemistoprovideusers
anabstractviewofthedata.Thatis,
thesystemhidescertaindetailsofhow
thedataisstoredandmaintained.
Data Abstraction
Severallevelsofdataabstractionare
maintainedtosimplifyusers’interaction
withthesystem:
1.Physicallevel:Thelowestlevelof
abstractiondescribeshowdataare
actuallystored.Itdescribescomplex
low-leveldatastructuresindetail.
Data Abstraction
2.Logicallevel:Thenexthigherlevel
ofabstractiondescribeswhatdata
storedindatabase,andwhat
relationshipsexistamongthosedata.
Thelogicallevelthusdescribesthe
entiredatabaseintermsofanumberof
relativelysimplestructures.
Data Abstraction
For Example:
create table customer (
customer_id varchar(10),
customer_name varchar (35),
customer_street varchar (20),
salary number (10,2));
Data Models
Adatamodelisacollectionof
conceptualtoolsfordescribingdata,
datarelationship,datasemanticsand
consistencyconstraints.
A.BaseModels:Describesthe
designofthedatabaseatthelogical
level.
Data Models
A.1.Entity-RelationshipModel:This
isahigher-leveldatamodel.Itis
basedonaperceptionofarealworld
thatconsistsofacollectionofbasic
objects,calledentitiesandthe
relationshipamongtheseobjects.
Data Models
Entity:Anentityisa“thing”or“object”
intherealworldthatisdistinguishable
fromallotherobjects.Anentityhasaset
ofproperties,calledattributesandthe
values for some set of
properties/attributesmay uniquely
identifyanentity.Anentitymaybe
concrete,suchasapersonorabook,
oritmaybeabstract,suchasloan,ora
holiday,oraconcept.
Data Models
customer-customer-id,customer-
name,customer-street,customer-city
loan–loan-number,amount
Data Models
Therelationalmodelisthemostwidely
useddatamodelandavastmajorityof
currentdatabasesystemsarebased
on the relationalmodel.
Therelationalmodelisatalowerlevel
ofabstractionthantheE-Rmodel.
Databasedesignsareoftencarriedout
intheE-Rmodelandthentranslated
totherelationalmodel.
Data Models
Data Models
B. Other Models:
B.1.Object-orienteddatamodel:Drawing
increasingattention.Itcanbeseenasextendingof
E-Rmodelwithnotionsofencapsulation,methods
(functions)andobjectidentity.
Anobjectdatabase(alsoobject-oriented
databasemanagementsystem,OODBMS) isa
databasemanagementsysteminwhichinformation
isrepresentedintheformofobjectsasusedin
object-orientedprogramming.Objectdatabases
aredifferentfromrelationaldatabaseswhichare
table-oriented.
Data Models
Data Models
B.2.Object-relationaldatamodel:Combinesthe
featuresofobject-orienteddatamodeland
relationaldatamodel.
Anobject-relationaldatabase(ORD),orobject-
relationaldatabasemanagement system
(ORDBMS),isadatabasemanagementsystem
(DBMS)similartoarelationaldatabase,butwithan
object-orienteddatabasemodel:objects,classes
andinheritancearedirectlysupportedindatabase
schemasandinthequerylanguage.