Database Components Flashcards
Intro - ch 1
Give a simple example of a schema
The “Student” schema might include tables for student records, course enrollments, & grades.
What is a schema in a database?
Defines the structure of a database, including the tables, fields, & relationships between them.
What are the components of a relational database?
- Tables
- Rows
- Columns
- Primary Key
- Foreign key
What does TABLES represent in a relational database?
Store data in rows and columns
What does ROWS represent in a relational database?
Each row contains a record of data
What does COLUMNS represent in a relational database?
Each column represents a field, like a name or ID.
What does PRIMARY KEY represents in a relational database?
A unique identifier for each row in a table
What does FOREIGN KEY represent in a relational database?
A field in one table that links to the primary key of another table.
How is data organized in a relational database?
- Data is organized into tables, with each table containing rows (records) & columns (fileds).
- Tables can be linked using keys, like primary keys & foreign keys.
What is data independence?
Refers to the ability to change the structure of a database without affecting the data or the applications that use the data.
- It ensures flexibility & scalability in managing databases.
What is a schema in a database? (In More Detail)
- Define:
- Example:
- Define: defines the structure of a database, including the tables, fields, and relationships between them.
- Example: The “Student” schema might include tables for student records, course enrollments, and grades.
What are the components of a relational database? (In More Detail)
- List each different component & Define what they represent:
- Tables: Store data in rows and columns.
- Rows: Each row contains a record of data
- Columns: Each column represents a field, like a name or ID.
- Primary Key: A unique identifier for each row in a table.
- Foreign Key: A field in one table that links to the primary key of another table.