Untitled Deck Flashcards

1
Q

What is the purpose of keys in a database?

A

To uniquely identify a row in a table using the minimum number of attributes.

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

Define a composite key.

A

A key consisting of two or more attributes used to uniquely identify an entity.

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

What is a primary key?

A

A candidate key selected to uniquely identify each occurrence of an entity type.

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 a table that points to a key field in a related table.

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

Differentiate between surrogate keys and natural keys.

A

Surrogate keys are system-generated (e.g., auto-incremented IDs), while natural keys are derived from unique table columns.

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

What is an insertion anomaly?

A

An issue where data cannot be inserted without additional dependent data.

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

What is a deletion anomaly?

A

An issue where deleting data inadvertently removes other essential data.

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

What is an update anomaly?

A

An issue where updating one instance of repeating data causes inconsistencies.

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

What are the types of dependencies?

A

Partial, Functional, Transitive

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

What is a partial dependency?

A

When a non-primary attribute depends on part of a composite primary key.

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

What is a functional dependency?

A

A relationship where one set of attributes determines another set of attributes.

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

What is a transitive dependency?

A

When a non-primary attribute depends on another non-primary attribute.

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

What is clustering indexing?

A

An indexing method where rows are stored in the order of the clustered index key, improving data retrieval efficiency.

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

What is the main goal of a hashing algorithm in clustering?

A

To distribute logical keys evenly across physical records and minimize collisions.

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

What is key distribution?

A

The spread of keys across an index structure, ideally uniform for efficient lookups.

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

What is UML?

A

Unified Modeling Language, a notation system for describing systems, including data processing.

17
Q

What are connection traps?

A

Issues in ER models due to misinterpreted relationships, like fan traps and chasm traps.

18
Q

What is a fan trap?

A

Ambiguous pathways between entity occurrences.

19
Q

What is a chasm trap?

A

A model suggesting relationships that do not exist between certain entity occurrences.

20
Q

What is a strong entity type?

A

An entity type that exists independently of other entity types.

21
Q

What is a weak entity type?

A

An entity type that depends on another entity type for existence.

22
Q

What are the degrees of relationships?

A

Binary (2 entities), Ternary (3 entities), Quaternary (4 entities).

23
Q

What is a recursive relationship?

A

A relationship where the same entity type participates multiple times with different roles.

24
Q

What is a composite attribute?

A

An attribute composed of multiple components with independent existence.

25
What are structural constraints in relationships?
Multiplicities, including cardinality (maximum occurrences) and participation (mandatory or optional occurrences).
26
What are the common types of participation in relationships?
One-to-one (1:1), One-to-many (1:), Many-to-many (:*).
27
What is NoSQL?
A DBMS designed to handle large volumes of unstructured/semi-structured data with flexible models.
28
Name categories of NoSQL databases.
Document-based (e.g., MongoDB), Key-value stores (e.g., DynamoDB), Column-family stores (e.g., Cassandra), Graph databases (e.g., GraphQL).
29
What are advantages of NoSQL?
High scalability, flexibility, and agility.
30
What are disadvantages of NoSQL?
Lack of standardization, narrow focus, and inconsistent backup approaches.