Databases(Chapter 8) Flashcards
What is a primary key ?
It is a unique identifier for each tuple
What is a candidate key ?
An attribute that could be a primary key
What is a secondary key ?
A candidate key that has not been chosen as a primary key.
What is a foreign key ?
A field in one table that is linked to a primary key in another table.
What is referential integrity ?
Each foreign key value (value in the other table) must have a matching value in the primary key (main table) of the linked table.
It ensures that all the data is consistent and up-to-date.
It ensures that every foreign key has a corresponding primary key and it prevents records from being added/deleted or modified incorrectly.
It makes sure that if data is changed in one place that change will be reflected in the related records.
What is indexing ?
It is creating a secondary key on an attribute to provide fast access when searching on that attribute, indexing data must be updated when table data changes.
What are the symbols in an ER diagram ?
One to one = ————————————-
One to many = ——————————-<–
Many to many = –>————————-<–
What is normalization ?
It is a process of organizing data into two or more tables to minimize data redundancy.
1NF : - Entities do not contain repeating groups of attributes. All attributes must be atomic and no duplicate rows.
2NF : - It must be in 1NF and it contains no partial key dependencies.
3NF : - It must be in 2NF and it contains no non-key dependencies.
What is data management ?
It is the organization and maintenance of data in a database.
What is a data dictionary ?
It stores metadata about the database, like the : -
Attribute names
Table names
Primary keys /Foreign keys
Data types
Relationships
It helps improve the integrity by ensuring the data is accurate, complete and consistent.
What is data modeling ?
It is the analysis of data objects used in the database, identifying the relationships amongst them and producing a data model. For example : - An ER diagram
What is logical schema ?
It provides an overview of a database structure and models the situation by using methods like an ER diagram.
It is independent of any particular DBMS.
What is a developer interface ?
It is a feature of the DBMS that provides developers with the ability to create and manipulate a database using SQL.
For example : -
Creating a table
Setting up the relationships between the tables
Creating a query
Creating a form or a report
What is a query processor ?
It is a feature of DBMS which allows to user to enter some criteria, then searches for the data which meets the entered criteria in the database and organizes the results to be displayed to the user.
It is essentially software which processes and executes queries written in SQL.
THINGS TO NOTE
- The DBMS carries out all creation/modification of the database structure using its Data Definition Language (DDL)
- The DBMS carries out all queries and maintenance of data using its Data Manipulation Language (DML)
- The industry standard for both DDL and DML is Structured Query Language (SQL)