Page 35 - ipp11
P. 35

28.  (a)  A school maintains a table, i.e., Student, which stores details of the enrolled students. The table consists
                         of 7 columns (Adm_No, Roll_No, Stu_Name, Class, Section, DOB, Marks) and 45 rows, where each
                         row represents a student’s record.
                         Based on this information, answer the following:
                          (i)  What is the degree of Student table?
                          (ii)  What is the cardinality of Student table?                                                                                                          (2)
                                                               OR

                      (b)  A hospital maintains a database of patients with attributes like Patient_ID, Name, Email_ID, Phone_No
                         and Disease_Diagnosed. Each patient is assigned a unique Patient_ID and their Email_ID and
                         Phone_No are also unique.
                         Based on this information, answer the following:
                          (i)  Identify the primary key for this table.
                          (ii)  List the possible candidate keys and justify them.
                Ans.   (a)   (i)  The degree of Student table is 7.
                           (ii)  The cardinality of Student table is 45.
                                                               OR
                       (b)   (i)  Primary key: Patient_ID
                           (ii)  Candidate keys: Patient_ID, Email_ID and Phone_No, as they are unique.


                                                   SECTION C (3 × 3 = 9 Marks)
                 29.  Identify the following:                                                                 (3)
                      (a)  A software that is used to create, manipulate and maintain a relational database.
                      (b)  A special value that is stored when the actual data value is unknown for an attribute.
                      (c)  An attribute that can uniquely identify tuples in a relation.
                Ans.  (a)  Relational Database Management System (RDBMS)
                      (b)  NULL
                      (c)  Primary key

                 30.  (a)  Write an SQL statement to create a table, FLIGHTS, with the following specifications:   (3)
                         Flight_No (Numeric, Primary Key)
                         Airline_Name (Varchar (50), NOT NULL)
                         Source (Varchar (50))
                         Destination (Varchar (50))
                         Departure_Date (Date)
                         Ticket_Price (Decimal (10,2))
                                                               OR
                      (b)  Write SQL commands to perform the following tasks:
                          (i)  Create a database named Supermarket.
                          (ii)  Open the database Supermarket.
                         (iii)  Display the structure of the existing table, i.e., Products.
                Ans.  (a)  CREATE TABLE FLIGHTS
                        (
                        FLIGHT_NO INTEGER PRIMARY KEY,
                        AIRLINE_NAME VARCHAR(50) NOT NULL,
                        SOURCE VARCHAR(50),
                        DESTINATION VARCHAR(50),
                        DEPARTURE_DATE  DATE,
                               TICKET_PRICE DECIMAL(10,2)
                               );
                                                               OR



                                                              M.5
   30   31   32   33   34   35   36   37   38   39   40