Relational databases Flashcards
(16 cards)
What is a relational database?
A database that stores data in tables, with rows as data records and columns as attributes.
How is data organized in a relational database?
Into multiple tables connected by primary and foreign keys.
What is the role of primary and foreign keys?
To uniquely identify records and link related data across tables.
Why must all attributes in a table depend only on the primary key?
To ensure data integrity and prevent anomalies.
What does it mean to give every informational theme its own table?
Each distinct business concept is stored separately for clarity and normalization.
What is a Relational Database Management System (RDBMS)?
Software that lets users operate and interact with a relational database.
Why is an RDBMS like an operating system for the database?
It interprets user queries and performs database operations accordingly.
What operations can an RDBMS perform?
Database design, construction, data manipulation, and reporting.
Which language is used to communicate with relational databases?
SQL (Structured Query Language).
If two tables need to represent customer and orders, how would you link them?
Using a primary key in customers and a foreign key in orders.
What happens if a table has no primary key?
You risk data duplication and lack of unique identification.
Spot the error: ‘Attributes in a table can depend on multiple keys.’
Incorrect. All attributes must depend only on the primary key.
Spot the mistake: ‘RDBMS is optional for relational databases.’
Incorrect. An RDBMS is essential for interacting with relational databases.
Explain how a relational database improves over flat file storage.
By organizing data into separate related tables, ensuring integrity, and allowing complex queries.
Describe how a foreign key helps maintain consistency.
It ensures that the value exists in the referenced table, preserving relational logic.
If data isn’t normalized in a relational database, what might happen?
Redundancy, inconsistency, and potential anomalies during data operations.