Option A - Database (Paper 2) Flashcards

(46 cards)

1
Q

What is the difference between data and information?

A

Data is meaningless; it must be interpreted to produce information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the difference between an information system and a database?

A

A database is a structured collection of data (e.g., tables storing student records).

An information system is a broader system that uses databases along with people, hardware, software, and procedures to collect, process, store, and share information (e.g., a school management system).

Databases are a component within an information system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why are databases needed?

A

They enable benefits such as data sharing and maintaining correct information relating to customers and/or clients.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do transactions maintain data consistency?

A

Transactions involve completing two operations to ensure consistency; if one fails, the transaction is rolled back.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define the term database transaction.

A

A database transaction is a sequence of operations performed as a single logical unit of work.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is concurrency in a data sharing situation?

A

Concurrency refers to the ability of multiple users to access and modify the database simultaneously.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does ACID stand for in database transactions?

A
  • Atomicity
  • Consistency
  • Isolation
  • Durability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the two functions that databases require?

A
  • Query functions
  • Update functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the role of data validation?

A

Data validation ensures that the data entered into the database meets certain criteria.

It makes sure that the data entered is in the appropriate range and/or type to
avoid obtaining incorrect results;
It is performed by the computer which detects if data entered is not in the
range/of the type which is defined (by the person who set up the database);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a database management system (DBMS)?

A

A DBMS is software that interacts with the database, allowing for creation, manipulation, and interrogation. Creates and stores the databse.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a relational database management system (RDBMS)?

A

An RDBMS is a type of DBMS that is based on the relational model. In rows and columns (table format)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the functions and tools of a DBMS?

A

They include management functions for creation, manipulation, and interrogation of a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can a DBMS promote data security?

A

Through features like data validation, access rights, and data locking.

Access Rights Description: Passwords and PIN numbers limit the access to private information to
authorized users only;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define the term schema.

A

A schema is the blueprint that defines the structure, organization, and relationships of data within a database, encompassing tables, columns, constraints, and relationships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the three levels of schema?

A
  • Conceptual
  • Logical
  • Physical
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a data dictionary?

A

A data dictionary is a centralized repository of information about data, including its meaning, relationships, and usage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Why is a data definition language important?

A

It is crucial for implementing a data model by defining the structure of the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the importance of data modeling in database design?

A

Data modeling helps in structuring data and understanding the relationships between different data entities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Define the following database terms: table, record, field.

A
  • Table: equivalent to relation/file
  • Record: equivalent to tuple/row
  • Field: equivalent to attribute/column
20
Q

What are the different types of relationships within databases?

A
  • One-to-one
  • One-to-many
  • Many-to-many
21
Q

What issues are caused by redundant data?

A

Redundant data can lead to integrity and reliability issues.

22
Q

What is referential integrity?

A

Referential integrity ensures that relationships between tables remain consistent. Fosters reliability and integrity of the data.

23
Q

What are the differences between 1st Normal Form (1NF) and 2nd Normal Form (2NF)

A
  • 1NF: no repeating rows or columns
  • 2NF: based on full functional dependency
24
Q

What is Normalization? What are the characteristics of a normalized database?

A

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. A normalized database reduces redundancy and dependency.

