|
|
|
|
Database management systems: |
|
Provide efficient and secure access to large
amounts of data. |
|
Address problems such as: |
|
How to store the data |
|
How to query data efficiently |
|
How to update the data securely (by multiple
users) |
|
Contrast with using file systems for the same
task |
|
|
|
|
Based on the relational model |
|
|
|
|
|
|
|
|
|
|
|
|
|
Separates the logical view from the physical
view of the data. |
|
|
|
|
|
|
|
Find all the students who have taken 94.301 in
Fall 2001. |
|
S(tructured) Q(uery) L(anguage) |
|
select E.name |
|
from Enroll E |
|
where E.course=94.301 and |
|
E.quarter=“Fall 2001” |
|
Query processor figures out how to answer the
query efficiently. |
|
|
|
|
Relational databases are a great success of
theoretical ideas. |
|
“Big 3” DBMS companies are among the largest
software companies in the world. |
|
IBM (with DB2) and Microsoft (SQL Server,
Microsoft Access) are also important players. |
|
$20B industry |
|
Challenged by object oriented DBMS. |
|
|
|
|
Storage management |
|
Abstract data model |
|
High level query and data manipulation language |
|
Efficient query processing |
|
Transaction processing |
|
Resiliency: recovery from crashes |
|
Interface with programming languages |
|
|
|
|
Data independence and efficient access. |
|
Reduced application development time. |
|
Data integrity and security. |
|
Uniform data administration |
|
Concurrent access and recovery from crashes. |
|
|
|
|
|
Several aspects: |
|
Modeling and design of databases |
|
Database programming: querying and update
operations |
|
Database implementation |
|
DBMS study cuts across many fields of Computer
Science: OS, languages, AI, Logic, multimedia, theory... |
|
|
|
|
|
Why do we need it? |
|
Agree on
structure of the database before deciding on a particular implementation. |
|
Consider issues such as: |
|
What entities to model |
|
How entities are related |
|
What constraints exist in the domain |
|
How to achieve good designs |
|
|
|
|
|
Object Definition Language (ODL): |
|
Closer
in spirit to object-oriented models |
|
Entity/Relationship model (E/R): |
|
More relational in nature. |
|
Both can be translated (semi-automatically) to
relational schemas (with varying amount of pain). |
|
ODL to OO-schema: direct transformation (C++ or
Smalltalk based system). |
|
|
|
|
|
Is part of ODMG, which also gave us OQL. |
|
Resembles C++ (and Smalltalk). |
|
Basic design paradigm in ODL: |
|
Model objects and their properties. |
|
For abstraction purposes: |
|
Group objects into classes. |
|
What qualifies as a good class? |
|
Objects should have common properties. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|