Week 1 Flashcards
What are the two types of data?
Unstructured, and structured, although much of the data is something in between
What is structured data?
Data that can be represented as a collection of tables, with each column describing a different attribute of the data.
What is the conceptual definition of a database?
A database is a collection of information/data that exists over a (very) long period of time
What is a DBMS?
A Database Management System is a tool for creating an managing large amounts of data
Wat is isolation?
No unexpected interactions between actions of different users
What is atomicity?
An action is completed or not, not half completed
What are the types of users of a DBMS?
- Conventional users, ask for data and/or modify it
2. Database administrators, responsible for the structure of the data
What is a query compiler?
It translates and optimizes the query into something i.e. a set of commands that can be executed
What is a transaction manager?
It groups queries or other DML actions into a transaction and makes sure the transaction is either:
- Completed in full, or not at all
- Executed in a way that it would be executed when no other transaction would be executed at the same time
- Logged properly, so the effect of the transaction is never lost (durability)
What is ACID?
A = atomicity C = consistency I = isolation D = durability
What does the data model consists of?
- Structure (numbers, strings, arrays, …)
- Operations on data: any operations that can be programmed
- Constraints on data: e.g. must be positive, must be multiple choice.
What are tuples?
- Can be considered as a row in a table
- Relations are sets of tuples, as the order of tuples is irrelevant
- A tuple has one component for each attribute of the relation
What is a domain?
- Each component must be atomic (thus a integer, or a string, cannot be broken up in smaller components)
- Each attribute has a domain: a particular elementary type (a year is an integer)
What is a Schema?
- Defines name of relation R and its attributes A1, A2, …, An as R(A1, A2, …, An)
E.g. Movies(title, year, length, genre)
You can also define a domain:
Movies(title:string, year:integer, length:integer, genre:string) - Attributes form a set, the order is irrelevant
- However we follow the order of the schema
What are keys?
A key of a relation is a set of attributes of that relation for which no two tuples are allowed to have the same components across all attributes in the key, usually this is an ID