Unit 1: Introduction to database - Practice Quiz

INT306 — Database Management Systems 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the primary purpose of a Database Management System (DBMS)?

purpose of database systems Easy
A. To compile programming code into machine language
B. To connect computer networks together
C. To store, retrieve, and manage data efficiently and securely
D. To provide a graphical interface for operating systems

2 Which of the following problems does a DBMS solve compared to a traditional file processing system?

purpose of database systems Easy
A. Slow internet connection speeds
B. Operating system crashes
C. Data redundancy and inconsistency
D. High hardware costs

3 Which component of a DBMS is responsible for parsing, translating, and optimizing user requests into a form that the system can understand?

components of dbms Easy
A. Transaction Manager
B. Query Processor
C. Storage Manager
D. Buffer Manager

4 What is the role of the Database Administrator (DBA) as a human component of the DBMS environment?

components of dbms Easy
A. To manage the overall structure, security, and performance of the database
B. To design the operating system the database runs on
C. To purely enter daily transaction data into forms
D. To write application programs for end-users

5 In which of the following areas is a DBMS most commonly used?

applications of dbms Easy
A. Banking systems for managing customer accounts and transactions
B. Word processing software to format text
C. Image editing software to apply filters
D. Compiling C++ programs

6 Why do airlines heavily rely on Database Management Systems?

applications of dbms Easy
A. To manage flight schedules, ticket reservations, and passenger information
B. To serve in-flight entertainment videos
C. To pilot the airplane automatically
D. To design the aerodynamics of the airplane

7 In a three-tier DBMS architecture, which tier acts as the intermediary between the end-user and the database?

three tier dbms architecture Easy
A. Presentation tier (Client)
B. Database tier (Data)
C. Application tier (Business Logic)
D. Network tier

8 Which tier in the three-tier architecture is responsible for providing the graphical user interface (GUI) to the end user?

three tier dbms architecture Easy
A. Database tier
B. Storage tier
C. Presentation tier
D. Application tier

9 What does the concept of 'Data Independence' mean in a DBMS?

data independence Easy
A. Data is stored without any relationships to other data.
B. The ability to modify a schema at one level without changing the schema at the next higher level.
C. Users can independently delete any data they want.
D. The database works independently without needing a computer.

10 Which type of data independence allows you to change the conceptual (logical) schema without having to modify external views or application programs?

data independence Easy
A. Platform data independence
B. Hardware data independence
C. Logical data independence
D. Physical data independence

11 What is a database schema?

database schema Easy
A. The hardware used to store the database
B. The actual data stored in the database at a specific moment
C. The user manual for the DBMS software
D. The logical structure and overall design of the database

12 Which of the following statements about a database schema is true?

database schema Easy
A. It is relatively static and rarely changes once the database is operational.
B. It is automatically generated by the operating system.
C. It changes every time a user inserts new data.
D. It only contains the physical file paths of the data.

13 What is a database instance?

instance Easy
A. A specific brand of DBMS software
B. A physical server hosting the database
C. The blueprint or design of the database
D. The actual content or data stored in the database at a specific moment in time

14 How does a database instance differ from a database schema?

instance Easy
A. The instance changes frequently as data is updated, while the schema remains relatively static.
B. There is no difference; they are synonymous terms.
C. The schema is hardware, and the instance is software.
D. The instance represents the structure, while the schema holds the data.

15 What is the primary purpose of data modeling in database design?

data modeling Easy
A. To create a conceptual representation of data, defining its structures and relationships
B. To compress data so it takes up less physical storage
C. To encrypt sensitive data automatically
D. To write front-end code for the database GUI

16 Which of the following is a popular high-level conceptual data model used in database design?

data modeling Easy
A. The Client-Server Model
B. The OSI Model
C. The Entity-Relationship (ER) Model
D. The TCP/IP Model

17 In an Entity-Relationship (ER) model, what does an 'entity' represent?

entity relationship model Easy
A. An action performed by the database administrator
B. A specific type of data query
C. The physical hard drive storing the data
D. A real-world object or concept that has an independent existence

18 What standard geometric shape is used to represent an entity in an Entity-Relationship (ER) diagram?

entity relationship model Easy
A. Rectangle
B. Oval
C. Triangle
D. Diamond

