Recent questions tagged databases

60 60 votes
5 answers 5 answers
26.4k
26.4k 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.6k
22.6k 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...
45 45 votes
6 answers 6 answers
20.1k
20.1k 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...
108 108 votes
6 answers 6 answers
43.0k
43.0k 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.6k
28.6k 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|} \...
58 58 votes
9 answers 9 answers
33.9k
33.9k 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
25.7k
25.7k 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
24.9k
24.9k 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.1k
35.1k 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
56.5k
56.5k views
Consider the following relational schema:$\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string})$ $\text{Parts}(\underline{\tex...
123 123 votes
2 answers 2 answers
34.9k
34.9k views
Let $R$ and $S$ be relational schemes such that $R=\{a,b,c\}$ and $S=\{c\}.$ Now consider the following queries on the database:$\pi_{R-S}(r) - \pi_{R-S} \left (\pi_{R-S}...
98 98 votes
14 answers 14 answers
53.9k
53.9k views
The following key values are inserted into a $B^+$ - tree in which order of the internal nodes is $3$, and that of the leaf nodes is $2$, in the sequence given below. The...
44 44 votes
3 answers 3 answers
11.2k
11.2k views
Consider two transactions $T_1$ and $T_2$, and four schedules $S_1, S_2, S_3, S_4$, of $T_1$ and $T_2$ as given below:$T_1: R_1[x]W_1[x]W_1[y]$$T_2: R_2[x]R_2[y]W_2[y...
4 4 votes
1 answers 1 answer
15.6k
15.6k views
Consider table R(A,B,C,D,E) with FDs as A->B, BC->E and ED- A. The table is in which normal form? Justify your answer.
41 41 votes
7 answers 7 answers
14.2k
14.2k views
Consider the following schedules involving two transactions. Which one of the following statements is TRUE?$S_1 :r_1(X); r_1(Y); r_2(X); r_2(Y); w_2(Y); w_1(X)$$S_2 :r_1(...
69 69 votes
9 answers 9 answers
37.7k
37.7k views
The order of a leaf node in a $B^+$ - tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is $1K\;\text{bytes}$, data ...
122 122 votes
8 answers 8 answers
43.8k
43.8k views
Which one of the following statements is $\text{FALSE}$?Any relation with two attributes is in $\text{BCNF}$A relation in which every key has only one attribute is in $\t...
109 109 votes
7 answers 7 answers
42.4k
42.4k views
Consider the table employee(empId, name, department, salary) and the two queries $Q_1, \, Q_2$ below. Assuming that department $5$ has more than one employee, and we want...
126 126 votes
10 answers 10 answers
35.5k
35.5k views
Consider the relation employee(name, sex, supervisorName) with name as the key, supervisorName gives the name of the supervisor of the employee under consideration. What ...
56 56 votes
4 answers 4 answers
17.8k
17.8k views
The employee information in a company is stored in the relationEmployee (name, sex, salary, deptName)Consider the following SQL querySelect deptName From Employee Where s...
39 39 votes
4 answers 4 answers
17.7k
17.7k views
The order of an internal node in a $B+$ tree index is the maximum number of children it can have. Suppose that a child pointer takes $6$ bytes, the search field value tak...
93 93 votes
9 answers 9 answers
28.5k
28.5k views
Consider the relation Student (name, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least one boy and one girl. Wha...
65 65 votes
7 answers 7 answers
30.0k
30.0k views
The relation scheme $\text{Student Performance (name, courseNo, rollNo, grade)}$ has the following functional dependencies:name, courseNo, $\rightarrow$ graderollNo, cour...
91 91 votes
8 answers 8 answers
47.8k
47.8k views
Consider the following relation schema pertaining to a students database:Students (rollno, name, address)Enroll (rollno, courseno, coursename)where the primary keys are s...
49 49 votes
1 answers 1 answer
12.2k
12.2k views
Let $R_1 \left(\underline{A}, B, C\right)$ and $R_2\left(\underline{D}, E \right) $ be two relation schema, where the primary keys are shown underlined, and let C be a fo...
106 106 votes
9 answers 9 answers
42.1k
42.1k views
Consider the following log sequence of two transactions on a bank account, with initial balance $12000,$ that transfer $2000$ to a mortgage payment and then apply a $5\%$...
67 67 votes
11 answers 11 answers
20.7k
20.7k views
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 action...
65 65 votes
7 answers 7 answers
24.2k
24.2k views
Consider the set of relations shown below and the SQL query that follows.Students: (Roll_number, Name, Date_of_birth)Courses: (Course_number, Course_name, Instructor)Grad...
65 65 votes
8 answers 8 answers
23.5k
23.5k views
Consider the following functional dependencies in a database.$$\begin{array}{|l|l|}\hline \text{Date_of_Birth } \to \text{Age} & \text{Age } \to \text{Eligibility} \\\hli...
45 45 votes
8 answers 8 answers
18.8k
18.8k views
Consider the following $2-3-4$ tree (i.e., B-tree with a minimum degree of two) in which each data item is a letter. The usual alphabetical ordering of letters is used in...