Documente Academic
Documente Profesional
Documente Cultură
Course Outline
Data Models
Entity-Relationship Model Relational Model
Physical Database Design Indexing Advanced Topics Data Mining Database Security Project Oracle? ODBC / JDBC/ Pro*C PHP
Relational Database
Relational Database Design
Object-Oriented Database
OODB
Querying
Relational Algebra SQL
Transaction Management
Concurrency Control Recovery System
1.2
Introduction to Database
Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction Management Storage Management Database Administrator Database Users Overall System Structure
1.3
Computation Data Generation Networking Data Communication Operating System Data Organization Security Data Protection Protocol Data Representation Intelligence Knowledge generation from Data
1.4
1.5
Advantages
Cheap, simple, private, reliable, space efficient
Disadvantages
Hard to search, update (modify entries), share Hard to add information, e.g., email addresses Hard to extract information, e.g., Xmax card label What about integrity What about consistency
1.6
Better:
Can now keep entries sorted by principal key, e.g., name Insertions, deletions, and updates can be done
But:
All other disadvantages of Solution 1 still apply In particular, no easier search by other keys, e.g., phone number
1.7
1.8
Solution
Structure data into fields Add indexes over fields commonly searched upon
Database concepts
Record organization Keys Indexes
1.9
Solution
2 files, one for persons, one for residence But how do we associate a residence with a person? How many residences can a person have? 0? 1? Several?
Database Concepts
Consistency Normalization Foreign keys
1.10
Examples:
Many-many (rich folks), many-one (single family), one-many (builder), one-one (legal residence)
Database concepts
Relationships Cardinality
1.11
Requirements
Adding fields Generating summary information (labels)
Database Concepts
Data abstraction Data evolution
1.12
Requires:
Language for expressing analysis and retrieval Implementation that performs analysis and retrieval correctly and efficiently
Database Concepts
Query languages Query optimization and execution
1.13
Solution
Use stored queries as windows onto the database Can reunite data associated across different files Data not selected by query is not there
Database Concepts
Joins Views Security and Privacy
1.14
Solutions
Refuse to insert a name unless it is associated with an address Refuse to delete an address if it is associated with a name Or, tolerate multiple non-unique names
Database Concepts
Referential integrity Weak entity sets
1.15
Solutions:
Use data organization to define corresponding data types Use access library to open, retrieve, update data
Database Concepts
Database Schemas API Embedded querying
1.16
Solutions
Present illusion that all updates are done simultaneously Implemented by commit or rollback of entire piece of work
Database concepts
Transactions Atomicity
1.17
Solution
Make sure old data are safely accessible until latest commit
Database Concepts
Data durability Recovery
1.18
A common policy:
Transactions are atomic They appear to run one after the other, in some order
Database Concepts
Transaction isolation Concurrency control Transaction serializability
1.19
Solutions
Personal data on the home computer Business data on the business computer Common logical view
Database Concepts
Distributed databases Data partitioning Data replication
1.20
Requirements
Clearly, ability to capture, store and play new media Logical integration into existing data Querying: all photos of the green vase that just broke
Database Concepts
Multi-media data Query by content
1.21
But
Aunt Sarah is paranoid: will not reveal birthdates You too: You dont want your business associates in the genealogy database Everyone wants complete control over safety of their own data
Database Concept
Federated databases
1.22
Examples
Which are top 10 zip codes on the list? Which zip codes have addresses that are most likely to send cards to you when you send cards to them? Which of those zip codes are in states that had less than 5% difference in Republican / Democratic presidential votes in 2000?
Database Concept
Data mining
1.23
Introduction to Database
Database Modeling
Mapping Real Life to Computer
Database Design
Efficiently organize data Search Update
Database Management
Security Performance Availability Scalability Reliability
1.24
1.25
1980s
Commercial relational databases DB2, Oracle, Informix, Sybase, DEC Rdb
Early 1990s
Development of SQL Object-oriented support
Database System Concepts
Late 1990s
Development of Internet Distributed Database
1.26 Yaohang Li, NCAT
Database Applications
Database Applications:
Banking: all transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries, tax deductions Laboratory: experiment results
1.27
1.28
1.29