19 How is data fundamentally organized and represented in a relational model?

relational model Easy
A. As isolated text documents
B. As interconnected graphs and edges
C. As tables (relations) consisting of rows and columns
D. As a hierarchical tree of nodes

20 Which of the following is a key difference between relational and non-relational (NoSQL) databases?

Comparison of relational and non-relational databases Easy
A. Relational databases organize data into rigid tables, while non-relational databases use flexible data models like documents or key-value pairs.
B. Non-relational databases require SQL for querying, while relational databases do not.
C. Relational databases cannot handle transactions, while non-relational databases can.
D. Relational databases use flexible data structures like documents, while non-relational databases use rigid tables.

21 A company previously used file systems for payroll. They faced issues where updating an employee's address in the payroll file did not update it in the HR file. Which primary purpose of a DBMS directly solves this issue?

purpose of database systems Medium
A. Eliminating data redundancy and inconsistency
B. Providing data abstraction
C. Ensuring concurrent access
D. Enforcing atomicity of transactions

22 During a sudden power outage, a database system shuts down unexpectedly. Upon restart, it recovers its previous consistent state. Which component of the DBMS architecture is primarily responsible for ensuring this?

components of dbms Medium
A. Transaction Manager
B. DDL Compiler
C. Query Optimizer
D. Buffer Manager

23 A database administrator (DBA) wants to restrict a newly hired junior developer from viewing the salary details in the Employees table. Which DBMS component handles this authorization check when the developer runs a query?

components of dbms Medium
A. Query Processor
B. DML Precompiler
C. Storage Manager
D. Security and Authorization Subsystem

24 In a banking application, an account transfer requires deducting money from one account and adding it to another. The system must guarantee that neither operation fails independently to prevent money loss. Which feature of a DBMS makes it essential for this application?

applications of dbms Medium
A. Schema definition and abstraction
B. Physical data independence
C. Support for ACID properties
D. High-level query language support

25 In a web-based retail system, users interact with a browser, which communicates with a web application server handling business logic, which in turn queries the backend database. This is a classic example of which architecture?

three tier dbms architecture Medium
A. Peer-to-peer architecture
B. Single-tier architecture
C. Two-tier architecture
D. Three-tier architecture

26 What is the primary advantage of using a three-tier DBMS architecture over a two-tier architecture in a large-scale web application?

three tier dbms architecture Medium
A. Reduction in the number of network layers
B. Faster direct database access for the client application
C. Elimination of the need for a dedicated database server
D. Better security and scalability by isolating business logic

27 An administrator moves a database from a traditional magnetic hard drive (HDD) to a Solid State Drive (SSD) to improve read/write performance. Neither the database tables nor the application programs require any modifications. This scenario demonstrates:

data independence Medium
A. Logical data independence
B. Physical data independence
C. Conceptual data independence
D. External schema independence

28 Adding a new attribute like Date_of_Birth to the Employee table does not break existing applications that only query the Name and Salary columns. This is an example of:

data independence Medium
A. Physical data independence
B. View data independence
C. Logical data independence
D. Internal data independence

29 Why is logical data independence generally considered harder to achieve than physical data independence?

data independence Medium
A. Because application programs are heavily dependent on the logical structure of the data they access
B. Because the external level is directly connected to the internal level
C. Because database views cannot hide logical schema changes
D. Because physical storage structures cannot be modified once created

30 A university database defines tables for Students, Courses, and Enrollments, specifying their data types, constraints, and relationships. This structural definition corresponds to which level of the database architecture?

database schema Medium
A. External schema
B. Internal schema
C. Conceptual schema
D. Physical schema

31 When a database designer configures how a specific table is stored on a disk using B+ trees and defines data allocation policies, they are working at the level of the:

database schema Medium
A. Logical schema
B. Internal schema
C. External schema
D. Conceptual schema

32 While a database schema is defined during the design phase and rarely changes, a database instance is highly dynamic. Which of the following best defines a database instance?

instance Medium
A. The overall structural design of the database
B. The physical storage blueprint on the hard drive
C. The collection of data stored in the database at a specific moment in time
D. A specific user's view of a portion of the database

