Databases(Chapter 8) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a primary key ?

A

It is a unique identifier for each tuple

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

What is a candidate key ?

A

An attribute that could be a primary key

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

What is a secondary key ?

A

A candidate key that has not been chosen as a primary key.

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

What is a foreign key ?

A

A field in one table that is linked to a primary key in another table.

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

What is referential integrity ?

A

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.

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

What is indexing ?

A

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.

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

What are the symbols in an ER diagram ?

A

One to one = ————————————-
One to many = ——————————-<–
Many to many = –>————————-<–

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

What is normalization ?

A

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.

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

What is data management ?

A

It is the organization and maintenance of data in a database.

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

What is a data dictionary ?

A

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.

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

What is data modeling ?

A

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

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

What is logical schema ?

A

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.

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

What is a developer interface ?

A

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

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

What is a query processor ?

A

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.

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

THINGS TO NOTE

A
  • 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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly