DBS PYQs
DBS PYQs
A)
C) The weak entity set is existence dependent on the identifying entity set, Illustrate. (2)
   2)              Explain the different recovery methods implemented in log based recovery system.
                                                                                                                            (5)
           A)
           B)      Given some sample data from the Student entity. Write MongoDB statements to do the following:
  3)
                    i) Describe the method for testing whether an attribute is extraneous in XY in F.
                   ii) Considertherelation R4, B, C, D, E, F) with following set F={4-BCD, BC-DE, B-D,                     (5)
           A)      D+A}.Compute the canonical cover of F.
           B)      Consider the tables given in Figure l. and write a PL/SQL block to take member_id, two borrowing
                   dates as input from keyboard and display Member Namne, Btitle, Bauthor corresponding to borrowing
                   transactions that took place during those dates.                                                        (3)
                                                                                                                                   1/3
 htps://manipal.exarmcloud. in/reports/exam-qpaper.php
  5/23/23.,9:23 AM                                                                       DSE 2252
    4)                                                                                           below:
                        Consider the relational schema on bank database application given
          A'           Customer(Custid, Name. Phone,intr custid,cily)
                        std is pyimar key and intr custidis foreign key referring cstomer
                      Iransaction(Aceno,Ir tvpe.Tr ld.Tr date, Amount)
                      AcCno is foreign ke reterrine Account. Ti ld.Tr date are primary Keys
                              iii. Findthe name, designation of the members who have borrowed the books that cost
                                 than Rs.S00 and on 15th November 2022.
                                                                                                                            (5)
                              iv. Display the name of members who have not yel relurned (Borro Status ='P') nore b.
                                 5 books.
                                v. FindCatevorv book, number of times it is borTOWed   durmg n Ist half year 20)2 ..)
                                                                  number of tines borrowed.
                                  Sort them indescending order of
                   10days after Borow Date. Also devclop a PLSQL block which takes member id and Borro date as
                  input and calls Due Books Count function to display returmed value.
  ..nd-...
                                                                            sfh- Dateboe Sytm
Type: MCQ
         4. Data lndependence
Q3. Several reservation agents try to assign a seat on an airline flight,                  component of
DBMS ensures that each seat can be accessed by only one agent at a time for assignment to a
passenger. (0.5)
         1. Recovery Manager
         2. **Concurrency Control Manager
         3. Authorization Manager
         4. Integrity Manager
                                                                                              (0.5)
Q4. User A who interacts with database system can be identified as sophisticated user because
       1. User A use any application or programs to request the database
       2. **User A write SQL queries to select/insert/delete/update data
       3. User A manages the entire database systemn
       4. UserA design and implements tools required for database system
 (0.5)
         1.    Select
                2.     Join
                3. **Project
                4.     Cartesian Product
                                                  data           independence is not true?
  Q7. Which one of the following statements about
  (0.5)
                                                                                and eliminating redundancies
               1  **Data independence leads to difficulties in integrating data
                                                                         change in physical storage structure
               2. Dataindependence is the immunity of applications to
                  access strategy
                                                          different applications to have different views of
               3. Data independence makes it possible for
                     the same data
                                                             database to grow without affecting existing
        4. Data independence is necessary toenable the
             applications
Q8. Select all the properties which are true with respect to Foreign key ?
                     Can take NULL values
                     Can Take Duplicates values
                     Can Take Unique Values Only
                                                                                     be different
                     Domain of foreign key and corresponding Parent key domain can
(0.5)
          1. () &(iü)
          2. ** (i) &(ü)
          3. (iü) &(iii)
          4. (ü) & (iv)
                                                                      automate deletion of child records
                              SOL clause has to be used If we want to
09.
without deleting corresponding parent records (0.5)
          1.
                   ** ON DELETE SET NULL
2. ON DELETE SET 0
          3. ON DELETE CASCADE
          4.       ON DELETE SET CASCADE