33 If an application executes a DELETE query that successfully removes 50 rows from an Orders table, which of the following is modified?

instance Medium
A. The logical data independence
B. The database instance
C. The conceptual view
D. The database schema

34 Which of the following scenarios best demonstrates the use of a conceptual data model?

data modeling Medium
A. Configuring a NoSQL document database to store JSON files
B. Creating an Entity-Relationship (ER) diagram to discuss business requirements with non-technical stakeholders
C. Writing SQL CREATE TABLE statements with primary and foreign keys
D. Defining clustered and non-clustered indexes to optimize query speed

35 In a hospital's ER diagram, a Patient can have multiple Medical_Records, but a single Medical_Record belongs to exactly one Patient. What type of mapping cardinality does this describe?

entity relationship model Medium
A. One-to-many
B. Many-to-many
C. Many-to-one
D. One-to-one

36 A weak entity set Dependent must be associated with a strong entity set Employee to exist. How is the relationship connecting a weak entity to its strong entity typically represented in an ER diagram?

entity relationship model Medium
A. By a solid line with a single diamond
B. By a dashed line connecting the entities
C. By an identifying relationship shown as a double diamond
D. By an ellipse with a double border

37 In the relational model, relation has a foreign key referencing relation . To maintain referential integrity, which of the following conditions MUST be true?

relational model Medium
A. The foreign key in must also serve as its primary key
B. and must have the exact same number of attributes
C. Every primary key in must be referenced by at least one tuple in
D. Every value in the foreign key of must match a primary key value in or be null

38 A relation has a primary key composed of attributes and . Which core relational model constraint ensures that neither nor can contain a null value?

relational model Medium
A. Key equivalence constraint
B. Referential integrity constraint
C. Domain constraint
D. Entity integrity constraint

39 A startup is building an IoT application where incoming sensor data structures vary significantly between devices and evolve rapidly. Why might they choose a non-relational (NoSQL) database over a traditional relational database?

Comparison of relational and non-relational databases Medium
A. Relational databases cannot scale to handle high volumes of data
B. NoSQL databases offer a flexible schema design suitable for semi-structured data
C. Relational databases do not support ACID properties
D. NoSQL databases provide better support for complex multi-table joins

40 When designing a core banking system to handle financial ledgers, why would a relational database typically be preferred over a non-relational document database?

Comparison of relational and non-relational databases Medium
A. It provides robust ACID compliance and strict schema enforcement
B. It inherently prioritizes eventual consistency over strong consistency
C. It scales horizontally much better than non-relational databases
D. It uses hierarchical data storage, which is easier to parse for financial records

41 A financial system allows two concurrent transactions: and . Both check a shared joint account balance ($100) to ensure a $60 withdrawal doesn't drop the balance below $0. Both read $100, both proceed to withdraw 20 balance. Which database anomaly does this represent, and which ACID property is primarily intended to prevent it?

purpose of database systems Hard
A. Write Skew; Isolation
B. Dirty Read; Durability
C. Lost Update; Atomicity
D. Phantom Read; Consistency

42 In a DBMS, the Buffer Manager interacts with the Recovery Manager using a specific page replacement policy. If the system uses a 'Steal/No-Force' policy, what are the implications for the logging and recovery components?

components of dbms Hard
A. The system does not require a Write-Ahead Log (WAL) because all transactions are forced to disk.
B. The system requires REDO logging but not UNDO logging.
C. The system requires UNDO logging to remove uncommitted changes from stolen pages, and REDO logging to restore committed changes not forced to disk.
D. The system requires UNDO logging only, as 'No-Force' guarantees committed pages are instantly written to disk.

43 In contrasting Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP) applications, which of the following schema designs and indexing strategies is highly optimized for OLAP but detrimental to OLTP performance?

applications of dbms Hard
A. Denormalized Star schemas with Bitmap indexes on dimension attributes.
B. Highly normalized 3NF schemas with B-Tree indexes on primary keys.
C. Eventual consistency key-value stores with reverse-key indexes.
D. Third Normal Form schemas with clustered indexes on rapidly incrementing timestamp columns.

44 In a three-tier DBMS architecture, an architectural change requires moving business logic constraints from database triggers into the application server tier. How does this shift affect the ANSI-SPARC architecture mapping and system security?

