Fichas
The Relational Data Model
Fichas del conjunto (12)
- 1What is the schema of a relation? If A1,A2,A3 are a set of attributes then what is the schema of R?-The description of a particular collection of data in the model
-R(A1,A2,A3) is the schema - 2What is a relation?A table (with rows and columns) that refers to the logical structure of the DB
- 3What is an attibute? What is its domain?Named column of a relation (each attribute has a unique name)
Domain is the set of allowable values - 4What is a tuple? What is a cell? What is the degree of a relation? What is the cardinality of a relation?- Tuple: row of a relation
Cell: intersection of a row and a column
Degree: the number of attributes
Cardinality: number of tuples - 5What does it mean if a relation is normalised?If every cell has exactly one value
And there are no repetitions of two identical rows - 6What is a NULL value?Special case of a cell entry
Represents an attribute value that is currently unknown/not applicable - 7How do we uniquely identify a tuple in a normalised table?-Every table must have some attribute such that its value uniquely determines a tuple of the table. These are primary keys.
- 8What is a primary key?Candidate key selected to identify rows uniquely in the table.
- 9What is a composite key?Primary key created by combining two or more attributes (eg Song and artist make up a unique identifier)
- 10What is a foreign key?An attribute in one table A whose values must either match the primary key of another table B (A references B), or be NULL
- 11What is entity integrity and what is its purprose?-Every attribute of a primary key cannot be null
-Guarantees that each entry has a unique identifier.
-Ensures that foreign key values can reference primary key values - 12What is referential integrity? What is its purpose?-Foreign key either matches the primary key in th e table it refers to or is null
Purpose:
any reference between tables is valid or has not been set yet
Prevents deleting a row win a table B, if the primary key of B as a matching foreing key in another table A.
Información
- Descripción
- Fichas sobre The Relational Data Model, creado por SEZ McKelvey el 06/04/2018.
- Creado por
- SEZ McKelvey
- Visitas
- 4
- Valoración
Más sobre Relational Databases and the Relational Model