DBMS UNIT-4 Flashcards

(51 cards)

1
Q

What is the purpose of Normalization or schema refinement?

A
  • Eliminating redundant data
  • Minimize data modification errors
  • Simplify the query process

Normalization is a systematic approach to organizing data in the database to eliminate redundancy and anomalies.

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

Define anomaly in the context of databases.

A

Problems that occur after poorly planned and normalized databases

Anomalies include Insertion, Update, and Deletion anomalies.

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

What are the types of anomalies in DBMS?

A
  • Insert Anomaly
  • Update Anomaly
  • Delete Anomaly

These anomalies arise from redundancy in unnormalized databases.

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

What is an Insert Anomaly?

A

Occurs when a new row is added and causes inconsistency

Example: Cannot add a new course without enrolling a student.

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

What is an Update Anomaly?

A

Requires updating multiple rows to maintain consistency

Example: Changing an instructor’s phone number requires updates in every row.

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

What is a Delete Anomaly?

A

Deleting a row removes important data

Example: Deleting the last student enrolled in a course removes the course details.

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

What is the concept of functional dependency?

A

A constraint that specifies the relationship between two sets of attributes

Represented as X → Y, where X determines Y.

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

What does the notation X → Y signify?

A

Y is functionally dependent on X

X is the determinant set, and Y is the dependent attribute.

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

What is decomposition in database normalization?

A

The process of breaking down a table into various elements or parts

It helps eliminate redundancy.

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

What is a Primary Key?

A

A column or group of columns that uniquely identify every row in a table

A table can have only one primary key.

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

What is a Foreign Key?

A

Used to establish relationships between two tables

It can have null values and is part of referential integrity.

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

What is a Super Key?

A

A single attribute or combination of attributes that can uniquely identify a row in a table

A table can have multiple super keys.

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

What is a Candidate Key?

A

An attribute or set of attributes that can uniquely identify a tuple in a relation

Candidate keys can be chosen as primary keys.

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

What is a Composite Key?

A

A key that consists of two or more attributes that together uniquely identify a tuple

It is used when a single attribute is not sufficient.

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

What is a Transitive Dependency?

A

A dependency where one column depends indirectly on the primary key through another column

Example: If A → B and B → C, then A → C.

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

What is a Multi-valued Dependency?

A

Occurs when an attribute in a relation depends on another attribute independently of other attributes

Example: Car model determining multiple independent values of color.

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

What is the closure of a functional dependency?

A

The process of finding all functional dependencies that can be derived from the original set

Important for normalization and identifying redundant data.

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

What is a Trivial Functional Dependency?

A

When the dependent attribute is already part of the determinant attribute

Example: {Employee_ID, Employee_Name} → Employee_Name.

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

What is a Non-Trivial Functional Dependency?

A

When the dependent attribute is not a subset of the determinant

Example: Employee_ID → Employee_Name.

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

What are the key benefits of normalization?

A
  • No redundant data
  • No anomalies
  • Better data integrity and consistency

Normalization improves the overall quality of the database.

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

The relationship between two tables is known as Referential Integrity.

A

True

Referential integrity ensures that relationships between tables remain consistent.

22
Q

A single table can have _______ Foreign Key’s.

A

Multiple

This allows for complex relationships between tables.

23
Q

A Foreign key can have _______ values.

A

null

Null values in foreign keys indicate that there is no relationship for that record.

24
Q

The table consisting of the foreign key is known as the CHILD table and the table that is referred to by the foreign key is called the PARENT table.

A

True

This terminology is used to describe the relationship between tables in a database.