three tier dbms architecture Hard
A. It shifts constraints from the internal schema to the conceptual schema, increasing database-level security.
B. It merges the physical and logical tiers, guaranteeing identical constraint enforcement.
C. It removes constraint enforcement from the conceptual schema (DBMS level) to the external tier, potentially allowing direct database access tools to bypass business rules.
D. It translates logical data independence into physical data independence, neutralizing SQL injection risks.

45 A Database Administrator (DBA) identifies a performance bottleneck and decides to replace a large table's B+ Tree index with a Hash index, and horizontally partitions the table across two disks. Assuming the SQL queries in the application remain completely unmodified and execute successfully, this scenario is a strict demonstration of:

data independence Hard
A. Physical Data Independence
B. Schema Evolution Independence
C. Logical Data Independence
D. Application-Tier Independence

46 Let be the conceptual schema and be the internal schema of a database. If an entity in is mapped to a relation , which of the following operations strictly modifies but leaves the definition of effectively abstracted away from the application developers?

database schema Hard
A. Changing the clustered index on relation to a non-clustered index.
B. Altering the storage path of relation 's tablespace.
C. Changing the disk block size used to store relation .
D. Adding a new non-nullable attribute to relation with a default value.

47 Consider a database schema defined as an Intension. A database Instance is considered the Extension of this schema at a specific timestamp . If an instance at is updated to instance at , which mathematical property MUST hold true for to be considered a 'valid state'?

instance Hard
A. The cardinality of must equal the cardinality of .
B. must reside in a newly allocated physical memory block distinct from .
C. must strictly satisfy all integrity constraints defined in the schema's Intension.
D. must contain a superset of the tuples in .

48 In the context of semantic data modeling, what is the primary consequence of the 'semantic gap' between the conceptual model (e.g., pure ER model) and the logical model (e.g., Relational model)?

data modeling Hard
A. The conceptual model restricts the cardinality of relationships, while the logical model allows infinite cardinality bounds.
B. The logical model automatically infers ternary relationships without explicit foreign keys.
C. Physical storage structures become heavily fragmented during the translation phase.
D. Business rules represented explicitly in the conceptual model (such as disjoint specialization) must often be enforced via application logic or triggers in the relational model.

49 In an Entity-Relationship model, a weak entity set is dependent on a strong entity set via an identifying relationship . If the primary key of is and the partial key (discriminator) of is , what is the implication of total participation of in ?

entity relationship model Hard
A. The primary key of becomes exactly , ignoring .
B. Every entity in must be associated with at least one entity in .
C. can exist independently in the database if is set to NULL.
D. Every entity in must be associated with exactly one entity in , and the primary key of is mathematically the composite .

50 A conceptual schema requires modeling a scenario where a 'Doctor' prescribes a 'Drug' to a 'Patient'. If this is modeled as a single ternary relationship 'Prescription', how does it fundamentally differ from modeling it as three separate binary relationships?

entity relationship model Hard
A. The ternary relationship prevents a doctor from prescribing the same drug to multiple patients.
B. Three binary relationships reduce the risk of database normalization anomalies to zero.
C. The ternary relationship allows recording an attribute like 'Dosage' specific to the exact combination of Doctor, Patient, and Drug, which is impossible to guarantee with three independent binary relationships.
D. There is no mathematical or semantic difference; they compile to the identical relational schema.

51 Given a relation and the functional dependencies , , and . Which of the following statements about the candidate keys of is true?

relational model Hard
A. There is only one candidate key: .
B. The relation has no candidate keys because of the cyclic dependencies.
C. The candidate keys are , , and .
D. There is only one candidate key: .

52 Relation has a foreign key referencing Relation with the constraint ON DELETE CASCADE. Relation has a foreign key referencing with ON DELETE SET NULL. If a tuple in is deleted, what is the guaranteed chronological outcome of the integrity enforcement?

relational model Hard
A. The DBMS detects a cyclic dependency and prevents the creation of the tables.
B. The deletion in is blocked unless ON DELETE CASCADE is explicitly applied to both tables.
C. An infinite loop of deletions occurs, leading to a transaction rollback.
D. The cascading delete triggers the deletion of dependent tuples in , which in turn sets the corresponding foreign keys in any remaining dependent tuples in to NULL.

