Unit 4 : Relational Database Flashcards

1
Q

What does relational model enables programer to do?

A
  1. To view data logically rather than physically
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the advantages of a table in the relational model?

A
  1. Has the advantage of structural and data independence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a table in the relational model resemble from conceptual point of view ?

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

What table is easier to understand its hierarchical and network database predecessors?

A
  1. Relational Model
  • Order
    1. Hierarchical
    2. Network
    3. Relational
    4. Entity Relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does table consists? ( 2 )

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

What does entity set consists?

A
  1. Contains group of related entities
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why does table is also called as relation?

A
  1. Because Codd used the term relation as a synonym for table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What can we think table as?

A
  1. A persistent relation ( A relation whose contents can be permanently saved for future use )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does keys consists?

A
  1. Consists of one or more attributes that determine other attributes
  • The key’s role is based on determination :
    • If you know the value of attribute A, you can look up ( determine ) the value of attribute B
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is primary key?

A
  1. An attribute ( combination of attributes ) that uniquely identifies any given entity ( row )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a foreign key ?

A
  1. An attribute whose values match primary key values in the related table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is secondary key?

A
  1. Key used strictly for data retrieval purposes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is candidate key?

A
  1. Any column or a combination of columns that can qualify as unique key in database
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is referential integrity?

A
  1. Foreign Keys contains a value that refers to an existing valid tuple ( row ) in another relation
  • IT ensures that relationships between tables in a relational database remain consistent. It focuses on maintaining valid connections between primary keys (PK) and foreign keys (FK)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can we insert multiple candidate key ?

A
  1. Yes , it can also qualify as primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How to select primary key? ( 3 )

A
  1. Select a key that does not contain null
  2. Select a key that is unique and does not repeat
  3. Make sure that primary key does not keep changing
17
Q

What has no data entry, not permitted in primary key and should be avoided in other attributes?

A
  1. NULL
18
Q

What can NULL represent?

A
  1. An unknown attribute value
  2. A known, but missing, attribute value
  3. A “not applicable” condition
19
Q

What problems can NULL create?

A
  1. Create problems when functions such as COUNT, AVERAGE, and SUM are used
  2. Can create logical problems when relational tables are linked
20
Q

What role does controlled redundancy play in a relational database?

A
  1. Controlled redundancy makes the relational database work.
21
Q

How do tables within a relational database share information?

A
  1. Tables within the database share common attributes that enable the tables to be linked together.
  • Share common attributes that enable tables to be linked together
22
Q

When is the occurrence of multiple values in a table not considered redundant?

A
  1. Multiple occurrences of values in a table are not redundant when they are required to make the relationship work
  • When required to make the relationship work
23
Q

When does redundancy exist in a relational database?

A
  1. Redundancy exists only when there is unnecessary duplication of attribute values.
  • When unnecessary duplication of attribute values
24
Q

What is a data dictonary?

A
  1. A data dictionary provides detailed accounting of all tables found within the user/designer-created database.
25
Q

What information does a data dictionary contain?

A
  1. It contains at least all the attribute names and characteristics for each table in the system.
26
Q

What type of data does a data dictionary hold?

A
  1. A data dictionary contains metadata—data about data.
27
Q

Why is the data dictionary sometimes described as “the database designer’s database” ?

A
  1. Because it records the design decisions about tables and their structures.
28
Q

What are the besic building blocks of a relational database

A
  1. Tables
29
Q

List out the types of integrity rules ( 2 )

A
  1. Entity Integrity
  2. Referential Integrity
30
Q

What is the requirement of entity integrity?

A
  1. All primary key entities are unique, and no part of a primary key may be null
31
Q

What is the purpose of entity integrity?

A
  1. Each row will have a unique identity, and foreign key values can properly reference primary key values
32
Q

What is the requirement of referential integrity?

A
  1. A foreign key may have either a null entry - as long as it is not a part of its table’s primary key - or an entry that matches the primary key value in a table to which it is related
33
Q

What is the purpose of referencial integrity?

A
  1. It is possible for an attribute NOT to have a corresponding value, but it will be impossible to have an invalid entry. The enforcement of the referential integrity rule makes it impossible to delete a row in one table whose primary key has mandatory matching foreign key in another table
34
Q

What is known for each column has a specific range of values ?

A
  1. Attributes Domain