INF3703 SUMMARY NOTES
INF3703 SUMMNOTES ON – DATABASE SYSTEMS INF3703/2012 Chapter 1 and 2 – just read as background not examined Chapter 3: The relational Database Model Properties: 1. A table is a two-dimensional structure composed of rows and columns 2. Each row (tuple) represents a single entity – duplicate rows are not allowed 3. Each column represent a attribute and has a name 4. Each cell (column/row) contain only an atomic value – a single data value 5. All values in a column must conform to the same data format 6. Each column has a specific range of values – attribute domain 7. The order of the rows and columns in immaterial to the DBMS 8. Each table must have a attribute of combination of attributes to uniquely identify each row Degree and cardinality - Cardinality of a table is the N rows (4 rows means cardinality of 4) - Degree is the number of columns in the table Keys - A key consist of one of more attributes that can be used to identify other attributes. Examples of keys are primary, super keys, candidate keys and secondary keys. - The role of the key is based on the concept known as ‘determination’ – use a key in table A to lookup of (determine) a value in table B. - The term functional dependence can be defined as the attribute A is functional dependant of B. - We might need more than one attribute to define a unique key also called multi-attribute or composite key. E.g. STU_NUM, STU_NAME - Superkey – any key that uniquely identify each row e.g. STU_NUM, STU_NAME - Candidate key – a superkey without redundancies e.g. STU_NUM - A foreign key (FK) is an attribute whose values match the primary key values in the related table - Secondary key is defined as a key that is use strictly for data retrieval Integrity rules 1. Entity integrity a. All primary keys are unique and no part of the primary key may be null b. Each row will have a unique identity and foreign key values can refer to as primary key values. E.g. No invoice has a duplicate number, or can be null, and uniquely identified by invoice number. 2. Referential integrity a. A foreign key may have a null entry. b. It is possible for an attribute not to have a corresponding value but impossible to have an invalid entry. The referential rule makes it possible to delete a row in one table whose primary key has mandatory values in another table. E.g. a customer might not have a sales representative yet but its impossible to have salesARY NOTES
Geschreven voor
- Instelling
- University of South Africa
- Vak
- INF3703 - Databases II
Documentinformatie
- Geüpload op
- 15 november 2021
- Aantal pagina's
- 12
- Geschreven in
- 2021/2022
- Type
- SAMENVATTING
Onderwerpen
-
inf
-
3703