53 According to the CAP Theorem, a distributed non-relational database like Cassandra prioritizes Availability and Partition Tolerance (AP) over Consistency. Under network partition, which of the following best describes the database's behavior compared to a traditional relational database cluster prioritizing CP?

Comparison of relational and non-relational databases Hard
A. Cassandra will accept reads and writes on all available nodes, potentially resulting in stale reads, whereas the CP relational database will halt operations on the minority partition to guarantee strongly consistent reads.
B. Cassandra will refuse read/write requests to prevent data divergence, while the CP relational database will allow reads but block writes.
C. Cassandra guarantees ACID properties across all partitions, whereas the relational database guarantees only BASE properties.
D. Cassandra requires synchronous replication across all nodes to function, whereas the relational system uses asynchronous replication.

54 When addressing the 'impedance mismatch' between object-oriented application code and database storage, which scenario fundamentally highlights a structural advantage of Document-oriented NoSQL databases over Relational databases?

Comparison of relational and non-relational databases Hard
A. Implementing granular row-level security based on hierarchical roles.
B. Executing highly complex multi-table analytical joins over normalized data.
C. Enforcing strict declarative referential integrity constraints across bounded contexts.
D. Persisting deeply nested, polymorphic object structures where the schema varies dynamically between instances.

55 Before the advent of DBMS, file-processing systems suffered from the 'data isolation' problem. In a modern DBMS, how is this specific problem solved structurally?

purpose of database systems Hard
A. By enforcing the Isolation property of ACID using Two-Phase Locking.
B. By providing a centralized catalog/data dictionary and standardized query interfaces (like SQL) that abstract data access formats.
C. By preventing concurrent users from reading the exact same data file simultaneously.
D. By storing data entirely in volatile memory to eliminate disk I/O bottlenecks.

56 A DBMS Query Optimizer evaluates multiple execution plans for the query: SELECT * FROM A JOIN B ON A.id = B.a_id JOIN C ON B.id = C.b_id. Which internal component dictates whether the optimizer chooses a Hash Join over a Nested Loop Join based on the cardinality of relations?

components of dbms Hard
A. The Buffer Manager's Eviction Policy
B. The Statistical Metadata in the System Catalog
C. The Transaction Manager
D. The DDL Compiler

57 In a robust Three-Tier DBMS web application architecture, an attacker attempts an SQL injection attack by inputting malicious strings into a web form. Which tier is primarily responsible for sanitizing this input and binding parameters to prevent the internal tier's query engine from executing the malicious payload?

three tier dbms architecture Hard
A. The Application Tier (Application Server)
B. The Presentation Tier (Client)
C. The Database Tier (DBMS Storage Manager)
D. The Database Tier (DBMS Buffer Manager)

58 Logical Data Independence is notoriously more difficult to achieve than Physical Data Independence. Which of the following schema changes best illustrates the limit of Logical Data Independence, requiring modifications to external application views?

data independence Hard
A. Splitting a heavily accessed table into two physical files on different hard drives.
B. Decomposing a single table into two tables and due to normalization, where the application requires updating attribute based on .
C. Increasing the length of a VARCHAR column from 50 to 100 characters.
D. Changing the underlying data structure of an index from a B-Tree to a Bitmap.

59 A Database Schema is often considered relatively static, whereas the database state changes rapidly. Which of the following operations alters the 'Intension' of the database rather than its 'Extension'?

database schema Hard
A. Committing a transaction that updates a bank balance.
B. Executing ALTER TABLE Employees ADD CONSTRAINT CHK_Age CHECK (age >= 18);
C. Executing a bulk INSERT operation from a CSV file.
D. Executing DELETE FROM Employees WHERE age > 65;

60 When designing an Enhanced Entity-Relationship (EER) model, a designer creates a superclass 'Vehicle' with subclasses 'Car' and 'Truck'. If the business rule states that a Vehicle can be both a Car and a Truck simultaneously, and that there are other types of Vehicles not represented by these subclasses, which constraint pair applies?

data modeling Hard
A. Overlapping, Total
B. Overlapping, Partial
C. Disjoint, Total
D. Disjoint, Partial