Computer Science · Ch 8 — Database Concepts
Three Important Properties of a Relation
8.4.1
Three Important Properties of a Relation
A relation in the relational data model is not just any ordinary table or data file. It follows three specific properties that give it a formal, mathematical structure. These properties govern how attributes (columns), tuples (rows), and the overall state of the relation behave.
Property 1: Rules for Attributes (Columns)
This property deals with the naming and ordering of columns.
- Every attribute in a relation must have a unique name. No two columns can share the same name.
- The sequence of attributes is immaterial. Whether you list RollNo first or Name first, the relation remains the same. The order of columns has no significance.
Property 2: Rules for Tuples (Rows)
This property ensures that each row is a unique, unordered record.
- Each tuple in a relation must be distinct. No two rows can have identical values for every attribute. For example, in an ATTENDANCE table, you cannot have two rows where the student ID, date, and status are all exactly the same. Every row must be uniquely identifiable by its own data content.
- The sequence of tuples is immaterial. Even though the data appears in a tabular format with rows one below another, the order of rows does not matter. Swapping two rows does not change the relation.
Property 3: Rules for the State of a Relation (Cell Values)
This property governs what values are allowed inside each cell of the table.
- Domain consistency: All values in a given attribute must come from the same domain — meaning they must be of the same data type. For instance, if an attribute stores phone numbers, every value in that column must be a number, not a mix of numbers and text.
- Atomic values: Each data value associated with an attribute must be atomic — it cannot be further divided into meaningful subparts. For example, the ten-digit
GPhonenumber of a guardian in theGUARDIANrelation is atomic, since it cannot be meaningfully divided into smaller parts. …