Main Flashcards
(181 cards)
What is the Entity-Relationship Model?
The entity-relationship (ER) data model uses a collection of basic objects, called entities, and relationships among these objects.
An entity is a “thing” or “object” in the real world that is distinguishable from other objects. The entity-relationship model is widely used in database design.
What are the languages of Databases?
- Data-definition language (Specify database schema)
- Data-manipulation language (Database queries)
In practice: both are in the same database language, e.g. SQL
What is a Database System?
A Database Management System and a Database
What is the 3-layer schema architecture?
What is a conceptual schema
The conceptual schema defines the ontology (the formal naming and definition of the types, properties, and interrelationships of the entities) of the concepts as the users think of them and talk about them.
What is an external schema?
The external schema defines the view of the data presented to the application programs.
What is an internal schema?
Describes the internal formats of the data stored in the database.
What is Physical data independence?
Changes regarding file structure and access paths (physical layer) have no influence on the conceptual schema (logical layer).
What are some examples of changes on the physical layer?
- New hard disk added
- New processor added
- Files are split into multiple files
What is Logical data independence?
Changes on the logical layer have no infuence on external schemas and applications.
What are some examples of changes on the logical layer?
- Adding another attribute to the conceptual schema
- Changing the name of an attribute on the conceptual schema
What is a Mini-world?
Some part of the real world about which information is stored
What are data/information?
Known facts about the mini-world that can be recorded and have an implicit meaning
What is a database (DB)?
A collection of related data
What are Database Management Systems (DBMS)?
A software package to facilitate the creation and maintenance of a database
Examples: MySQL, PostgreSQL, Microsoft SQL Server, Oracle, etc.
What is a database instance?
The content of a DB at a particular time
Name some of the problems that can occur when managing data without a DBS
- Data can get lost.
- Query evaluation might be very slow, especially for large amounts of data.
- Access rights are hard to control.
- Extending the data with additional attributes is difficult.
- Inconsistent data might be stored.
- Concurrent access to the data cannot be handled efficiently.
Definition of a relation
Assume D1, D2,…,Dn are domains
R ⊆ D1 x … x Dn
- Example: telephoneBook ⊆ string x string x integer
Relational schema
Defines the structure of stored data
- Is denoted as: sch(R) or R
- Notation: R(A1 : D1, A2 : D2, …) with Ai denoting attributes
In what order are tuples in a relation stored?
Tuples in a relation are unordered.
These relations have the same information content:
In what order are attributes in a touple/relation stored?
In accordance with the mathematical definition of tuples, attributes in a tuple/relation are ordered.
These relations have different information content:
Values in a tuple
- Values in a tuple are atomic (indivisible)
- A value cannot be a structure, a record, a collection type or a relation
Null values
A special null value is used to represent values that are unknown or inapplicable to certain tuples.
When are duplicates not allowed?
A relation adheres to the mathematical definition of a set.
No two tuples in a relation may have identical values for all attributes







