Week 1 Revision Flashcards
What were used before databases?
File systems, data stored in files, possibly separated with delimiters
What were some disadvantages of file processing systems?
<ul>
<li>Data redundancy and Inconsistency</li>
<li>Difficulty in accessing data</li>
<li>Integrity problems, hard to check constraints</li>
<li>Can't guarantee atomicity of updates</li>
<li>Can't deal with concurrent access by multiple users easily</li>
<li>Hard to provide user access to some but not all data</li>
</ul>
What is a database system?
A well controlled data repository with a collection of interrelated data and a set of programs to access the data
What does the data model cover?
The data, the data relationships, the data semantics (shape and structure) and the constraints on the data
What is described at the physical level of data abstraction?
How the record is stored
What is described at the logical level of data abstraction?
How the data and relationships between data is stored in the database
What is described at the view level of data abstraction?
Information about selected aspects of the data (certain groups)
What is an instance?
The actual content of the database at a particular point of time
What is physical data independence?
The ability to change the physical schema without affecting the logical schema
How should the interfaces between various levels be defined?
So that a change inone part does not seriously influence the other parts
What is logical data independence?
Ability to change the conceptual schema without having to modify the application programs which make use of them
What are some examples of alterations in the conceptual schema?
Additional or deletion of entities, attributes and relationships
Is logical data independence easier or harder to achieve than physical data independence?
Harder
What are the steps in the database design methodology?
<ol> <li>Specification of requirements</li> <li>Choose data modelling style i.e. ER model</li> <li>Design data model</li> <li>Choose database</li> <li>Derive schema from data model</li> <li>Populate database</li> <li>Queries, updates, maintenance </li> </ol>
Give an example of a data model
ER diagram
What are some benefits of using a data model?
<ul>
<li>Concise summary that you can present</li>
<li>Easy to understand</li>
<li>Hides irrelevant detail</li>
<li>Faster and easier to produce than code</li>
<li>Can go straight to code with some tools</li><li>
</li></ul>
What are the two database languages?
Data Definition Lanuage
Data Manipulation Language
Describe the Data Definition Language
DDL is the notation for defining the database scheme
Generates a set of table templates
Stores information about the data (metadata - integrity constraints, authorisation etc)
Commands such as CREATE, DROP, ALTER
Describe the Data Manipulation Language
Language for accessing and manipulating the data
Two types : procedural and declarative
Commands such as SELECT, INSERT, DELETE
What are the three functional components that a database system can be divided into?
<ol> <li>Storage Manager</li> <li>Query Processor Component</li> <li>Transaction Component</li> </ol>
What is the storage manager responsible for?
<ul>
<li>Interaction with the OS file manager</li>
<li>Efficient storing, retrieving and updating of data</li>
</ul>
What is the query processor component responsible for?
<ul> <li>Interpreting and storing data definitions in the data dictionary</li> <li>Optimising queries</li> <li>Executing queries</li> </ul>
What is the transaction management component responsible for?
<ul>
<li>Helping with atomicity</li>
<li>Ensuring database stays in a consistent state</li>
<li>Controlling interaction between concurrent transactions</li>
</ul>
What is the primary goal of a DBMS?
Store and retrieve database information that is both convenient and efficient?
What kind of collections of data are databases used to store?
Ones that are <ul> <li>Highly valuable</li> <li>Relatively large</li> <li>Accessed by multiple users and applications at the same time</li> </ul>
What are the two main modes where databases are used?
<ul>
<li>Online transaction processing</li>
<li>Data analytics</li>
</ul>