Unit 4 : Relational Database Flashcards
What does relational model enables programer to do?
- To view data logically rather than physically
What is the advantages of a table in the relational model?
- Has the advantage of structural and data independence
What does a table in the relational model resemble from conceptual point of view ?
- A file
What table is easier to understand its hierarchical and network database predecessors?
- Relational Model
- Order
1. Hierarchical
2. Network
3. Relational
4. Entity Relationship
What does table consists? ( 2 )
- Rows
- Columns
What does entity set consists?
- Contains group of related entities
Why does table is also called as relation?
- Because Codd used the term relation as a synonym for table
What can we think table as?
- A persistent relation ( A relation whose contents can be permanently saved for future use )
What does keys consists?
- 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
What is primary key?
- An attribute ( combination of attributes ) that uniquely identifies any given entity ( row )
What is a foreign key ?
- An attribute whose values match primary key values in the related table
What is secondary key?
- Key used strictly for data retrieval purposes
What is candidate key?
- Any column or a combination of columns that can qualify as unique key in database
What is referential integrity?
- 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)
Can we insert multiple candidate key ?
- Yes , it can also qualify as primary key
How to select primary key? ( 3 )
- Select a key that does not contain null
- Select a key that is unique and does not repeat
- Make sure that primary key does not keep changing
What has no data entry, not permitted in primary key and should be avoided in other attributes?
- NULL
What can NULL represent?
- An unknown attribute value
- A known, but missing, attribute value
- A “not applicable” condition
What problems can NULL create?
- Create problems when functions such as COUNT, AVERAGE, and SUM are used
- Can create logical problems when relational tables are linked
What role does controlled redundancy play in a relational database?
- Controlled redundancy makes the relational database work.
How do tables within a relational database share information?
- 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
When is the occurrence of multiple values in a table not considered redundant?
- 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
When does redundancy exist in a relational database?
- Redundancy exists only when there is unnecessary duplication of attribute values.
- When unnecessary duplication of attribute values
What is a data dictonary?
- A data dictionary provides detailed accounting of all tables found within the user/designer-created database.