Why a DBMS is better than a file system, and the relational model: relation, attribute, tuple, domain, degree and cardinality, and candidate, primary, alternate and foreign keys.
| Degree and cardinality | a table of 6 columns and 20 rows: degree 6, cardinality 20 |
| Adding to a table | a new row adds 1 to the cardinality; a new column adds 1 to the degree |
| Key test | unique in every row and never NULL: Marks or City, which repeat, cannot be keys |
| Alternate keys | the candidate keys minus the one chosen as the primary key |
| Foreign key | STUDENT(RollNo, Name, ClassID): ClassID refers to the primary key of CLASS |
| Schema | the design of a database: its relations, attributes and constraints |
In a relation STUDENT, the attributes AdmNo, RollNo, Email each have unique values for every student and are never NULL. AdmNo is chosen as the primary key. Name (a) the candidate keys (b) the alternate keys.
Working: every attribute that can identify a tuple is a candidate key; those not chosen are alternate keys
Answer: (a) AdmNo, RollNo, Email; (b) RollNo, Email