- A database is a collection of data with
● certain logical structure
● specific semantics
● specific group of users
- A database management system allows to
● create, modify and manipulate database
● query data
● support persistent storage of large amounts of data
● enable durability and recovery from failure
● control access to data by many users in parallel
- Motivation for DBMS
● data independence
● avoidance of duplication
● high-level declarative query languages
- imperative languages
- declarative languages
- SQL is a declarative data manipulation language. The user
describes conditions the requested data is required to
fulful.
● well-defined data models & data integrity constraints
● concurrent access (ACID properties)
● persistent storage, safety and high availability
● scalability
● security
- ANSI SPARC Architecture
● View level
● Logical level
● Physical level
- Database schema : structure of the database (relations + constraints)
- Database instance: actual content (state) of the database at some
moment
- A transaction is a collection of operations that performs a single logical
function in a database application.
Functional Dependencies and Database Schema Normalisation
- Functional Dependencies are a generalization of keys, central part of
relational database design theory.
- Bad database design if schema contains relations that store data
redundantly and information is intermixed
, - Normalization algorithms can construct good relation schemas from a set
of attributes and a set of FD’s. When ER model is well designed ->
automatically in BCNF.
- First Normal Form: requires that all table entries are atomic
- The goal of database normalisation is to turn FD’s into keys
- Implication of FD’s : only interested in a representative FD set. Armstrong
Axioms:
● Reflexivity
● Augmentation
● Transitivity
● (Cover of an FD/attribute)
- Minimal key: Attributes/keys that imply all attributes
- Determinants: Minimal key for a given set of attributes (so not all)
- Consequences of Bad DB Design
● Update anomalies
● Insertion anomalies
● Deletion anomalies
- BCNF
● To check if something is in BCNF:
- The FD is trivial (rechterkant is deel van linkerkant)
- De linkerkant contains minimal key. Dus als {A,B} een
minimal key is, is {B} niet in BCNF. Als {B} een minimal key
is, is {A,B} wel in BCNF.
● BCNF is slightly more restrictive than 3NF.
● Anomalies do not occur
- 3NF
● Assume that every FD has only a single attribute on the right-hand
side
● To check if something is in 3NF:
- The FD is trivial (rechterkant is deel van linkerkant)
- De linkerkant contains a minimal key.
- De rechterkant is a minimal key. (of zit in een minimal key!)
dus C,D -> A. {A,B} minimal key dus in 3NF
● If a relation is in BCNF, it is automatically in 3NF.
● 3NF is the standard facto in the industry.
- Canonical Set of Functional Dependencies
● Make the right- hand side singular
● Minimize left-hand side
● Remove implied FD’s
- BCNF Synthesis Algorithm
- 3NF Synthesis Algorithm
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller hannah85. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $4.28. You're not tied to anything after your purchase.