Page 251 - Information_Practice_Fliipbook_Class11
P. 251

4.   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:

              +-------+--------+----------+--------+--------------------+----------------+----------+------------+--------+---------+
              | E0001 | Raj    | Reddy    | F      | West Godavari      | Andhra Pradesh | 534197   | 09-Sep-1980 | 100000 |       2 |
              +-------+--------+----------+--------+--------------------+----------------+----------+------------+--------+---------+


                  Tuple: A row in a table.


            5.   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.


            6.   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>
            }
            7.   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.


                  Cardinality: Numbers of tuples in a table instance.


            8.   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.
            9.   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.
            10.   The order in  which  names of the attributes appear in  a relation  schema is not relevant to the DBMS for its
                operations. Similarly, DBMS ignores the ordering of tuples in a relation.



                  Order within a table: Rows in a table are considered unordered.



                                                                Database Concepts and the Structured Query Language  237
   246   247   248   249   250   251   252   253   254   255   256