Lesson 0 Flashcards

1
Q

What is a relation schema?

A

The structure of a table, defined by its attributes (columns).

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

What is a relation instance?

A

The actual set of tuples (rows) in a table at a specific moment.

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

What are attributes and tuples?

A

Attributes are columns, and tuples are rows in a relation.

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

Example of a relation schema?

A

Instructor (ID, Name, Dept_Name, Salary)

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

What is a domain in a database?

A

The set of valid values an attribute can take.

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

What does atomicity of an attribute mean?

A

The attribute must store indivisible values.

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

What does NULL represent?

A

A missing or unknown value in a table.

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

What is a database schema?

A

The logical structure defining tables, attributes, and relationships.

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

What is a database instance?

A

The actual stored data at a specific point in time.

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

What is a superkey?

A

A set of attributes uniquely identifying a row in a table.

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

What is a candidate key?

A

A minimal superkey (smallest set of attributes that is still unique).

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

What is a primary key?

A

The selected candidate key that uniquely identifies each row.

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

What is a foreign key?

A

An attribute in one table that refers to the primary key of another table.

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

What are the main components of an ER model?

A

Entities, Attributes, and Relationships.

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

How are entities represented in ER diagrams?

A

As rectangles.

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

How are relationships represented in ER diagrams?

A

As diamonds.

17
Q

What is an entity set?

A

A group of similar entities with shared attributes.

18
Q

What are the types of mapping cardinality?

A

One-to-One, One-to-Many, Many-to-One, Many-to-Many.

19
Q

Example of a one-to-many relationship?

A

One instructor advises multiple students.

20
Q

Example of a many-to-many relationship?

A

Students enroll in multiple courses, and courses have multiple students.

20
Q

What is a weak entity set?

A

An entity that cannot be uniquely identified without a strong entity.

21
Q

What does a weak entity need to be uniquely identified?

A

A discriminator attribute and a foreign key to a strong entity.

22
Q

How are weak entities represented in ER diagrams?

A

With a double rectangle.

23
Q

How do entity sets become tables?

A

Each entity set is converted into a relation (table).

24
Q

How do relationships become tables?

A

Many-to-many relationships require a separate table.

25
Q

How are weak entities stored

A

They include the primary key of the identifying strong entity.

26
Q

What is specialization?

A

The process of breaking an entity into subclasses.

27
Q

What is generalization?

A

The process of combining multiple entities into a higher-level entity.

28
Q

What is the ISA relationship?

A

Used to show specialization (e.g., an Instructor is a Person).