Question given relation r (A,B,C,D) and the following fd’s. Identify the candidate key for r and highest normal form b->C, d->a question Consider the universal relation R= {A,


Fetching the cursor for retrieving the data Closing



Download 1.99 Mb.
Page4/5
Date21.11.2021
Size1.99 Mb.
1   2   3   4   5
Fetching the cursor for retrieving the data

  • Closing the cursor to release the allocated memory

    Purpose of Cursors:

    The major function of a cursor is to retrieve data, one row at a time, from a result set, unlike the SQL commands which operate on all the rows in the result set at one time.

    Cursors are used when the user needs to update records in a singleton fashion or in a row-by-row manner, in a database table.

    Question 2

    Given relation R (A,B,C,D) and the following FD’s. Identify the candidate key for R and highest normal form

    C->D, C->A, B->C 
    Answer:





    Question 3

    Why ‘Data Redundancy’ is higher in 1st Normal Form than other normal forms? Explain with example. 
    Data Redundancy is higher in 1st Normal Form than other normal forms because all we have to do is break the values into atomic values.

    By doing so, although a few values are getting repeated but values for the subject column are now atomic for each record/row.



    Using the First Normal Form, data redundancy increases, as there will be many columns with same data in multiple rows but each row as a whole will be unique.

    Example: Relation EMPLOYEE is not in 1NF because of multi-valued attribute EMP_PHONE.


    Download 1.99 Mb.

    Share with your friends:
  • 1   2   3   4   5




    The database is protected by copyright ©ininet.org 2020
    send message

        Main page