Professional Documents
Culture Documents
Cse & It: Internal Question Paper
Cse & It: Internal Question Paper
Form No. AC 27. 00.2018 | GMR Institute of Technology, Rajam, Andhra Pradesh. Note to the Students: The
question papers are set in accordance with OBE capturing various cognitive levels of RBT as well as expected
AC 27 COs. This direct assessment tool of Descriptive Examinations is deployed to test the Cognitive Level of
Students w.r.t. Lower Order Thinking Skills.
GMR Institute of Technology, Quality Management System
Internal Question Paper (GMRIT : QMS)
Answer:
Heap File Organization
Any record can be placed any where in the file where there is space for record. There is no
ordering of record. Generally there is a single file for each relation (table)
Sequential File Organization
Records are stored in sequential order, according to the value of a “search key” of each record.
Delete Anomaly:
If we delete from EMP_DEPT an employee tuple that happens to represent the
last employee, the information containing that department is lost from the
database
Consider the relation:
Modify Anomaly:
If we change the value of the manager of department 5, we must update the tuples of all
employees who work in the department.
Examples:
SSN -> DMGRSSN is a transitive FD
Since SSN -> DNUMBER and DNUMBER -> DMGRSSN hold
SSN -> ENAME is non-transitive
Since there is no set of attributes X where SSN -> X and X -> ENAME
(b)
Form No. AC 27. 00.2018 | GMR Institute of Technology, Rajam, Andhra Pradesh. Note to the Students: The
question papers are set in accordance with OBE capturing various cognitive levels of RBT as well as expected
AC 27 COs. This direct assessment tool of Descriptive Examinations is deployed to test the Cognitive Level of
Students w.r.t. Lower Order Thinking Skills.
GMR Institute of Technology, Quality Management System
Internal Question Paper (GMRIT : QMS)
A relation
schema R is in second normal form (2NF) if every non-prime attribute A in R is
fully functionally dependent on the primary key
A functional dependency X->Y is a partial dependency if some attribute A
belong X can be removed from X and the dependency still holds
If the primary key contains a single attribute, it is 2NF
Normalization into 2NF:
If a relation schema is not in 2NF, it can be normalized into a number of
2NF relations where nonprime attributes are associated with only with
the part of the primary key on which they are fully functionally
dependent
8
Example of a schedule that is not conflict serializable:
We are unable to swap instructions in the above schedule to obtain either the serial schedule <
T3, T4 >, or the serial schedule < T4, T3 >.
View serializability provides a weaker and still consistency preserving notion of serialization
Let S and S´ be two schedules with the same set of transactions. S and S´ are view equivalent if
the following three conditions are met, for each data item Q,
1. If in schedule S, transaction Ti reads the initial value of Q, then in schedule S’ also
transaction Ti must read the initial value of Q.
2. If in schedule S transaction Ti executes read(Q), and that value was produced by
transaction Tj (if any), then in schedule S’ also transaction Ti must read the value of Q
that was produced by the same write(Q) operation of transaction Tj .
3. The transaction (if any) that performs the final write(Q) operation in schedule S must
also perform the final write(Q) operation in schedule S’.
Analyze the anomalies occurs due to Concurrent Execution of Transactions with suitable
examples
Answer:
Anomaly -1:(3 marks)
9 Lost Update: Explanation with proper example
Anomaly -2:(3 marks)
Dirty read: Explanation with proper example
Anomaly -3:(4 marks)
Incorrect summary: Explanation with proper example
Identify the difference between Write-Ahead Logging, Steal/No-Steal, Force/No-Force, and
checkpoints in the system.
Answer:
Write-Ahead logging: any change to DB element is first recorded in log. The log record is
written to stable storage before DB’s element change is written to disk. .(2 Marks)
Steal: if a frame is dirty and chosen for replacement, the page it contains is written to disk even
if the modifying transaction is still active.
No-Steal: If we place a no-steal policy then commit and abortion of transactions will work
10
properly. But consider, many a transactions executing simultaneously under the umbrella of no-
steal policy and there is a batch transaction which requires large number of pages to be loaded
one after another. As few frames will be allocated to it hence it has to manage within the
limited allocation. Another problem is, due to non-stealing as all pages of a transaction must be
in memory for a commit to happen, and there is no availability of such large numbers of frames.
This will result in locking of many transactions. (3 Marks)
Force: Forcing means that every time a transaction commits, all the affected pages will be
pushed to stable storage. This is inefficient, because each page may be written by many
Form No. AC 27. 00.2018 | GMR Institute of Technology, Rajam, Andhra Pradesh. Note to the Students: The
question papers are set in accordance with OBE capturing various cognitive levels of RBT as well as expected
AC 27 COs. This direct assessment tool of Descriptive Examinations is deployed to test the Cognitive Level of
Students w.r.t. Lower Order Thinking Skills.
GMR Institute of Technology, Quality Management System
Internal Question Paper (GMRIT : QMS)
Check points: A checkpoint is like a snapshot of the DBMS state, and by taking checkpoints
periodically, as we will see, the DBMS can reduce the amount of work to be done during restart
in the event of a subsequent crash. Checkpoint is a mechanism where all the previous logs are
removed from the system and stored permanently in a storage disk. Checkpoint declares a point
before which the DBMS was in consistent state, and all the transactions were committed.
(2 Marks)
1.Transient objects
11 (a)
To implement persistence in OODB: schemes
1. Check Pointing:
2. Serialization: The process of writing an object to disk, or loading it from disk.
Serializing usually just simply 'flattens' the object (and its children if they exist) into a
series of bytes that can be sent to a stream (network, disk, etc.)
3. Explicit paging
Form No. AC 27. 00.2018 | GMR Institute of Technology, Rajam, Andhra Pradesh. Note to the Students: The
question papers are set in accordance with OBE capturing various cognitive levels of RBT as well as expected
AC 27 COs. This direct assessment tool of Descriptive Examinations is deployed to test the Cognitive Level of
Students w.r.t. Lower Order Thinking Skills.
GMR Institute of Technology, Quality Management System
Internal Question Paper (GMRIT : QMS)
Form No. AC 27. 00.2018 | GMR Institute of Technology, Rajam, Andhra Pradesh. Note to the Students: The
question papers are set in accordance with OBE capturing various cognitive levels of RBT as well as expected
AC 27 COs. This direct assessment tool of Descriptive Examinations is deployed to test the Cognitive Level of
Students w.r.t. Lower Order Thinking Skills.