Q10. Relational Algebra is a                          language.(0.5)
          1 ** Procedural Language
          2. Declarative Language
          3. Object-Oriented Language
          4. Block Declarative Language
Type; DES
o11. Why does Database Management System require a query processor module? (2)
o12, Asume that the following tables with primary key exists.
       Vendor (V code,V name, V order),
        Product(P code,Quantity On Hand,Costprice, Discount, V_code),
Write the SQL commands to do following operations.
                                                     table referencing Vendor table.
a)Add a foreign key constraint on V code in productthan  10% of CostPrice                     (2)
D) Put a condition on Discount that must not be more
        (3
              Tune: 20-Apr-2023(08:00 AM- 09:00
                                                              AM)
    Date&
Exam
X2 Y1 Z2
X2 Y4 Z3
X1 Y1 Z4
X2 Y4 Z2
                                                       Y2       71
                                          X3
                  1. NO,YES
                  2. YES,YES
                   3.    YES,NO
                             NO,NO
                                                                                             R=(P,R,O,S)?   (0.5)
                                       is a trivial              functional dependency for
         Q3.    Which of the following
                    1.        PQ-R
                        2. POS’0S
                        3. P’S
                        4.        S’R
                                                                          attribute? (0.5)
                               following is             unlikely to be an
              Q4. Which of the
                         1,        Address
                         2.        Date of Birth
                             3. Supplies
                             4.     Item name
    Middle Name
                                narme
                                                             Student
     Last Name
DOB
        1.
        2.         Student(RollNo, FirstName,MiddleName,LastName,DOB)
        3         Student(RollNo, FirstName,MiddleName,LastName)
                    Student(RollNo,FirstName, MiddleName,LastName,PhoneNumber)
        4. Student(RollNo, Name,FirstName,MiddleName,LastName,PhoneNumber)
Q8. Given R= (A, B, C,
of the                 D,E,F) is a           relational schema and F= {A -> BC,B->E,
       following              functional dependency
        1
        2
                  AD->F                               does not hold? (0.5)           CD->EF}.Which
                  BC->F
        3         AD->B
        4.         BD->E
       Convert the
                following specialization into
Q11.                                                                      relational schema using method which
tribute redundancy. (2)                                                                                        minimizes
person
salary credit-rating
employee customer
officer-number hours-worked
station-number hours-worked
   Q4.
          Consider the following relations:
          Members (Member id, Name, Designation, Age)
          Books (Bid, Btitle, Bauthor, Bpublisher, Bprice)
           Reserves (Member id, Bid, Date)
          Write the query in relational algebra for the following:
      i      Retrieve the id and name of the members who are older than 45 years.
             List the title, author, publisher of the books reserved by assistant professors
   iii.      Find the name, designation, age of the members who have reserved the books that
             cost more than Rs.500 and on 15th November 2018.
  iv.        Find the member id and the number of books reserved by cach member.
   V.
            Find the id, name of the member along with the book title, author of the books
            published by Bright Publications.                    (5)
 Q7. Describe Boyce-Codd and third normal form with an example. (5)
Q8. Describe the two methods of representing specialization in ER Model into schema with
an example. (3)
09. What is a database trigger and what is the difference between row trigger and statement
trigger? (2)
Q10. Write the SQL commands to create the relational tables for the following schema
diagram (assume appropriate data type and size) as shown in figure 1
               Q1.Consider the relation R(A, B, Cc, R, D, T) and F= {A’BC, A’R, C’DT, B->CD}
                                    Check AB is Candidate keyor not, if not check A & B also.
                             ii     Find the canonical cover of F
                            iii.    Decompose R into 3NF relations
     (5)
    Q2. Consider the table Book (Book No, Book_title, author, type, pages, price, publisher_id)
    Describe the query processing steps in executing the query to display the title and price of
    the book written by the author Korth and price greater than 450.
    (3)
   Q3. Consider the index file and data file given below and answer the following.
                  What kind of index file structure is defined on the Branch data file.
      ii.         What changes are expected in the data file and index file when the records
                  <'Smalltown',105, John',650> and <'Redwood,333,'Lisa',789) are inserted into the
                  Branch file?
                       Index File
                                                                             Data File
                                                 Branch(Branch_name,account_no,customer_name,amount)
                      Bighton
                                                                                    217    Gccn        750
                  Dowotown                                     Bighton
                                                               Dowotown                    Joboson     SOO
                  Mianus
                                                               Dowatown             LLO    Petcs on    600
                  Peccicidgc
                                                                                    215    Sroith      700
                  Redwood                                           Mia ms
                  Round Hil                                    Pecticidg            L02    Hayes       400
                (2)
Q4. Consider the following relations for a database that keeps track of automobile sales in a
car dealership. (OPTION refers to some optional equipment installed inside the
automobile):
                CAR(Serial no,Model, Manufacturer, Cost_Price)
                OPTION(Serial no, Option name, Price)
               SALE(Salesperson id,Serial ng,Date, Sale_price)
               SALESPERSON(Salesperson id,Name,Phone)
Write the following queries in relational algebra:
          i.      Display the number of cars under each manufacturer.
      i.          Display the details of the car sold on 02-06-2022.
     iii.         Display the details of salesperson who sold the cars with selling price greater
                  than       2 lakhs.
    iv            Display the details of options that comes along with the car 'SWIFT' and "I20.
                 Displaythe details of salesperson selling cars manufactured by FORD (6
O5, DiscuSS the role of storage manager in the Database Management System environnens
(3)
                                                                                cot
Q6. Convert the following schedule into serial schedule and check whether it is
serializable?
         |T1     T2
         Read(A)
          Read(B)
          A-A+B
                         Read(B)
                         Read(C)
                         B=B+C
         Write(A)
                         Write(B)
              Re ad(A)
                         Read(A)
                         A=A+1000
                         Write(A)
              Read( C)
         C=C-1000
         Write(C)
(2)
                                                                   constraints used in an
Q7. Describe the mapping cardinality constraints and participation
Entity Relationship model. (5)
                Customer                                CakeOrder
      CustNo                                      Orderld
      |CName                                      OrderDate
      Phone                                       CustNo
      Pincode                                     Itemcode
      lcity                                       lotvordred
(5)
Q11. Write a stored procedure (Refer the following schema diagram.) to display quantity
wise three highest selling item names in the month JUNE.
                                                                              Cakeflavours
             CakeHouse                CakeHouse Flavours
                                                                          itemcode
        houseno                      houseno
                                                                         +itemName
        Pincode                      itemcode
                                                                           Price
        City                          Qty_available
        Ratings
Customer CakeOrder
        CustNo
                                               Orderld
        CName                                  OrderDate
        Phone                                   CustNo
                                                itemcode
        Pincode
        City                                   QtyOrdred
         Bonus Points Earned                   BillAmount
 (3)
Q12. Describe cursor attributes with an example. (2)
                                                  retrieval requirements by referring the
Q13. Write the SQL queries for the following data
relational schema diagram given below
               Customer
                                                      CakeOrder
        CustNo                                 Orderld
        CName                                  OrderDate
        Phone                                  CustNo
                                               |Itemcode
        Pincode
        City                                   QtyOrdred
        Bonus Points Earned                    BillAmount
                                                                         500/- are
               Find the Houseno in which cake items with price more than
               available.
                   Give 10 additional bonus points to customers who billed order for more thax
                   1000/- during CakeHouse anniversary week 06/06/2022 to 13/06/2022.
        i          Retrieve allthe Cake HouseNo and available ItemNames in the
                   location(pincode) where Customer with Name 'Ajay' lives.
                   Display the item name which is sold in quantity less than 30 during the 1 half
                   year of 2022.
                   Retrieve number of CakeHouse which are having rating 4 to 5 and existing in
                   the city in which Customer -Ravi lives. (5)
Q14. Write astored function (Refer Relational schema diagram given below) to accept
 Custld, BillAmount, Bonus Points to be surrendered as parameters and calculates eligibie
discount amount based on following criteria and return to calling PL/SQL block
                   Customer                                CakeOrder
        CustNo                                        Orderld
        CName                                         OrderDate
        Phone                                         lCustNo
        Pincode                                       |Itemcode
        City                                          |Qtyordred
             Bonus Points Earned                      BillAmount
                                                                            holds?
   Q1. Consider the relation instance given and determine whether AB->C,C’B
                                                         B
                                                               -|:
                                                 | a1    b1      | c1
                                                 | a1    bl        | c2
                                                  a2     b1        | c1
                                                  a2    | b1   |    c3
  (0.5)
               1.    ** NO,YES
               2. YES,YES
               3. YES, NO
               4. NO,NO
 Q2. How relation schema is created for a multivalued attribute 'A' in Entity E1 having 1-M
 relationship with Entity E2? (0.5)
              1. Primary Key(E1)U Primary Key(E2)
                    ** Primary Key(E1) UA
              3.     Primary Key(E1) - Foreign Key(E1) nA
              4. Primary Key(E1)U Foreign Key(E1) - A
 Q3. Consider the relation Telephone (Custld, STD_Code, City, STD_Region) and Set of
 functional dependencies
F= (Custld ’ STD_Code, STD_Code -City, STD_Code STD_Region).
What is the closure of STD Code? (0.5)
              1. (Custld, STD_Code, City, STD_Region)
              2. {STD_Code, City)
              3. (Custld, STD_Code,City)
          4. **STD_Code, City, STD_Region)
2. A’B
3. BC BA
           4. B->C
                              EMP(EmpNo,Ename,Salary, DeptNo), (Empno, Name)’Deptno, but DeptNOD
Q7. In the relation                                dependency is known as
                                                                                  dependency.
 only dependent on EmpNo.Such functional
  (0.5)
                1.    ** Partial
                2. Fully Functional
3. Transitive
4. Formal
DOCTORS PAIENIS
                                                               Repol
                                    Q     aliuo
ESIS
        (0.5)
                     1, **7
        2. 6
        3. 5
        4. 8
                                                     information     about the   most recently run
                              attributes that return
                  cursor has                               cursor. (0.5)
  09. An implicit                 associated  with anamed
           statement that is not
        1. ** SELECT
2. CREATE
3. DROP
4. ALTER
2. 31-MAY-22
3. 31-05-22
4. 30-MAY-22
Type: DES
 Q11.
                                                       .(2)
 Q12.
                                                      .(2)
Q13.
.(3)
Q14.
                                       .(3)
                                                            Database System
Type: MCQ
       Q1. Assume that we want to develop a multiplex show seat reservation system. In order to provide
      minimum response time which kind of processing system is suitable? (0.5)
                    1.      **Database System
                    2.     File-oriented
     Q2. A customers residential address has been changed and communicated to the ABC Bank.Now all
     the communication from the bank will reach to the new address because of           feature of
    database System (0.5)
               1          **Data Consistency
               2.         Data Abstraction
3. Data lsolation
           4. Data Independence
   Q3. In an airline DBMS we could have a situation where two travel agents sell the same airline seat
   at the same time and the total number of bookings made is larger than the capacity of the
   aircraft.The        feature of the database system provides solution for the above problem. (0.5)
           1             Data Security
          2. **Data Integrity
          3. Data Durability
          4. Data Consistency
Student(|D, Name,City,tutor)
 Course(Code,title, department)
Enrolment(|D, Code, Marks)
Which one of the following is correct?(0.5)
       1. ID and Code in Enrolment are both candidate keys
       2. (ID,tutor) in Student is a candidate key
                                          composite key
        3. ** (ID, Code) in Enrolment is
                                   key in Course
        4. (Code,title) is a super
  Q6. Which one of the following does not always have the same list of attributes that the operands
have? (0.5)
        1. **Project
        2.    Union
3. Select
4. Difference
 Type: DES
                                                                                                                .(2)
                     functionalities of DBA.
 Q11. Write any four