# Recent questions tagged database

Q7, from this assignment: https://nptel.ac.in/content/storage2/courses/106104135/assignment6.pdf S1 : r1(x),r2(x),w2(x),r3(x),w1(x), w2(y),r3(y),w3(x) S2 : r2(x),r1(x),w1(x),w2(x),w2(y),r3(x),w3(x),r3(y) Check whether they are view equivalent or not. ... read the initial value. In this case, initial value of x is read by T1 in S1, while in S2, it is read by T2. So are they view equivalent or not?
Consider the following schedule S T1 T2 T3 T4 Timestamp R(X) R(Y) t1 W(X) W(Y) t2 R(Y) R(X) t2 W(Y) W(X) t4 R(X) t5 W(X) t6 R(X) denotes read operation on data item X by Transcation Ti. W(X) denotes write operation on data item X by Transcation Ti. Choose the correct execution order for the above schedule S. a)T3-T2-T1-T4 b)T2-T3-T1-T4 c)T2-T4-T3-T1 d)T4-T2-T3-T1
Consider the following schedule T1 T2 T3 R(X) R(Y) R(Z) W(Z) W(Y) R(X) R(X) denotes read operation on data item X by Transcation Ti. W(X) denotes write operation on data item X by Transcation Ti. How many conflict serializable schedule are possible for the above schedule? a)6 b)5 c)3 d)8
In the context of timestamp-ordering protocol which of the following must be correct ? a)if TS(Ti)>=R-timestamp(Q),the operation is rejected b)if TS(Ti)>W-timestamp(Q),the operation is rejected and Ti is rolled back c)if TS(Ti)< W-timestamp(Q),the operation is rejected and Ti is rolled back d)if TS(Ti)< W-timestamp(Q),W-timestamp(Q) is set to TS(Ti).
Which of the following statements are false ? a)if any schedule is neither conflict serializable nor view serializable then that schedule must be inconsistent b)Timestamp protocol ensures freedom from deadlock c)Strict Two phase locking protocol ensures cascadeless rollback d)Lock point of a schedule in two phase locking protocol indicates final lock of the schedule
T1 T2 R(A) W(A) R(A) W(A) Dirty read problem is obviously here but if R2(A) comes between W1(A) and W2(A), but is it lost update problem?
1 vote
For two schedules, their precedence graphs are isomorphic. Can it be inferred that the schedules are conflict equivalent?
suppose there is a relation R(A,B,C) and A is the candidate key. AB → C is a F.D. does this violate 2NF ( doubt is that whether AB should be considered as subset of C.K. or not for checking partial dependency) and now we have another R(A,B,C,D), suppose BC forms C.K D → AB (whether this FD violates 3NF or not)
If anyone having any idea how to solve mainly the (b) part. Please help me out. Consider a relation R with five attributes ABCDE.For each of the following instances of R, state whether it violates (a) the FD BC→ D and (b) the MVD BC →→ D: (a) { } (i.e., empty relation) (b) {(a,2,3,4,5), (2,a,3,5,5)} (c) {(a,2, ... , (a,2,3,6,5), (a,2,3,6,6)} (g) {(a,2,3,4,5), (a,2,3,6,5), (a,2,3,6,6), (a,2,3,4,6)}
Consider the following collection of relations and dependencies. Assume that each relation is obtained through decomposition from a relation with attributes ABCDEFGHI and that all the known dependencies over relation ABCDEFGHI are listed for each question. (The questions are independent of each other, obviously, since the given dependencies ... G, G → H 4. R4(D,C,H,G), A → I, I → A 5. R5(A,I,C,E)
What do you mean by Seek? For Natural Loop Join, we calculate No. of Seeks are (nr + br). Assume that, Relation r is called the Outer Relation and Relation s is called the Inner Relation. (ni,bj) – ni represents total no. of tuples and bj represents no. of blocks in that relation. Reference (Korth) – For Block Nested-Loop Join –
1 vote
I am having few doubts in Tuple Relational Calculus and finding it difficult. Please, can you help me in understanding this. Doubt-1: Is this Query unsafe coz of ¬employee(x)? I am really confused coz this links says that (https://www2.cs.sfu.ca/CourseCentral/354 ... - https://gateoverflow.in/1258/gate2007-60 Doubt-2: Why we haven't changed belongs to to not belongs to while applying the negation?
Please check this table is correct or not – Recoverability Serializability Deadlock free Starvation free 2PL No Yes No No Strict 2PL Yes Yes No No Rigorous 2PL Yes Yes No No conservative 2PL Yes Yes Yes No Timestamp ordering protocol(TSP) No Yes yes No Strict TSP Yes Yes Yes No Thomas write rule No yes Yes No Strict TSP + wound-wait + wait-die Yes Yes Yes Yes
What is the best strategy to approach these kind of questions? I am facing difficulties in solving indexing numericals. Any help would be highly appreciated. Thank you.
What happens when R1/R2 & R2 is NULL ????
https://gateoverflow.in/96566/view-serializable S1: R(A) W(A) W(B) S2: R(A) W(A) R(B) W(B) How many view serializable schedules are possible which are not conflict serializable? (A) 0 (B) 1 (C) 2 (D) 3 The above question has ... -dbms-view-conflict-serializable-schedules?show=77897#q77897 It is showing the question has been hidden. Can anyone explain to me the actual solution of the question ?
For the following schedule ( Link : https://gateoverflow.in/26378/view-serializability ) , check whether it is view serializable or not. T1 T2 W(A) W(A) R(A) There is a cycle in the precedence graph. So, it is not conflict serializable. There are 2 blind ... before T2 does. The graph becomes : Since there is a cycle in the polygraph, the schedule is not view serializable. Is my approach correct ?
1. There are 2 relations: gate2016 (exam_date, exam_center, branch_id) and candidate (rollno, name, bid, refno, choice_of_date). In a candidate relation, bid is the foreign key which refers to the key of gate2016. Suppose an insertion into candidate relation ... relation can cause inconsistency (c) Both operations can cause inconsistency of data (d) None of them can cause inconsistency of data
I knw the rules of view serializability but I want to check a schedule is view serializable or not using POLYGRAPH TEST. So, the given schedule is S:R1(X),W2(X),W1(X) ( link : https://gateoverflow.in/9429/problem-on-view-serializability ) Since ... polygraph, so the schedule is not view serializable. Kindly say is my approach about polygraph testing for view serializability is correct or not ?
For the following schedule, how many blind writes are possible ? My answer is total 3 blind writes are possible which I have marked above. Is it correct ?
https://gateoverflow.in/258022/dbms-basic-test1 Int the above question, as per the diagram, the leaves are supposed to be in level 4 and so the number of children in level 3 which equals to 27 as per calculation means the number of child pointers to level 4 that is the leaf node level is actually 27. Am I correct ?
For the below question, https://gateoverflow.in/285557/madeeasy-test-series-databases-b-tree Can anyone explain option B and option D ? I mean what they actually mean to say ?
The number of serial schedules which are view equal to schedule(s) but not conflict equal to schedule(s) are ________.
1 vote
When it comes to inserting something in a foreign key table, we cant put null values. But when it comes to deleting something from referenced table, we can perform ON DELETE SET NULL operation and make the foreign key value in a particular tuple as NULL. So, a foreign key can’t remain null while inserting but it can be null while deletion. Is my approach correct ?
Can someone write the entire steps and rules of polygraph test to check view serializability. P.S. : Kindly, dont give me links. Please write the rules in a stepwise manner if known.
Regarding statement Q, I don’t think it will violate 3NF because whatever be the R.H.S. if L.H.S. is superkey, then it is in BCNF and ultimately in 3NF. Therefore, it is allowed in 3NF and so the statement is supposed to be right. Is my approach correct ?
https://gateoverflow.in/208190/lossy-or-lossless In the above question : FDs are AB→C,AC→B,AD→E,B→D,BC→A,E→G. R1 ( ABC ) : AB → C AC → B BC → A R2 ( ACDE ) : AD → E R3 ( ADG ) has empty FDs. So, the above decomposition is not dependency preserving. But ... is AD a key order to check lossless decomposition ? Do we have 2 consider the closure of original fds to prove AD as key for R3 ( ADG ) ?
I know that BCNF may not satisfy dependency preserving but it should be lossless. So, when we are decomposing a relation for satisfying BCNF, we don’t care about the dependency preservation condition. But what about 3NF ? Is it compulsory to check for dependency preservation condition after a table has been decomposed to satisfy 3NF ?
In a file which contains 1 million records and the order of the tree is 100, then what is the maximum number of nodes to be accessed if B+ tree index is used? I need proper explanation I did not understood the answer of this question as it was already posted.
Kindly show the output also. Thank you.
The answer is given 6. I am getting 6 too but I want to confirm the output. SID GATEID 12 101 12 104 15 101 16 103 25 102 27 NULL Am I correct?
Consider the following relation: R (A1, A2, ….An) and every (n-2) attributes of R forms a candidate key. How many super keys are there in R?
2PL generates serializability, but it does not prevent deadlocks. 2PL has 2 phases: growing and shrinking. Which of the following rules are used to govern the 2PL protocol? (a) 2 transactions cannot have conflicting locks (b) No unlock operation can precede a lock operation in the ... about C? What does it want to say? For option A, 2PL has deadlocks, so doesn't it mean it has conflicting locks?
Choose the False statement: (a) time stamp protocol is deadlock free (b) 2- phase locking generates serializability (c) strict 2-phase locking is deadlock free (d) time stamp protocol may not result recoverable schedule
Query1: SELECT eno FROM emp WHERE deptno=10 union SELECT eno FROM emp WHERE deptno=20 Query2: SELECT eno FROM emp WHERE deptno=10 or deptno=20 Let the result of Queryl is Q1 and the result of Query2 is Q2, then which of the following is always true? (A) Q1=Q2 (B) Q1 $\subseteq$ Q2 (C) Q2 $\subseteq$ Q1 (D) Data is insufficient