25
What is a **Super Key**?
A single attribute or combination of attributes that can uniquely identify a row in a table ## Footnote A single table can have multiple super keys.
26
The maximum number of **super keys** available in a particular table is **_______**.
2n – 1 ## Footnote Where n is the maximum number of attributes.
27
A **Candidate Key** is a super key with _______ data attribute.
no redundant ## Footnote Candidate keys are minimal super keys.
28
The following sets are examples of **super keys**: {Emp_SSN}, {Emp_Number}, {Emp_SSN, Emp_Number}, {Emp_SSN, Emp_Name}, {Emp_SSN, Emp_Number, Emp_Name}, {Emp_Number, Emp_Name}.
True ## Footnote These sets can uniquely identify a row in the employee table.
29
The difference between **Super Key** and **Candidate Key** includes the following: 1. Definition 2. Use 3. Selection 4. Count Wise.
True ## Footnote Candidate keys are a subset of super keys.
30
A **Composite Key** is defined as a primary key having **_______** attributes.
two or more ## Footnote It combines multiple columns to uniquely access a record.
31
A **Compound Key** is similar to a composite key but is used to uniquely identify each record in a table when each column may not be unique by itself.
True ## Footnote Compound keys are essential for ensuring unique identification in complex databases.
32
An **Alternative Key** is also known as a **_______ key**.
Secondary ## Footnote It is a candidate key that is not selected as the primary key.
33
A **Surrogate Key** is also known as an **_______ key**.
artificial ## Footnote Surrogate keys are system-generated identifiers used as primary keys.
34
Normalization is the process of organizing the data in the database to minimize **_______**.
redundancy ## Footnote It also eliminates undesirable characteristics like insertion, update, and deletion anomalies.
35
The most commonly used normal forms include **1NF, 2NF, 3NF, BCNF, 4NF, and 5NF**.
True ## Footnote These normal forms guide the creation of a good database structure.
36
A relation is in **First Normal Form (1NF)** if every attribute is **_______** valued.
single (Atomic) ## Footnote 1NF requires unique names for every attribute and that the order of data does not matter.
37
The **Second Normal Form (2NF)** eliminates partial dependencies on primary keys and applies to relations with **_______** keys.
composite ## Footnote 2NF requires that every non-primary-key attribute is fully functionally dependent on the primary key.
38
A relation is in **Third Normal Form (3NF)** if it is in 2NF and has no **_______** functional dependency.
transitive ## Footnote Transitive dependencies can create anomalies in the database.
39
BCNF (Boyce Codd Normal Form) is an advanced version of the **_______** normal form.
third ## Footnote BCNF removes redundancy and anomalies by ensuring that for every functional dependency, X is a superkey.
40
What is the primary key in the given functional dependencies?
{StudentID, CourseID} ## Footnote Non-Key Attribute: Professor depends on CourseID.
41
In 3NF, what does it deal with?
Transitive dependencies ## Footnote Professor depends only on CourseID, which is part of the candidate key.
42
What is required for a table to meet **BCNF**?
For every non-trivial functional dependency X → Y, X must be a super key ## Footnote CourseID is not a superkey by itself due to duplicate rows.
43
What are the two tables created to meet BCNF?
* Courses * StudentCourses ## Footnote Each table satisfies the dependency {CourseID} → {Professor} without violating BCNF constraints.
44
What does **4NF** address?
Multi-valued Dependency ## Footnote Multi-valued dependency occurs when two attributes are independent but both depend on a third attribute.
45
What are the conditions for a table to satisfy **4NF**?
* Must be in Boyce-Codd Normal Form * Should not have any Multi-valued Dependency ## Footnote Example: STUDENT table has independent COURSE and HOBBY attributes.
46
What is the **5NF** also known as?
Project-join normal form ## Footnote It is used to eliminate redundancy and improve data integrity.
47
What is a **Surrogate Key**?
An artificial key generated at runtime ## Footnote It is a unique identifier for each row in a database table.
48
List the features of a **surrogate key**.
* Automatically generated by the system * Holds anonymous integer * Contains unique value for all records ## Footnote Surrogate key is called the factless key as it contains no relevant fact.
49
What are the **advantages** of using a surrogate key?
* Unique * Enhanced performance * Simplicity ## Footnote Surrogate keys improve database performance and provide a reliable way to identify records.
50
What is **Lossless Join Decomposition**?
Decomposing a relation schema into smaller schemas without losing information ## Footnote It allows the original relation to be reconstructed from the smaller relations.
51
What is **Dependency-Preserving Decomposition**?
Breaking a table into smaller tables without losing any functional dependency ## Footnote Ensures that all dependencies can be checked without needing to join the tables.