Recent questions and answers in Databases

51 51 votes
7 7 answers
22.7k
22.7k views
​​​​​Which of the following file organizations is/are $\text{I/O}$ efficient for the scan operation in $\text{DBMS}$?SortedHeapUnclustered tree indexUnclustered hash inde...
1 1 vote
1 1 answer
87
87 views
Consider,CREATE TABLE zoomers ( lecture_id INTEGER PRIMARY KEY, week INTEGER NOT NULL, topic VARCHAR(30) NOT NULL, num_thanks INTEGER, poppin_chat BOOLEAN );Assume,intege...
1 1 vote
1 1 answer
36
36 views
Consider the following statement:In fixed-length records, a character field of type $\mathrm{CHAR}$ is not allowed.Enter $1$ if the statement is true and $0$ if it is fal...
0 0 votes
1 1 answer
34
34 views
Consider,Universities( name TEXT, abbrev CHAR(3), addr TEXT, zip CHAR(5), phone TEXT, enrolled INTEGER )Assume,record header = $4$ bytes, integer = $4$ bytes, a $\mathrm{...
0 0 votes
1 1 answer
33
33 views
Which of the following are benefits of using a record header for variable-length records?Delimiter characters between fields are not required. It always uses equal or les...
0 0 votes
1 1 answer
36
36 views
Consider:CREATE TABLE products ( id INTEGER PRIMARY KEY, stock INTEGER NOT NULL, price INTEGER NOT NULL, name VARCHAR(10) NOT NULL, category CHAR(6) NOT NULL, serial_numb...
42 42 votes
6 answers 6 answers
3.5k
3.5k views
Consider the following database schema:$\textsf{Product (pid, name, brand, price, color), where pid}$ is the primary key.Consider the following SQL queries:$\textsf{Query...
47 47 votes
8 8 answers
11.5k
11.5k views
A university placement center maintains a relational database of companies that interview students on campus and make job offers to those successful in the interview. The...
10 10 votes
7 7 answers
3.6k
3.6k views
On a relation named $\text{Loan}$ of a bank:\[\begin{array}{|c|}\hline\textbf{Loan} \\\hline\begin{array}{c|c|c}\textbf{loan_number} & \textbf{branch_name} & \textbf{amou...
22 22 votes
3 answers 3 answers
7.9k
7.9k views
Consider a relation examinee (regno, name, score), where regno is the primary key to score is a real number.Write a relational algebra using $( \Pi, \sigma, \rho, \times)...
0 0 votes
1 1 answer
54
54 views
A disk has cylinders $:0\mathrm{\ to\ }999$The current head position is $:253$Pending requests are:$$98,\ 120,\ 283,\ 137,\ 352,\ 414,\ 29,\ 665,\ 867,\ 919,\ 534,\ 737$$...
1 1 vote
1 1 answer
63
63 views
The designer of an operating system noticed, after performance measurements, that the system presented disk access problems, with a very high average waiting time. Select...
0 0 votes
1 1 answer
56
56 views
A disk contains $\mathbf{400}$ tracks, numbered : $0\mathrm{\ to\ }399$A request at track $200$ has just been completed. The head is now moving toward smaller track numbe...
0 0 votes
1 1 answer
25
25 views
The disk head is currently at track : $105$ and is moving toward larger track numbers.Pending requests are:$$35,\ 45,\ 12,\ 68,\ 110,\ 180,\ 170,\ 195$$If SCAN scheduling...
0 0 votes
1 1 answer
47
47 views
A magnetic-disk head is currently at cylinder : $100$Pending requests are:$120,\ 90,\ 70,\ 80,\ 140,\ 110,\ 60$The scheduling method follows these rules:requests may be r...
73 73 votes
9 answers 9 answers
29.8k
29.8k views
Consider the following two transactions$: T1$ and $T2.$$\begin{array}{clcl} T1: & \text{read (A);} & T2: & \text{read (B);} \\ & \text{read (B);} & & \text{read (A);} \\ ...
0 0 votes
2 2 answers
57
57 views
Which of the following statements about magnetic-disk arm scheduling is incorrect?FCFS handles requests according to arrival order and is considered fair, although it gen...
0 0 votes
1 1 answer
36
36 views
Consider the following statement:If disk requests are scheduled using SSTF, the seek time will increase compared with FCFS. Furthermore, the elevator algorithm is not rec...
0 0 votes
1 1 answer
53
53 views
A disk has $200$ tracks numbered $0$ through $199$.The disk head is currently at track $:184$Disk requests arrive for:$184,\ 187,\ 176,\ 182,\ 199$If SSTF scheduling is u...
0 0 votes
1 1 answer
45
45 views
Suppose a disk repeatedly services requests for one particular track while requests for other tracks remain unserved. This phenomenon is called disk-arm sticking.Which of...
0 0 votes
1 1 answer
49
49 views
Which disk scheduling algorithm selects the pending request requiring the smallest movement of the disk arm from its current position, thereby choosing the minimum seek t...
0 0 votes
1 1 answer
51
51 views
A computer scientist wants to determine the time required to read an entire magnetic disk.Assume:$2400$ cylinders $6$ tracks per cylinder $32$ sectors per track one compl...
0 0 votes
1 1 answer
46
46 views
Which of the following statements about magnetic disk storage is incorrect?The formatted capacity of a disk is smaller than its unformatted capacity. A sector contains in...
0 0 votes
1 1 answer
46
46 views
A disk has:rotational speed $=7200\ \mathrm{rpm}$ average seek time $=8\ \mathrm{ms}$ sectors per track $=1000$Approximately how much time is required, on average, to acc...
1 1 vote
1 1 answer
41
41 views
A magnetic disk rotates at $4200\ \mathrm{rpm}$. Its average positioning time is $5\ \mathrm{ms}$The average waiting time is defined as:$$\mathrm{Average\ positioning\ ti...
0 0 votes
1 1 answer
36
36 views
A magnetic disk has a sector size of $\mathbf{512}$ bytes. Each sector is identified by a $\mathbf{28}$-bit sector number.What is the maximum disk capacity that can be ma...
38 38 votes
9 answers 9 answers
12.0k
12.0k views
Give a relational algebra expression using only the minimum number of operators from $(∪, −)$ which is equivalent to $R$ $∩$ $S.$
39 39 votes
5 answers 5 answers
8.6k
8.6k views
Suppose we have a database consisting of the following three relations:$$\begin{array}{|c|c|} \hline \text {FREQUENTS} & \text {(CUSTOMER, HOTEL)} \\\hline \text {SERVES}...
131 131 votes
10 answers 10 answers
32.7k
32.7k views
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 ...
1 1 vote
1 1 answer
113
113 views
Consider:$\mathrm{DEPT(dname,\ location)}$$\mathrm{STUDENT(name,\ regno,\ gpa,\ level,\ dept)}$$\mathrm{COURSE(cno,\ cname,\ dept)}$$\mathrm{TAKE(regno,\ cno)}$and the SQ...
0 0 votes
1 1 answer
73
73 views
Consider relations $\mathrm{R}$ and $\mathrm{S}$.Five SQL commands are shown:Command I :SELECT R.* FROM R WHERE EXISTS (SELECT * FROM S WHERE R.a = S.c);Command II :SELEC...
0 0 votes
1 1 answer
57
57 views
Consider:$\mathrm{Observation(Seq,\ BirdName,\ ObservationCount)}$with primary key:$\mathrm{(Seq,\ BirdName)}$The following statement inserts combinations of sequence num...
0 0 votes
1 1 answer
69
69 views
Relation $\mathrm{R1(A,B)}$ contains:$$\begin{array}{|c|c|} \hline \mathrm{A} & \mathrm{B} \\ \hline 1 & 2 \\ 2 & 2 \\ 3 & 3 \\ 4 & 3 \\ 4 & 2 \\ 4 & 1 \\ 5 & 0 \\ \hline...
0 0 votes
1 1 answer
61
61 views
Consider the relation:$$\begin{array}{|c|c|c|} \hline \mathrm{EmployeeCode} & \mathrm{Supervisor} & \mathrm{Name} \\ \hline \mathrm{S001} & \mathrm{NULL} & \mathrm{A} \\ ...
67 67 votes
9 answers 9 answers
30.7k
30.7k views
The relation scheme $\text{Student Performance (name, courseNo, rollNo, grade)}$ has the following functional dependencies:name, courseNo, $\rightarrow$ graderollNo, cour...
0 0 votes
1 1 answer
94
94 views
Relevant relations are:$\mathrm{BUILDING(BID,\ BName,\ Address)}$$\mathrm{IN\_BUILDING(EID,\ BID)}$Which of the following queries correctly find the names of buildings wh...
0 0 votes
1 1 answer
76
76 views
Consider relations:$\mathrm{Product}$$\mathrm{Inventory}$where the underlined attributes in the original examination are primary keys.The following query returns product ...
0 0 votes
1 1 answer
65
65 views
Consider,SELECT DISTINCT TBL1.COL1 FROM TBL1 WHERE COL1 IN (SELECT COL1 FROM TBL2);Which SQL statement produces the same result?SELECT DISTINCT TBL1.COL1 FROM TBL1 UNION ...
1 1 vote
2 2 answers
85
85 views
Consider the relation $R(a,b)$. The relation may contain duplicate tuples.Which of the following queries are guaranteed not to contain duplicate tuples, regardless of the...
0 0 votes
1 1 answer
128
128 views
Three relations with the same schema are maintained for three regions:$\mathrm{TokyoProduct}$, $\mathrm{NagoyaProduct}$, and $\mathrm{OsakaProduct}$$\mathrm{ProductNo}$ i...
To see more, click for all the questions in this category.