search
Log In

Recent questions and answers in Databases

1 vote
2 answers
3
Consider the following relation: R (A B C) A primary key with 100 tuples. S (E F G) E primary key with 50 tuples. T (AE D) AE primary key with 80 tuples. U (D G H) H primary key with 10 tuples. The maximum number of possible records in the result of _______.
answered Jul 14 in Databases Mohitdas 886 views
0 votes
1 answer
4
Consider the timestamp ordering protocol, and two transactions, one that writes two data items p and q, and another that reads the same two data items. Give a schedule whereby the timestamp test for a write operation fails and causes the first transaction to be ... carry out actions, but are unable to complete their task because of interaction with the other processes, is called a live lock.)
answered Jul 8 in Databases prasapi 455 views
0 votes
2 answers
5
Find minimum number of tables required for converting the following entity relationship diagram into relational database? $2$ $4$ $3$ $5$
answered Jul 3 in Databases Rohitagamkumar 188 views
52 votes
5 answers
6
Consider the following entity relationship diagram $(ERD)$, where two entities $E1$ and $E2$ have a relation $R$ of cardinality 1:m. The attributes of $E1$ are $A11$, $A12$ and $A13$ where $A11$ is the key attribute. The attributes of $E2$ are $A21$, $A22$ and $A23$ where ... of the third normal form ($3NF$) is designed from the above $ERD$. The number of tables in the database is $2$ $3$ $5$ $4$
answered Jul 1 in Databases PRIYANSHU10 10.8k views
5 votes
5 answers
7
Consider the following statements $S1$ and $S2$ about the relational data model: $S1$: A relation scheme can have at most one foreign key. $S2$: A foreign key in a relation scheme $R$ cannot be used to refer to tuples of $R.$ Which one of the following choices is correct? Both $S1$ and $S2$ are true $S1$ is true and $S2$ is false $S1$ is false and $S2$ is true Both $S1$ and $S2$ are false
answered Jun 29 in Databases PRIYANSHU10 1.5k views
48 votes
5 answers
8
Which of the following statements are TRUE about an SQL query? P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause R : All attributes used in the GROUP BY clause ... S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause P and R P and S Q and R Q and S
answered Jun 29 in Databases PRIYANSHU10 22.1k views
41 votes
5 answers
9
Consider the following relational schema: $\text{Student} (\underline{\text{school-id}, \text{sch-roll-no}}, \text{sname}, \text{saddress})$ $\text{School} (\underline{\text{school-id}}, \text{sch-name}, \text{sch-address}, \text{sch-phone})$ ... in it, the name of the school and the number of its students scoring $100$ in at least one exam nothing; the query has a syntax error
answered Jun 29 in Databases PRIYANSHU10 9.7k views
29 votes
4 answers
10
The below figure shows a $B^+$ tree where only key values are indicated in the records. Each block can hold upto three records. A record with a key value $34$ is inserted into the $B^+$ tree. Obtain the modified $B^+$ tree after insertion.
answered Jun 12 in Databases Arjun 4.7k views
26 votes
6 answers
11
Which one of the following statements about normal forms is $\text{FALSE}?$ $\text{BCNF}$ is stricter than $\text{3NF}$ Lossless, dependency-preserving decomposition into $\text{3NF}$ is always possible Lossless, dependency-preserving decomposition into $\text{BCNF}$ is always possible Any relation with two attributes is in $\text{BCNF}$
answered Jun 12 in Databases Arjun 8.4k views
1 vote
3 answers
12
Consider two $n \times 1$ vectors $u$ and $v$ , stored as table $U(\text{ind,val})$ and $V(\text{ind,val})$ with the same schema A row $(i,u_i)$ of table $U$ specifies the $i^{th}$ element of vector $u$ has value $u_i$ (similarly for $v$, ... $u + v$ of the two vectors $u$ and $v$. Explain your solution.
answered Jun 11 in Databases gilgamesh 504 views
1 vote
2 answers
13
The following relation records the age of $500$ employees of a company, where $empNo$ (indicating the employee number) is the key: $empAge(\underline{empNo},age)$ ... one other employee Employee numbers of all employees whose age is not the minimum Employee numbers of all employees whose age is the minimum
answered Jun 11 in Databases Kanwae Kan 870 views
1 vote
2 answers
14
1 vote
5 answers
15
I know that every schedule produced by the Timestamp-based protocol is conflict serializable. But is vice versa is true? Means is all conflict serializable schedules produced by timestamp based protocol ?
answered Jun 10 in Databases adeemajain 1.1k views
1 vote
3 answers
16
2pl
answered Jun 10 in Databases adeemajain 556 views
2 votes
5 answers
17
Consider the relation $R(P,Q,S,T,X,Y,Z,W)$ with the following functional dependencies. $PQ\rightarrow X;\quad P\rightarrow YX;\quad Q\rightarrow Y; \quad Y\rightarrow ZW$ Consider the decomposition of the relation $R$ into the constituent relations according to ... , but $D_2$ is a lossless decomposition Both $D_1$ and $D_2$ are lossless decompositions Both $D_1$ and $D_2$ are lossy decompositions
answered Jun 3 in Databases ShouvikSVK 1.3k views
37 votes
7 answers
20
Consider a join (relation algebra) between relations $r(R)$ and $s(S)$ using the nested loop method. There are $3$ buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming $\text{size}(r(R))<\text{size}(s(S)),$ the join will have ... $s(S)$ is more than $0.5$. join selection factor between $r(R)$ and $s(S)$ is less than $0.5$.
answered May 27 in Databases felics moses 1 12k views
53 votes
6 answers
21
Consider the following relation schema pertaining to a students database: Students (rollno, name, address) Enroll (rollno, courseno, coursename) where the primary keys are shown underlined. The number of tuples in the student and Enroll tables are $120$ and $8$ respectively. What are the maximum and ... in (Student * Enroll), where *' denotes natural join? $8, 8$ $120, 8$ $960, 8$ $960, 120$
answered May 20 in Databases Deepakk Poonia (Dee) 14.2k views
0 votes
1 answer
22
Given two tables EMPLOYEE (EID, ENAME, DEPTNO) DEPARTMENT (DEPTNO, DEPTNAME) Find the most appropriate statement of the given query: Select count (*) total' from EMPLOYEE where DEPTNO IN (D1,D2) group by DEPTNO having count (*) >5 Total number of employees in each ... $>5$ Display total number of employees in both departments $D1$ and $D2$ The output of the query must have at least two rows
answered May 16 in Databases chirudeepnamini 145 views
0 votes
2 answers
23
To undo the effects of a committed transaction the only way is a) rollback transaction b) abort transaction c) execute a compensating transaction d)None of these
answered May 3 in Databases Yash4444 271 views
0 votes
3 answers
24
1 vote
5 answers
25
For a $B^+$ - tree of order $d$ with $n$ leaf nodes, the number of nodes accessed during a search is $O(\_)$.
asked May 3 in Databases gatecse 277 views
5 votes
2 answers
26
Suppose a database system crashes again while recovering from a previous crash. Assume checkpointing is not done by the database either during the transactions or during recovery. Which of the following statements is/are correct? The same undo and redo list ... any further All the transactions that are already undone and redone will not be recovered again The database will become inconsistent
answered May 2 in Databases abhi97.dutta 1.4k views
0 votes
2 answers
27
1 vote
3 answers
28
Database systems that store each relation in a separate operating system file may use the operating system's authorization scheme, instead of defining a special scheme themselves. In this case, which of the following is false? The administrator enjoys more control on ... in a file Operations on the database are speeded up as the authorization procedure is carried out at the operating system level
answered Apr 19 in Databases Zaidi 893 views
1 vote
4 answers
29
0 votes
3 answers
30
A primary key for an entity is a candidate key any attribute a unique attribute a superkey
answered Apr 14 in Databases himanshu dhawan 1.5k views
10 votes
4 answers
31
Indicate which of the following statements are true: A relational database which is in $3$NF may still have undesirable data redundancy because there may exist: Transitive functional dependencies Non-trivial functional dependencies involving prime ... functional dependencies involving prime attributes only on the left-side. Non-trivial functional dependencies involving only prime attributes.
answered Apr 14 in Databases Arjun 4.2k views
36 votes
5 answers
32
Consider three data items $D1, D2,$ and $D3,$ and the following execution schedule of transactions $T1, T2,$ and $T3.$ In the diagram, $R(D)$ and $W(D)$ denote the actions reading and writing the data item $D$ ... $T2; T3; T1$ The schedule is serializable as $T2; T1; T3$ The schedule is serializable as $T3; T2; T1$ The schedule is not serializable
answered Apr 9 in Databases Tiklu_95 5.8k views
2 votes
5 answers
33
The E-R model is expressed in term of I. Entities II. The relationship among entities. III. The attributes of the entities. IV. Functional relationship. (A) I, II (B) I, II, IV (C) II, II, IV (D) I, II, III
answered Apr 8 in Databases himanshu dhawan 2.2k views
0 votes
3 answers
35
The $\text{E-R}$ model is expressed in terms of : Entities The relationship among entities The attributes of the entities Then (i) and (iii) (i) and (ii) (ii) and (iii) None of the above
answered Apr 8 in Databases himanshu dhawan 166 views
2 votes
4 answers
36
An entity has: (i) a set of properties (ii) a set of properties and values for all the properties (iii) a set of properties and the values for some set of properties may non-uniquely identify an entity (iv) a set of properties and the values for some set of properties may uniquely identify an entity Which of the above are valid? (i) only (ii) only (iii) only (iv) only
answered Apr 8 in Databases himanshu dhawan 1.1k views
0 votes
3 answers
37
An Entity-relationship diagram is a tool to represent Data model Process model Event model Customer model
answered Apr 8 in Databases himanshu dhawan 1.2k views
21 votes
3 answers
38
Suppose we have a database consisting of the following three relations. $\text{FREQUENTS (student, parlor)}$ giving the parlors each student visits. $\text{SERVES (parlor, ice-cream)}$ ... parlor) Express the following in SQL: Print the students that frequent at least one parlor that serves some ice-cream that they like.
answered Apr 7 in Databases 0xprateek 3.6k views
21 votes
6 answers
39
Suppose a database consist of the following relations: SUPPLIER (SCODE,SNAME,CITY). PART (PCODE,PNAME,PDESC,CITY). PROJECTS (PRCODE,PRNAME,PRCITY). SPPR (SCODE,PCODE,PRCODE,QTY). Write SQL programs corresponding to the following queries: Print PCODE values for parts supplied to ... specified part to a project in the second city, but do not print the triples in which the two CITY values are same.
answered Apr 7 in Databases 0xprateek 1.8k views
0 votes
4 answers
40
An entity instance is a single occurrence of an ______. Entity type Relationship type Entity and relationship type None of these
answered Apr 7 in Databases himanshu dhawan 1.2k views
To see more, click for all the questions in this category.
...