14 - Databases Flashcards
(11 cards)
How can timestamp ordering be used to manage concurrent access to a database?
Timestamps are generated for each transaction. Timestamps indicate the order that transactions occurred in. The database records the time of the last read/last write transaction for each record. The database server applies rules to determine if processing a transaction will result in loss of data integrity or inconsistency.
What does it mean for a database to be fully normalised?
Data is atomic; no repeating groups of attributes. No partial dependencies; all non-prime attributes are dependent on the whole of every candidate key. No non-key dependencies; every non-key attribute is dependent upon the key.
What are two problems that can occur with databases that are not fully normalised?
- Redundant/duplicated data may waste storage space.
- Inconsistent data may arise if the same data item is stored in multiple places.
What is a consequence of having duplicated data in a database?
If data is stored more than once, each copy would need to be updated if it changed.
What is the name given to a primary key made up of two attributes?
Composite key.
What is a server-side script?
A sequence of instructions executed on the server to generate a web page when requested.
What does it mean that the relations in a relational database are in Third Normal Form?
Every attribute in a relation is dependent on the whole key and nothing but the key.
Define the term foreign key.
An attribute in one relation/table that links to a primary key attribute in another relation/table.
Define an attribute.
A property or characteristic of an entity.
What makes a table un-normalised?
Contains a repeating group.
What is meant by a relational database?
A database structured as a series of tables/entities, where the DBMS provides tools for joining tables and selecting items.