Recent questions tagged databases

54 54 votes
4 answers 4 answers
15.5k
15.5k views
Consider the relation scheme $R = (E, F, G, H, I, J, K, L, M, N)$ and the set of functional dependencies $$\left\{ \{E, F \} \to \{G\}, \{F\} \to \{I, J\}, \{E, H\} \to \...
41 41 votes
10 answers 10 answers
17.1k
17.1k views
Consider the following relational database schemes:COURSES (Cno, Name)PRE_REQ(Cno, Pre_Cno)COMPLETED (Student_no, Cno)COURSES gives the number and name of all the availab...
68 68 votes
6 answers 6 answers
30.9k
30.9k views
Consider the following database relations containing the attributesBook_idSubject_Category_of_bookName_of_AuthorNationality_of_AuthorWith Book_id as the primary key.What ...
32 32 votes
9 answers 9 answers
10.4k
10.4k views
Suppose we have a database consisting of the following three relations.$\text{FREQUENTS (student, parlor)}$ giving the parlors each student visits.$\text{SERVES (parlor, ...
107 107 votes
8 answers 8 answers
28.0k
28.0k views
Which of the following query transformations (i.e., replacing the l.h.s. expression by the r.h.s expression) is incorrect? R1 and R2 are relations, C1 and C2 are selectio...
75 75 votes
3 answers 3 answers
15.4k
15.4k views
There are five records in a database.$$\begin{array}{|c|c|c|c|} \hline \textbf {Name} & \textbf {Age} & \textbf {Occupation} & \textbf{Category } \\\hline \text{Rama} & ...
49 49 votes
10 answers 10 answers
22.4k
22.4k views
Which normal form is considered adequate for normal relational database design?$2NF$$5NF$$4NF$$3NF$
107 107 votes
10 answers 10 answers
37.7k
37.7k views
Consider the following transactions with data items $P$ and $Q$ initialized to zero:$${\begin{array}{|c|l|r|c|}\hline \textbf{$T_1$}& \text{read (P);}\\ & \text{read...
10 10 votes
7 7 answers
28.2k
28.2k views
Relations produced from E-R Model will always be in _____1 NF2 NF3 NF4 NF
65 65 votes
5 answers 5 answers
23.0k
23.0k views
Relation $R$ has eight attributes $\text{ABCDEFGH}$. Fields of $R$ contain only atomic values. $F = \{ CH$ $\rightarrow$ $G, A \rightarrow BC, B \rightarrow CFH, E \right...
71 71 votes
3 answers 3 answers
23.2k
23.2k views
Consider the following relational schema.Students(rollno: integer, sname: string)Courses(courseno: integer, cname: string)Registration(rollno: integer, courseno: integer,...
1 1 vote
2 answers 2 answers
3.1k
3.1k views
Here is para from wiki, about functional dependency in relation dbmsGiven a relation R, a set of attributes X in R is said to functionally determine another set of attrib...
27 27 votes
5 answers 5 answers
17.6k
17.6k views
Consider the set of relationsEMP (Employee-no. Dept-no, Employee-name, Salary)DEPT (Dept-no. Dept-name, Location)Write an SQL query to:Find all employees names who work i...
49 49 votes
2 answers 2 answers
13.2k
13.2k views
Consider a B-tree with degree $m$, that is, the number of children, $c$, of any internal node (except the root) is such that $m \leq c \leq 2m-1$. Derive the maximum and ...
54 54 votes
5 answers 5 answers
29.0k
29.0k views
Which of the following is/are correct?An SQL query automatically eliminates duplicatesAn SQL query will not work if there are no indexes on the relationsSQL permits attri...
100 100 votes
14 answers 14 answers
48.7k
48.7k views
Consider the schema $R=(S,T, U, V)$ and the dependencies $S \rightarrow T, T \rightarrow U, U \rightarrow V$ and $V \rightarrow S$. Let $R = (R1\text{ and } R2)$ be a dec...
81 81 votes
7 7 answers
23.3k
23.3k views
For the schedule given below, which of the following is correct:$$\begin{array}{ll} \text{1} & \text{Read A} & \text{} \\ \text{2} & \text{} & \text{Read B} \\ \text{3...
49 49 votes
4 answers 4 answers
22.8k
22.8k views
Which of the following is correct?B-trees are for storing data on disk and B$^+$ trees are for main memory.Range queries are faster on B$^+$ trees.B-trees are for primary...
41 41 votes
4 answers 4 answers
8.4k
8.4k views
Let $R = (A, B, C, D, E, F)$ be a relation scheme with the following dependencies $C \rightarrow F, E \rightarrow A, EC \rightarrow D, A \rightarrow B $. Which one of the...
39 39 votes
1 answers 1 answer
8.8k
8.8k views
The relational algebra expression equivalent to the following tuple calculus expression:$\left\{t \mid t \in r \land \left(t[A] = 10 \land t[B]=20\right)\right\}$ is$\sig...
62 62 votes
5 answers 5 answers
26.9k
26.9k views
Consider the join of a relation $R$ with a relation $S$. If $R$ has $m$ tuples and $S$ has $n$ tuples then the maximum and minimum sizes of the join respectively are$m+n$...
67 67 votes
5 answers 5 answers
22.9k
22.9k views
An index is clustered, ifit is on a set of fields that form a candidate keyit is on a set of fields that include the primary keythe data records of the file are organized...
46 46 votes
7 answers 7 answers
20.4k
20.4k views
Consider a relation scheme $R = (A, B, C, D, E, H)$ on which the following functional dependencies hold: {$A \rightarrow B$, $BC \rightarrow D$, $E \rightarrow C$, $D \ri...
109 109 votes
6 answers 6 answers
43.9k
43.9k views
The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list...
61 61 votes
5 answers 5 answers
28.9k
28.9k views
The following table has two attributes $A$ and $C$ where $A$ is the primary key and $C$ is the foreign key referencing $A$ with on-delete cascade.$$\begin{array}{|c|c|} \...
59 59 votes
9 answers 9 answers
35.0k
35.0k views
Let $E_1$ and $E_2$ be two entities in an $E/R$ diagram with simple-valued attributes. $R_1$ and $R_2$ are two relationships between $E_1$ and $E_2$, where $R_1$ is one-t...
79 79 votes
6 answers 6 answers
26.2k
26.2k views
Let r be a relation instance with schema R = (A, B, C, D). We define $r_1 = \pi_{A, B, C} (R)$ and $r_2=\pi_{A, D} (r)$. Let $s =r_1 \: * \: r_2$ where $*$ denotes natura...
49 49 votes
8 answers 8 answers
25.2k
25.2k views
Which one of the following statements about normal forms is $\text{FALSE}?$$\text{BCNF}$ is stricter than $\text{3NF}$Lossless, dependency-preserving decomposition into $...
78 78 votes
5 answers 5 answers
35.8k
35.8k views
Which of the following is a key factor for preferring $B^+$-trees to binary search trees for indexing database relations?Database relations have a large number of records...
108 108 votes
13 answers 13 answers
57.8k
57.8k views
Consider the following relational schema:$\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string})$ $\text{Parts}(\underline{\tex...