Reading = Database System Concepts, 6th edition, Avi Model = collection of tables
Silberschatz lower level than ER Model
Coursework: ER Design -> Relational model
3 coursework assignments (15%) Data Definition Language (DDL)
Mini-project (25%) defines schema
Exam (60%) DDL compiler = generates set of tables (into data
Text -> ER Diagram -> Relational Model -> Relational dictionary)
Algebra -> SQL Data Dictionary = contains metadata (schema,
DBMS: storage structure, access, integrity constraints,
o Database (collection of interrelated data) authorization)
o programs to access them Data Manipulation Language (DML)
o env = convenient + efficient Access + manipulate
Database Application: query + update
o banking, airlines.... Procedural (what data, how)
Database = fundamental to ~all systems Declarative (what data is required)
Purpose: “Pure languages” = relational algebra
Drawbacks of file: Extensible Markup Language (XML)
o Data redundancy + inconsistency general purpose, user defines tag
o difficult in accessing Not separated (SQL will consist of both)
o atomicity of updates Relational Algebra
failure = inconsistent = partial
updates
o concurrent access
o security (constraints) SQL (Standard SQL examples)
o No data independence
Level of "Abstraction"
1. Physical (how it's stored)
2. Logical (how data (type) stored in database,
relationship between data)
3. View (app hide details of data type, hide info for
security)
Data Model
Data Part 2: ER Model
Relationship ER Model = high level data model
semantics - collection of entities
constraints - relationships
1. ER Data Model for DB Design - constraints
2. Relational Model - attributes
3. Semistructured Data Model (XML) Entities: thing
Data Schemas VS Instances - have attributes
schema = overall logical design of DB - entity set = set of entities of same type, same kind
instance = snapshot of the DB, the actual data in of attributes
the DB at that time - entity has value for each attributes
instances changes, schema almost never do Relationship: association among several entities
ER Model - Relationship-set = set of tuples (relationships)
Model = entities + relationships Role: function that an entity plays in a R
o entity = thing or object (distinguishable E.g. R = Joan is father of Sean. E = Joan, Sean.
from other objects) Role: parent-child relationship. Can have 2 roles
o attributes = entities Descriptive attribute: an attribute of a relationship set
Degree = no. of entity sets in relationship set
o relationship = association among several
- binary = 2
entities