Practice free →
HomeBCA Cyber Securitycomputerscience › Database Management Systems

BCA Cyber Security Database Management Systems — practice questions

84 free MCQs with worked solutions. Tap any question for the answer + explanation, or practice them all in the app.

Practice BCA Cyber Security Database Management Systems in the app →
Using the library analogy, what does the DBMS correspond to?Per the lecture, which is NOT one of the three pains a DBMS solves over a flat-file notebook?A schema is best described, in the menu analogy, asPer the kitchen-brigade analogy, the relational model's three pillars areA relation is, in formal terms,A foreign key is the relational analogue ofFor $R \cup S$ to be a valid relational-algebra expression, $R$ and $S$ mustProject differs from Select in thatIf $R$ is your playlist and $S$ is your friend's, then $R - S$ returnsIf $|R| = 200$ tuples and $|S| = 50$ tuples, how many tuples does $R \times S$ contain?If only one tuple in $S$ has $b\_id=102$ out of a billion total, then between $ igma_{b\_id=102}(R \bowtie S)$The reason a modern DBMS prefers declarative SQL over hand-written RA is thatAge is best modelled as which kind of attribute?A student's set of email addresses is best modelled asPer the NPTEL lecture, an entity set isThe domain of a multi-valued attribute isWhy are keys NOT decided by inspecting the data alone?When an entity set has several attributes (or attribute sets) each uniquely identifying an entity, each one isA ternary relationship has degreeStudents enrolling in courses is typically modelled with which cardinality ratio?If every department in a university MUST have a head professor, this constraint on Department's side of the (DA student's grade earned in a particular course is best modelled asRole names in an ER diagram are essential forA weak entity in an ER diagram is connected to its owner throughIf a combined Staff+Branch table stores the branch address inside every staff row, what happens when the LAST When you decompose a table into smaller tables, the two properties you must preserve areOpening a brand-new branch with no staff yet, in a combined Staff+Branch table, causesIf `A → B` and `B → C` both hold in a relation, then Armstrong's axioms let you concludeAn FD `pincode → city` is best justified byIf `A → B` holds in a relation, augmentation lets you also concludeFirst Normal Form requires thatA relation is in 2NF if it is in 1NF ANDIn `Enroll(studentId, courseId, studentName, grade)` with PK = (studentId, courseId), the FD `studentId → studA relation is in BCNF if and only ifPer the Methodist notes' guidance, when should designers stop at 3NF rather than pushing all the way to BCNF?Per the Methodist notes, BCNF violations typically arise in relations thatWithout an ORDER BY clause, the order of rows returned by a SELECT isIf a `student` table has five rows with `city = 'Pune'`, then `SELECT DISTINCT city FROM student` returnsIn `ORDER BY age ASC, name DESC`, how are rows ordered when two students share the same age?In a SELECT with GROUP BY, the correct way to keep only groups whose average salary exceeds 50000 isIn a 100-row `employees` table where 20 rows have `salary` NULL,Why is `SELECT branch, name, AVG(salary) FROM employees GROUP BY branch` illegal in standard SQL?If 100 students exist and 30 are enrolled in courses (with no other quirks), then `SELECT s.name FROM student If `student` has 50 rows and `course` has 8 rows, `SELECT * FROM student CROSS JOIN course` returnsWhy do many production teams avoid NATURAL JOIN in their codebase?A correlated subquery differs from an uncorrelated one in thatPlain (non-materialized) SQL viewsPer the SQL standard, `column IN (subquery)` is equivalent toA power cut interrupts a bank transfer after the debit but before the credit. Which ACID property ensures the Two cashiers run two transfers concurrently on overlapping accounts. The ACID property that hides this concurrWhich mechanism does the DBMS most commonly use to honour the Durability property?Two operations from different transactions conflict ifA concurrent schedule is called serializable ifTwo schedules are conflict equivalent whenA schedule S is conflict serializable if and only if its precedence graph isReal DBMSs implement conflict serializability rather than view serializability becauseIf a precedence graph for a schedule is acyclic, thenIf T1 writes A, T2 reads that new A before T1 commits, and T1 then aborts, T2 has experiencedFrom strictest to weakest, the correct hierarchy of schedules isA phantom read differs from an unrepeatable read in thatIn standard Two-Phase Locking, a transaction is forbidden fromStrict Two-Phase Locking differs from standard 2PL by requiringPer the lock compatibility matrix, which combination is allowed concurrently on the same item?The DBMS detects a deadlock by findingIn the Wait-Die deadlock-prevention protocol, when T_i requests a lock held by T_j and T_i has a LARGER timestIf a DBMS using detection-then-abort keeps selecting the same transaction as victim, the problem that arises iUnder basic timestamp ordering, transaction T's write of item Q is rejected (T aborts) ifThomas's Write Rule, applied to the case TS(T) < W-timestamp(Q), says toTimestamp ordering is naturally deadlock-free becauseThe defining benefit of MVCC over plain 2PL isPer ANSI SQL, the four standard isolation levels in order from weakest to strongest areWhy is snapshot isolation strictly weaker than SERIALIZABLE?After a system crash, what does the recovery system promise about the database state?Which is NOT a recovery-relevant failure type per the chapter?Stable storage is implemented byThe write-ahead rule states thatPer WAL semantics, a transaction is officially committed at the momentA complete log record for a write operation includesAfter a crash, with checkpointing, the recovery system scans the logIn standard log-based recovery, the order of operations isFuzzy checkpoints differ from naive checkpoints byARIES recovery is structured as exactlyWhat is the purpose of a Compensation Log Record (CLR) in ARIES?The main reasons production DBMSs avoid shadow paging in favour of WAL are that shadow paging