Study MaterialsImportant QuestionsImportant Questions for Class 12 Computer Science (C++) – Database Concepts

Important Questions for Class 12 Computer Science (C++) – Database Concepts

Important Questions for Class 12 Computer Science (C++) – Database Concepts

Previous Years Examination Questions
2 Marks Questions

Question 1:
Observe the following table MEMBER carefully and write the name of the RDBMS operation out of (i) SELECTION (ii) PROJECTION (iii) UNION (iv) CARTESIAN PRODUCT, which has been used to produce the output as shown in RESULT. Also, find the Degree and Cardinality of the RESULT: All India 2017
Answer:
RDBMS Operation → SELECTION
Degree of table RESULT = 3
Cardinality of table RESULT = 1

    Fill Out the Form for Expert Academic Guidance!



    +91

    Verify OTP Code (required)


    I agree to the terms and conditions and privacy policy.

    Question 2:
    Observe the following PARTICIPANTS and EVENTS tables carefully and write the name of the RDBMS operation which will be used to produce the output as shown in RESULT? Also, find the Degree and Cardinality of the RESULT. All India 2016
    Answer:
    RDBMS Operation → Cartesian Product
    Degree → 4, Cardinality → 6

    Question 3:
    Observe the following STUDENTS and EVENTS tables carefully and write the name of the RDBMS operation which will be used to produce the output as shown in LIST. Also, find the Degree and Cardinality of the LIST. Delhi 2016
    Answer:
    RDBMS Operation → Cartesian Product
    Degree → 4, Cardinalitv → 6

    Question 4:
    Observe the following table carefully and write the names of the most appropriate columns, which can be considered as
    (i) Candidate keys and (ii) Primary key. Delhi 2015

    Answer:
    (i) Candidate Keys → Id, Product
    (ii) Primary Key → Id

    Question 5:
    Observe the following table carefully and write the names of the most appropriate columns, which can be considered as (i) Candidate keys and (ii) Primary key: All India 2015

    Answer:
    (i) Candidate Keys → Code, Item
    (ii) Primary Key → Code

    Question 6:
    Observe the following table carefully and find the degree and cardinality of the table : All India 2018 (C)

    Answer:
    Degree → 3, Cardinality → 5

    Question 7:
    Observe the following table and answer the parts (i) and (ii): All India 2014 (C)

    (i) In the above table, can we have Qty as primary key? [Answer as yes/no]. Justify your answer.
    (ii) What is the cardinality and degree of the above table?
    Answer:
    (i) No, Qty cannot have as primary key because it is not uniquely identify in a table.
    (ii) Cardinality → 5, Degree → 4

    Question 8:
    Explain the concept of Cartesian Product between two tables, with the help of appropriate example. All India 2014

    Or

    Illustrate cartesian product operation between the two tables/relations using a suitable example. Delhi 2012 (C)
    Answer:
    Cartesian Product The cartesian product means the cross join of two relations and the resultant relation will contain all the possible combinations of the tuples from the two tables, i.e. the cardinality of the resulting relation will be equal to the product of cardinalities of the two relations. It is denoted by ‘x’ symbol.
    The two tables GABS1 and GABS2 are as follows:

    The cartesian product of above two tables is as follows:

    Question 9:
    Explain the concept of candidate keys with the help of an appropriate example. All India 2013

    Or

    What do you understand by candidate key in a table? Give a suitable example of candidate key from a table containing some meaningful data. Delhi 2010.2009
    Answer:
    A candidate key is a set of one or more attributes that uniquely identify in a table. There can be multiple candidate keys in one table. Each candidate key can work as a primary key.

    Question 10:
    What is the difference between degree and cardinality of a table? What is the degree and cardinality of the following table?
    Delhi 2013

    Answer:
    Degree The number of attributes or columns in a table is called the degree of the table. The degree of the given table is : 3.
    Cardinality The number of rows or records in a table is called ,the cardinality of the table. The cardinality of the given table is : 2.

    Question 11:
    Differentiate between the primary key and alternate key of a table with the help of an example. Delhi 2013C

    Or

    Give a suitable example of a table with sample data and illustrate primary and alternate keys in it. All India 2012.2011; Delhi 2011 (c)
    Answer:
    Primary Key It’s a column or set of columns that helps to identify records uniquely. One table can have only one primary key.
    Alternate Key/Secondary Key It’s a column or set of columns that can act as a primary key but not selected as a primary key.

    e.g. In table Student, RollNo and AdmNo of all students are different.
    Both of them can be selected as primary key. Suppose we have selected RollNo as a primary key then AdmNo is called as alternate key.

    Question 12:
    Give suitable example of a table with sample data and illustrate primary and candidate keys in it. Delhi 2012
    Answer:
    The table student is as follows:

    Here, AdmNo and RollNo both can identify records uniquely. So, both are candidate keys, and from them we can also make AdmNo as a primary key.

    Question 13:
    What do you mean by union and cartesian product operation in relational algebra? Delhi 2011
    Answer:
    Union (binary operator) It operates on two relations and is indicated by ‘∪’.
    Cartesian Product (binary operator) It operates on two relations and is denoted by ‘×’. e.g. cartesian product of two relations R1 and R2 is represented by R = R1 x R2. The degree of R is equal to sum of degrees of R1 and R2. The cardinality of R is product of cardinality of R1 and cardinality of R2.
    e.g. R = R1 ∪ R2 represents union operation between two relations R1 and R2. The degree of R is equal to degree of R1. The cardinality of R is sum of cardinality of R1 and cardinality of R2.

    Question 14:
    What do you understand by selection and projection operation in relational algebra? All India 2011
    Answer:

     

    Question 15:
    What do you understand by primary key? Give a suitable example of primary key from a table containing some meaningful data. All India 2010
    Answer:
    A primary key is a set of one or more attributes that can uniquely identify tuples within the relation.
    e-g.

    The attribute ItemNo is a primary key as it contains unique value for each tuple in a relation.

    Question 16:
    What is the purpose of a key in a table? Give an example of a key in a table. All India 2009
    Answer:
    A key is used to identify a tuple uniquely within the relation. The value of key is unique. No rows in the relation can have same value, e.g. in an Employee relation EmpCode is a key, using EmpCode one can obtain the information of a particular employee.

    Chat on WhatsApp Call Infinity Learn