Professional Documents
Culture Documents
Review
Review
►Store data
►Update data
► More recent:
Semi-structured Data (XML)
Scientific data
Biological data
Sensor network data etc etc…
Naïve solutions
► Don’t offer:
Consistency
►Atomicity, durability etc
Concurrency
Declarative data retrieval
Control of redundancy
Dynamic data evolution
DBMS
► Database Management Systems provide
Data abstraction
► Key in evolving systems
► Probably the most important purpose of a DBMS
► Goal: Hiding low-level details from the users of the system
1. Data Modeling
2. Data Retrieval
3. Data Storage
4. Data Integrity
Data Modeling
► A data model is a collection of concepts for describing
data properties and domain knowledge:
Data relationships
Data semantics
Data constraints
► We discussed two models:
Entity-relationship Model
► Diagrammatic representation
► Easier to work with
► Syntax not important, but remember the “meaning”
► Remember what you can model
Relational Model
► Only one abstract concept
► Closer to the physical representation on disk
► Normalization
Data Retrieval
► Query = Declarative data retrieval program
describes what data to acquire, not how to acquire it
Non-declarative:
► scan the accounts file
► look for number 55 in the 2nd field
► subtract $50 from the 3rd field
Declarative (posed against the tables abstraction):
update accounts
set balance = balance - 50
where acct_no = 55
► Why ?
Easier to write
More efficient to execute
► Database system can decide how to execute it
Data Storage
► Where and how to store data ?
Main memory ?
► What if the database larger than memory size ?
Disks
► We discussed properties of disks
► RAID
► How to move data between memory and disk ?
Buffer Management
► LRU, MRU, Clock
Indexes
► Closelytied to data retrieval
► B+-trees, Hashing
Data Integrity