Page 142 - Informatics_Practices_Fliipbook_Class12
P. 142
Tuple: A row in a table.
3. In a relation, a row represents an entity's instance (also called occurrence) and is known as a tuple. For example,
the tuple in the EMPLOYEE table for the employee with ID E0001 is shown below:
Andhra
E0001 Raj Reddy F West Godavari Pradesh 534197 09-Sep-1980 100000 2
4. The set of all tuples in a relation is known as the entity set. The entity set is also called the state of the relation at
that time. For example, in the EMPLOYEE table, all the ten rows collectively constitute the entity set of relation
EMPLOYEE.
Relation state: Set of all tuples at an instance.
5. We express a tuple of a table by enclosing the comma-separated values of the attributes within angular brackets.
For example, the relation state of relation DEPARTMENT is given below:
{
<1, "Accounts", "Noida", E0002>,
<2, "Administration", "Delhi", E0005>,
<3, "Home Good", "Mumbai", E0003>,
<4, "Automobile", "Jamshedpur", E0007>,
<5, "Textile", "Mumbai", E0004>
}
Cardinality: Numbers of tuples in a table instance.
1. The number of rows in the entity set of a relation defines the cardinality of the relation. For example, the entity set
of relation EMPLOYEE has cardinality 10.
2. Each attribute is of a specific type, such as numeric or string. All the values in the column corresponding to
an attribute must conform to its type. For example, attribute ID and Salary are of numeric types and the
attributes FName and LName are of string type. The set of values that an attribute can take defines its domain.
For example, the attribute Gender of relation EMPLOYEE may have the domain {'M', 'F', 'O' }, even
though the current state of the table EMPLOYEE includes only two values, 'M' and 'F'. The domain of an
employee's Salary may be the set of numeric values. We may restrict the domain of Salary by specifying a
certain range of values, say, between 10000 and 100000. In this case, the DBMS will reject any attempt to add a
tuple in the table EMPLOYEE where Salary does not satisfy the constraint 10000<= Salary <= 100000.
3. Each row in a table is uniquely identified by an attribute or a combination of attributes. Such an attribute or
a combination of attributes is called a key of the relation. For example, the value of attribute ID of relation
EMPLOYEE is unique for each row. So, ID is a key of the relation EMPLOYEE.
Order within a table: Rows in a table are considered unordered
128 Touchpad Informatics Practices-XII