25
What is the importance of selecting appropriate data types?
Selecting the correct data type is crucial for data integrity and efficiency.
26
What is an entity-relationship diagram (ERD)?
An ERD is a visual representation of the relationships among entities in a database.
27
Describe the use of transactions
Transactions ensure that a series of database operations are completed successfully as a single unit. If any part fails, the entire transaction is rolled back to maintain data integrity and data consistency.
28
Explain the importance of the ACID properties of a database transaction
ACID stands for Atomicity, Consistency, Isolation, and Durability. These properties ensure: Atomicity: all or none of the operations occur, Consistency: data remains valid after the transaction, Isolation: concurrent transactions don’t interfere, Durability: once committed, changes are permanent.
29
What is the difference between a database and a relational database?
A database stores data, but it may not follow any specific structure. A relational database stores data in tables with relationships between them using keys, following the relational model.
30
Discuss the need for databases
Databases are needed to store, organize, and manage large amounts of data efficiently, enabling easy retrieval, updating, and sharing of information across systems.
31
Explain the role of data verification
Data verification ensures that the data entered into the system matches the original source, reducing input errors. It helps maintain accuracy and reliability of data.
32
What is a primary key, and can you provide an example?
A primary key is a unique identifier for each record in a database table, ensuring no two rows have the same value and no null values are allowed. Example: In a table "Students" with columns "StudentID," "Name," and "Age," the "StudentID" (e.g., S001, S002) can be the primary key, uniquely identifying each student.
33
What is a secondary key, and can you provide an example?
A secondary key is a non-unique field or set of fields used to improve search efficiency, often indexed but not necessarily unique. Example: In the "Students" table, the "Name" column (e.g., John, Sarah) could be a secondary key to quickly search for students by name, even though names may repeat.
34
What is a foreign key, and can you provide an example?
A foreign key is a column or set of columns in one table that references the primary key of another table, establishing a relationship between them. Example: In a table "Enrollments" with columns "EnrollmentID," "StudentID," and "CourseID," the "StudentID" column is a foreign key that references the "StudentID" primary key in the "Students" table.
35
What is a candidate key, and can you provide an example?
A candidate key is a column or set of columns that can uniquely identify each record in a table, from which the primary key is chosen. Example: In the "Students" table, both "StudentID" (e.g., S001, S002) and "Email" (e.g., john@example.com, sarah@example.com) could be candidate keys if both are unique, but only one (e.g., "StudentID") is selected as the primary key.
36
What is a composite primary key, and can you provide an example?
A composite primary key is a primary key made up of two or more columns to uniquely identify each record in a table, used when no single column is unique. Example: In a table "OrderDetails" with columns "OrderID," "ProductID," and "Quantity," the combination of "OrderID" (e.g., O101) and "ProductID" (e.g., P201) forms a composite primary key to uniquely identify each order-product pair.
37
What is a tuple and what is an attribute in a table?
A tuple is a row (a record). An attribute is a column (a field)
38
What is a super key, and can you provide an example?
A super key is a set of one or more columns in a table that uniquely identifies each record, including any combination that contains a candidate key. Example: In a "Students" table with columns "StudentID," "Name," and "Email," the combination of "StudentID" (e.g., S001) and "Name" (e.g., John) is a super key because it uniquely identifies each student, even though "StudentID" alone would suffice.
39
What is a composite key, and can you provide an example?
A composite key is a key made up of two or more columns to uniquely identify each record in a table, often used when no single column is unique. Example: In a "ClassSchedule" table with columns "CourseID," "RoomID," "TimeSlot," and "Day," the combination of "CourseID" (e.g., C101) and "TimeSlot" (e.g., 10AM) forms a composite key to uniquely identify each scheduled class.
40
What is physical schema?
Describes how data is physically stored on storage devices (e.g., files, indexes, memory layout).
41
What is conceptual schema?
Defines the overall structure and organization of the entire database (e.g., entities, relationships), independent of physical storage.
42
What is logical schema?
Specifies the structure of the data as seen by the DBMS, including tables, columns, data types, and constraints.
43
Advantages of database schema
- Providing Consistency of data - Maintaining Scalability - Performance Improvement - Easy Maintenance - Security of Data
44
What do ACID properties do?
Ensure that the transaction get executed successfully and its effect permanently stored in the database. If the transaction is rolled back, it must return the database to its last consistent state before the update.
45
Outline what is meant by data redundancy.
Some data in a database can be found in two or more different locations / several copies of the same data; Which takes up unnecessary space; Data that is stored could be calculated from other data items; Unused data;
46
Queries of DDL and DML (roles of each)
DDL (Data Definition Language) -> Create, Drop, Alter, Truncate -> defines or modifies database structure. DML (Data Manipulation Language) -> Insert, Update, Delete -> manipulates data in the database.