Lecture 1 + 2 Flashcards
What is a database and what is a DBMS?
A database is a collection of related data, typically with inherent meaning which represents an aspect of the real-world, known as the miniworld. A database management system allows us to define, construct, manipulate, and share these databases.
What is an application program?
Accesses the database by sending queries and requests for database access.
What are the characteristics of the database approach?
- The database is self-describing: it comes with itself and the metadata which gives a complete definition of the data structure and constraints stored in the DBMS catalogue.
- The database has insulation between programs and data.
- The database supports multiple ways to view data
- The database allows for correct sharing of data, e.g with concurrency control and online transactions processing.
Who are the important people in databases?
Database administrators(DBA), database designers, end users, and system analysts and application programmers.
What is a data model? What are the categories?
A collection of concepts that can describe the structure of a database High level(conceptual): details entities, attributes and relationships, understandable by anyone. Low level(physical): storage details Representational(implementation): bridge from high level to low level.
What is a database schema?
the description of a database.
What is the three schema architecture?
acts to separate user applications from physical database. Contains three schemas:
1. Internal schema, closest to the database, describes the physical storage structure of the database.
2. Conceptual schema, hides details of physical storage structures, instead, describes entities, data types, relationships, user operations, and constraints
3. external schema, connects to user, describes part of database the user is interested in, hides the rest.
Mapping transforms requests and results between the levels.
What is data independence?
able to change schema at one level without having to change next highest level
Logical data independence means conceptual schema can be changed without changing external.
Physical data independence is the capacity to change internal schema without having to change conceptual.
What are the DBMS languages?
Data definition language(conceptual schema).
Storage definition language(internal schema).
View definition language(conceptual and external schema).
Data manipulation language.
What is the entity-relationship model?
A high level conceptual data model in database modelling. An entity is a thing in the real world with independent existence, these have attributes, detailing properties of the entity. These attributes could be single-valued or multi-valued, stored(written to disk) or derived(computed based on other attributes).
What is an entity type?
a collection of entities with the same attributes, these must have one or more key attributes(unique values, can be a combination, but must be minimal). Each value should have a domain, a set of possible values.
What is a relationship?
This is when an attribute of one entity refers to another entity type. Each side should have a role name, helping to explain what the relationship means.
What is ht edegree of a relationship?
The number of participating entity types.
What are cardinality ratios?
the maximum number of relationship instances an entity can participate in.
What are participation constraints?
details whether an entity has to be part of a relationship. This can be total, every entity of a type must participate in the relationship, or partial, in which case they may participate.