Identify two different types of relationships within databases.
One-to-One Relationship
- In a one-to-one relationship, a record in one table is associated with at most one record in another table.
- Example: A person can have only one passport, and a passport can belong to only one person.
One-to-Many Relationship
- In a one-to-many relationship, a record in one table can be associated with multiple records in another table.
- Example: A customer can place multiple orders, but each order is associated with only one customer.
Many-to-One Relationship
- This is the inverse of a one-to-many relationship.
- Example: Multiple students can enroll in the same course, but each student enrollment is associated with only one course.
Many-to-Many Relationship
- In a many-to-many relationship, multiple records in one table can be associated with multiple records in another table.
- Example: A student can enroll in multiple courses, and a course can have multiple students enrolled.
Define the term database transaction.
Definition
A database transaction is
- a unit of work/logical action
- performed on a database
- independent of other transactions
- changes state of the database
Example Answers
Example answer 1
A database transaction is a logical unit that is independently executed
for data retrieval or updates.
Example answer 2
A database transaction is a unit of work
that is either executed in full or not executed at all.
Example answer 3
A database transaction is a way of representing a state change
and has four properties, known as ACID.
Example answer 4
A database transaction is usually means a sequence of steps, treated as a unit for the purposes of satisfying a client's request.
Example answer 5
A database transaction is a process carried out on a database
which may change its state, for example: moving money between bank accounts.
Explain the importance of durability in a database transaction.
Part 1
Identify two different types of relationships within databases.
- One to one
- One to many
- Many to one
- Many to many
Part 2
Define the term database transaction.
Award
- a unit of work/logical action;
- performed on a database;
- independent of other transactions;
- changes state of the database;
Example answer 1 A database transaction is a logical unit that is independently executed; For data retrieval or updates;
Example answer 2 A database transaction is a unit of work; That is either executed in full or not executed at all;
Example answer 3 A database transaction is a way of representing a state change; And has four properties, known as ACID;
Example answer 4 A database transaction usually means a sequence of steps, treated as a unit; For the purposes of satisfying a client's request;
Example answer 5 A database transaction is a process carried out on a database; Which may change its state, for example: moving money between bank accounts;
Part 3
Explain the importance of durability in a database transaction.
Example answer 1 Durability is important because transaction data changes must be available; Even in the event of database failure;
Example answer 2 Durability means that if the system says the transaction has been committed; The client does not need to worry about it because transactions that have been committed will survive permanently;
Example answer 3 Durability in databases is an important property because it ensures transactions are saved permanently; And do not accidentally disappear or get erased;
Describe the nature of the data dictionary.
Describe the nature of the data dictionary
A data dictionary is a set of tables/a database that provides information/meta-data about the database.
A data dictionary contains:
- The definitions of records/entities in the database
- How much space has been allocated for and is currently used
- Default values for columns/attributes
- Integrity constraint information
- Names of (database) users, their privileges and roles
- Auditing information such as who has accessed or updated data records
They do not contain any actual data from the database, it contains only information for managing it (without a data dictionary a DBMS cannot access data from the database).
Data dictionaries are usually hidden from users to prevent them from (accidentally) deleting/changing/destroying its contents.
Identify four responsibilities of a database administrator.
Identify four responsibilities of a database administrator
- Installing and configuring software
1 mark - Creating new databases
1 mark - Designing the database schema and creating any necessary database objects
1 mark - Ensuring database security is implemented to safeguard the data
1 mark - Backing up and recovering the database
- Working closely with application developers and system administrators to ensure all database needs are being met
- Applying patches or upgrades to the database as needed
- Training employees who use the database