Relational databases Flashcards

(16 cards)

1
Q

What is a relational database?

A

A database that stores data in tables, with rows as data records and columns as attributes.

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

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

What is the role of primary and foreign keys?

A

To uniquely identify records and link related data across tables.

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

Why must all attributes in a table depend only on the primary key?

A

To ensure data integrity and prevent anomalies.

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

What does it mean to give every informational theme its own table?

A

Each distinct business concept is stored separately for clarity and normalization.

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

What is a Relational Database Management System (RDBMS)?

A

Software that lets users operate and interact with a relational database.

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

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

A

It interprets user queries and performs database operations accordingly.

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

What operations can an RDBMS perform?

A

Database design, construction, data manipulation, and reporting.

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

Which language is used to communicate with relational databases?

A

SQL (Structured Query Language).

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

If two tables need to represent customer and orders, how would you link them?

A

Using a primary key in customers and a foreign key in orders.

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

What happens if a table has no primary key?

A

You risk data duplication and lack of unique identification.

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

Spot the error: ‘Attributes in a table can depend on multiple keys.’

A

Incorrect. All attributes must depend only on the primary key.

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

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

A

Incorrect. An RDBMS is essential for interacting with relational databases.

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

Explain how a relational database improves over flat file storage.

A

By organizing data into separate related tables, ensuring integrity, and allowing complex queries.

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

Describe how a foreign key helps maintain consistency.

A

It ensures that the value exists in the referenced table, preserving relational logic.

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

If data isn’t normalized in a relational database, what might happen?

A

Redundancy, inconsistency, and potential anomalies during data operations.