Relational databases Flashcards

1
Q

What is a relational database?

A

A database that stores data in tables with rows as data records (entities) and columns as data attributes (properties).

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

How is data organized in a relational database?

A

Data is split into multiple tables connected by primary and foreign keys.

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

Why is relational database structure preferred over flat files?

A

Because it separates information into logical tables and uses relationships, making data easier to manage, update, and query.

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

What does each table in a relational database typically represent?

A

Each table represents a single informational theme or business concept.

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

What rule applies to attribute dependency in relational databases?

A

All attributes must depend only on the primary key.

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

Why is it important that attributes depend only on the primary key?

A

To ensure data integrity and avoid redundancy or anomalies.

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

What happens if a table has attributes that depend on something other than the primary key?

A

It can lead to data anomalies like update, insertion, or deletion anomalies.

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

What is a Relational Database Management System (RDBMS)?

A

Software that allows users to interact with and operate a relational database.

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

Why is an RDBMS like an operating system for the database?

A

Because it interprets user queries and commands to perform operations on the database.

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

Give examples of operations performed by an RDBMS.

A

Database design, construction, data manipulation, and reporting.

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

Why is an RDBMS essential for relational databases?

A

Because it provides tools to manage, secure, and query the data efficiently.

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

What is involved in database design?

A

Planning the structure and organization of the database tables and relationships.

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

What is involved in database construction?

A

The actual creation of the database and populating it with data.

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

What is data manipulation in relational databases?

A

Operations like inserting, updating, deleting, and querying data.

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

What is reporting in relational databases?

A

Summarizing and representing data for analysis and decision-making.

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

What programming language is used to interact with relational databases?

A

SQL (Structured Query Language).

17
Q

Why is SQL important in relational databases?

A

Because it provides the commands to create, manage, and query the database.

18
Q

If you need to connect two tables of customers and orders, what should you use?

A

Primary and foreign keys.

19
Q

If you have multiple tables with similar data points, how do you avoid redundancy?

A

Design each table for a single informational theme and use keys to relate them.

20
Q

What happens if you skip setting a primary key in a table?

A

The table may allow duplicate or null values, risking data integrity issues.

21
Q

How does an RDBMS handle data manipulation commands?

A

It interprets and executes them to update the database accordingly.

22
Q

Spot the mistake: ‘In relational databases, attributes should depend on multiple keys.’

A

Incorrect. Attributes should depend only on the primary key.

23
Q

Spot the mistake: ‘An RDBMS is optional for relational databases.’

A

Incorrect. An RDBMS is essential to interact with and manage the relational database.

24
Q

Explain in your own words the role of a foreign key.

A

A foreign key links two tables together by referencing the primary key of another table, maintaining referential integrity.

25
Q

Explain why relational databases avoid data duplication.

A

By splitting data into multiple tables and using relationships, relational databases maintain data integrity and avoid duplication.

26
Q

Describe the relationship between SQL and an RDBMS.

A

SQL is the language used to communicate with the RDBMS, which then performs operations on the database.

27
Q

If you design tables poorly without primary keys, what risks arise?

A

Data duplication, integrity issues, and anomalies during data operations.