Definitions Flashcards
Explain the following relationship characteristic: Degree
Degree refers to how many entity types are associated by the relationship. •unary (1) •binary (2) •ternary (3)
Explain the following relationship characteristic: Cardinality
Cardinality refers to how many entities of Entity type A can be associated with an entity of Entity type B. •An association is one-to-one (1:1), one to many (1:m) or many to many (m:n).
Explain the following relationship characteristic: participation
Participation refers to mandatory or optional association
What is meant by Versioning in relation to data integrity
•keeping different versions to see the history of changes and verify accurate data at different points in time
•clear trail of who changed what and when
•error recovery if file corrupts
•helps manage change to data in a structured way throughout lifecycle
What is meant by deadlock in relation to data integrity
Deadlock refers to a specific situation where two or more transactions are waiting on each other to release locks on resources, and none of the transactions can proceed. This results in a standstill where no transaction can move forward, effectively halting progress and potentially compromising data integrity if not properly handled.
Occur in environments where transaction currency managed through lock mechanism. Locks held by other transactions. Circular dependency means transactions cannot continue. Intervention required to resolve deadlock and restore normal operations.
What is meant by transaction log in relation to data integrity
Transaction log is a critical component in database systems that ensure data integrity by recording all changes made to the data. It serves as a detailed history of all transactions that have been applied to the database. If a system failure occurs, the transaction log can be used to recover database to a consistent state by replaying transactions from the log or rolling back incomplete transactions. This process ensures that the database remains accurate and reliable even after interruptions.
With regard to ERD’s, a relationship type that defines the association between entities. Explain attributes.
Attributes are the information we want about each entity. Eg attributes of the entity type CUSTOMER may be customer name, customer address, telephone number, contact name
With regard to ERD’s, a relationship type that defines the association between entities. Explain participation constraints.
Participation constraints specify whether the existence of an entity depends on its being related to another entity by a relationship.
Two types of constraints:
Total (mandatory) - every instance of the entity must be involved to at least one relationship instance
Partial (optional) - some instances of the entity may not be involved in an relationship instance
What is an entity?
An entity is something in the real world about which we want to store data.
Entity type…
An entity type defines a set of entities that have the same attributes or properties
What is a relationship
A relationship defines the associations between entities
Name the properties an attribute may have
Single valued or multi valued
Derived
Null
Key attribute
What is a composite attribute?
A composite attribute is one which can be divided into simple attributes - each with its own meaning
Eg address can be spilt into street name, town, city, country
What is a simple attribute ?
Cannot be sure her sub-divided
Eg surname
What are derived attributes
Value of some attributes can be derived from other attributes and so do not need to be stored in a database.
Eg persons age derived from DOB
What is a null attribute?
Not all attributes have value for each entity
Eg employee entity type gave an attribute car reg number but not all employees have a car
What are key attributes ?
Primary keys is an attribute or set of attributes that uniquely identifies each entity. This key must:
- not change value
- always have a value for each entity
- no attribute uniquely identifies each entity, we add surrogate key
Shown as PK - primary key
What is a data dictionary
A data dictionary is a working tool for programmers and powerful users who must deal directly with the database.
Alphabetical list it tables columns and descriptiosn
What is a foreign key?
A foreign key (fk) is an attribute in a table which is the primary key for another table
What is normalisation?
Normalisation is a set of steps to ensure a good database design
Ie well structured tables where all attributes are functional and dependant on the PK
What is the purpose of normalisation?
The purpose of normalisation is to
- avoid redundancy by storing each ‘fact’ within the database only once
- to put data into a form that conforms to relational principles
- to put data into a form that is more able to accommodate change
- to avoid certain updating anomalies
- to facilitate enforcement of data constraints
What are the three steps to producing a well structured relations
1) remove repeating groups (1NF)
2) remove partial dependencies (2NF)
3) remove transitive dependencies (3NF)
** once in third normal form (3NF) tables can be described as well structured