Unit 1 - Practice Quiz

INT306 61 Questions
0 Correct 0 Wrong 61 Left
0/61

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

purpose of database systems Easy
A. To design the user interface for web applications.
B. To create computer graphics and animations.
C. To provide an efficient and convenient way to store, retrieve, and manage data.
D. To write low-level operating system code.

2 Which of the following is a key advantage of using a DBMS over a traditional file-based system?

purpose of database systems Easy
A. Increased data redundancy for better backups.
B. Reduced data redundancy and inconsistency.
C. Requires less hardware resources.
D. Simpler to set up for a single user.

3 Which language is used to define the database schema, including creating and modifying tables?

components of dbms Easy
A. Data Definition Language (DDL)
B. Data Manipulation Language (DML)
C. Query Language (QL)
D. Data Control Language (DCL)

4 The component of a DBMS that is responsible for storing, retrieving, and updating data in the database is the:

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

5 Which of the following is a typical real-world application of a database system?

applications of dbms Easy
A. An online banking system
B. A simple text editor like Notepad
C. A standalone calculator application
D. A computer's bootloader

6 In a three-tier DBMS architecture, which layer contains the business logic?

three tier dbms architecture Easy
A. Network Tier
B. Data Tier (Database Server)
C. Presentation Tier (Client)
D. Application Tier (Middle Tier)

7 What is the primary responsibility of the Presentation Tier in a three-tier architecture?

three tier dbms architecture Easy
A. To store and manage the database.
B. To manage network connections.
C. To display information to the user and handle user interaction.
D. To execute complex business rules.

8 The ability to change the physical schema without having to change the conceptual schema is known as:

data independence Easy
A. Physical Data Independence
B. Logical Data Independence
C. External Data Independence
D. Conceptual Data Independence

9 Logical data independence provides the ability to modify which level without affecting the user views?

data independence Easy
A. Internal Schema
B. Physical Schema
C. External Schema
D. Conceptual Schema

10 Which term refers to the overall design or blueprint of a database?

database schema Easy
A. Query
B. Tuple
C. Schema
D. Instance

11 What is a database 'instance'?

instance Easy
A. The actual data stored in the database at a specific moment in time.
B. A specific column within a table.
C. The architectural design of the database.
D. The DBMS software itself.

12 What is the primary goal of data modeling?

data modeling Easy
A. To create a conceptual representation of the data and its relationships.
B. To install and configure the DBMS.
C. To write efficient SQL queries for data retrieval.
D. To perform daily backups of the database.

13 In an Entity-Relationship (ER) diagram, what does a rectangle represent?

entity relationship model Easy
A. Relationship
B. Key
C. Attribute
D. Entity

14 In an ER model, a person's name, age, and address would be examples of:

entity relationship model Easy
A. Attributes
B. Constraints
C. Relationships
D. Entities

15 What does a diamond shape represent in an ER diagram?

entity relationship model Easy
A. Relationship
B. Weak Entity
C. Attribute
D. Entity

16 In the relational database model, data is organized into:

relational model Easy
A. Trees
B. Tables (Relations)
C. Documents
D. Graphs

17 In a relational table, what is the formal term for a row?

relational model Easy
A. Relation
B. Attribute
C. Domain
D. Tuple

18 The schema that describes the database structure from the perspective of a particular group of users is called the:

database schema Easy
A. Physical Schema
B. Conceptual Schema
C. Internal Schema
D. External Schema (or View)

19 Which of the following database types uses a predefined schema where all data must conform to a fixed structure?

Comparison of relational and non-relational databases Easy
A. Relational (SQL)
B. Key-Value (NoSQL)
C. Document (NoSQL)
D. Graph (NoSQL)

20 A NoSQL database like a document store is generally considered more flexible than a relational database because:

Comparison of relational and non-relational databases Easy
A. It is older technology.
B. It can only be stored on one physical server.
C. It only uses the SQL language.
D. It does not require a fixed schema.

21 A company currently stores all its sales data in a collection of CSV files. They are experiencing issues with multiple salespersons overwriting each other's updates and difficulty in generating a report of total sales by region. Which primary purpose of a DBMS would directly solve these two specific problems?

purpose of database systems Medium
A. Data backup and recovery
B. Data storage and data security
C. Data independence and data modeling
D. Concurrency control and efficient query processing

22 When a user submits a SQL query like SELECT name FROM students WHERE gpa > 3.5;, which two DBMS components are most directly involved in parsing the query, choosing the best execution plan, and retrieving the data from the disk?

components of dbms Medium
A. DDL Interpreter and Data Dictionary
B. Buffer Manager and Lock Manager
C. Transaction Manager and Authorization Manager
D. Query Processor and Storage Manager

23 In a typical e-commerce website built on a three-tier architecture, where would the logic for validating a user's credit card number format before sending it for payment processing reside?

three tier dbms architecture Medium
A. Application Tier (Business Logic Layer)
B. On a separate, fourth security tier
C. Presentation Tier (Client-side JavaScript)
D. Database Tier (Stored Procedure)

24 A database administrator decides to add an index to the Orders table to speed up searches based on order_date. The application code that retrieves order information does not need to be changed. This is an example of:

data independence Medium
A. Physical Data Independence
B. View Independence
C. Logical Data Independence
D. Schema Independence

25 A university database has a conceptual schema defining Student(student_id, name, major) and Course(course_id, title). A specific computer science student is only allowed to see a list of courses offered by the 'CS' department. This tailored view for the student represents which level of schema?

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

26 Consider a table defined as EMPLOYEE(E_ID INT PRIMARY KEY, E_NAME VARCHAR(50)). At 9:00 AM, the table contains 10 rows. At 10:00 AM, a new employee is added. Which of the following statements is correct?

database schema, instance Medium
A. The schema remained the same, but the instance changed.
B. Both the schema and the instance changed.
C. Neither the schema nor the instance changed.
D. The schema changed, but the instance remained the same.

27 A business rule states: "An employee can be assigned to manage multiple projects, and a project can be managed by multiple employees." How would this relationship between Employee and Project entities be correctly modeled in an ER diagram?

entity relationship model Medium
A. Two one-to-many (1:M) relationships, one from Employee to Project and one from Project to Employee.
B. A one-to-one (1:1) relationship between Employee and Project.
C. A one-to-many (1:M) relationship from Employee to Project.
D. A many-to-many (M:N) relationship between Employee and Project.

28 In the relational model, if a table Orders has a column CustomerID which refers to the primary key of the Customers table, what is the primary purpose of the constraint on CustomerID?

relational model Medium
A. To ensure that CustomerID is unique within the Orders table.
B. To speed up queries that join the Customers and Orders tables.
C. To ensure that every customer has at least one order.
D. To ensure that every order is associated with a valid, existing customer.

29 A development team is building a social media analytics platform that needs to store user profiles. Each user profile can have a different set of attributes (e.g., some users list their 'hobbies', others list 'job_history'). The system must also scale horizontally to handle millions of users. Which database model is most suitable?

Comparison of relational and non-relational databases Medium
A. Relational (SQL) database, because it supports ACID transactions.
B. Non-relational (NoSQL) Graph database, because it is best for simple key-value lookups.
C. Relational (SQL) database, because it enforces a strict schema.
D. Non-relational (NoSQL) Document database, due to its flexible schema and horizontal scalability.

30 A database developer alters the STUDENT table by splitting the name field into first_name and last_name. To prevent breaking an existing application that queries the name field, the developer creates a view called V_STUDENT that concatenates first_name and last_name as name. This is an example of using a view to achieve:

data independence Medium
A. Conceptual Data Independence
B. Physical Data Independence
C. View Materialization
D. Logical Data Independence

31 For an online airline reservation system, thousands of users might try to book the same last few seats on a flight simultaneously. Which DBMS feature is most critical to prevent overselling the flight?

applications of dbms Medium
A. Query Optimization
B. Backup and Recovery
C. Transaction Management and Concurrency Control
D. Data Security and Authorization

32 When designing a database for a library, the process begins by identifying key objects like 'Book', 'Member', and 'Loan', and the relationships between them, such as 'a Member can borrow multiple Books'. What is this initial, high-level design phase called?

data modeling Medium
A. Internal Schema Definition
B. Physical Data Modeling
C. Database Implementation
D. Conceptual Data Modeling

33 In an ER model for a company database, Dependents is modeled as a weak entity. What does this imply about the Dependents entity?

entity relationship model Medium
A. The Dependents entity cannot exist without its relationship to a strong entity, likely Employee.
B. The Dependents entity must have a one-to-one relationship with the Employee entity.
C. The Dependents entity cannot have any attributes of its own.
D. The Dependents entity is optional and rarely contains data.

34 Consider two relations: R(A, B) and S(B, C). If you want to find all pairs of (A, C) such that a tuple (a, b) exists in R and a tuple (b, c) exists in S, which fundamental relational algebra operation should you use?

relational model Medium
A. Set Difference (R - S)
B. Cartesian Product (R × S)
C. Union (R ∪ S)
D. Natural Join (R ⨝ S)

35 What is a primary advantage of the three-tier architecture over a two-tier (client-server) architecture, especially for large-scale web applications?

three tier dbms architecture Medium
A. It is simpler to develop and deploy than a two-tier architecture.
B. It places all business logic on the client, making the application more responsive.
C. It allows the business logic to be scaled independently of the database and presentation layers.
D. It reduces the network traffic between the client and the server.

36 If a DBMS server loses power unexpectedly, which component is responsible for bringing the database back to the last consistent state once power is restored?

components of dbms Medium
A. Authorization Manager
B. Buffer Manager
C. Recovery Manager
D. Query Optimizer

37 A system needs to store a complex, interconnected network of friendships and relationships, and the primary goal is to quickly query paths like "find friends of my friends who live in New York". Which type of database would be most efficient for this task?

Comparison of relational and non-relational databases Medium
A. A graph database, as it is optimized for traversing relationships between nodes.
B. A relational database, by using multiple join tables to represent relationships.
C. A document database, as it can store user profiles as JSON objects.
D. A key-value store, for fast retrieval of individual user data.

38 A DBMS provides mechanisms to enforce integrity constraints, such as ensuring that the age of an employee is always between 18 and 65. This is an example of enforcing what type of integrity?

purpose of database systems Medium
A. Domain Integrity
B. Transactional Integrity
C. Entity Integrity
D. Referential Integrity

39 In an ER diagram, a relationship Works_On connects three entities: Employee, Project, and Branch. A tuple in this relationship signifies that a specific employee works on a specific project at a specific branch. This is best modeled as a:

entity relationship model Medium
A. Ternary relationship among Employee, Project, and Branch.
B. Recursive relationship on the Employee entity.
C. Binary relationship between Employee and Project.
D. Series of three binary relationships: (Employee, Project), (Project, Branch), (Employee, Branch).

40 A table STUDENT has a primary key StudentID. Another table ENROLLMENT has a composite primary key (StudentID, CourseID). The StudentID column in ENROLLMENT is also a foreign key referencing STUDENT. What does this structure imply?

relational model Medium
A. The relationship between STUDENT and ENROLLMENT is one-to-one.
B. A course can have only one student.
C. A student can enroll in only one course.
D. The ENROLLMENT table represents a many-to-many relationship between students and courses.

41 A legacy database system directly couples application logic with the conceptual schema. If the database administrator decides to normalize a large, denormalized table into two smaller, related tables to reduce redundancy, what specific DBMS feature must be robustly implemented to prevent existing applications from breaking, and what would be the primary consequence of its absence?

data independence Hard
A. Logical Data Independence; Absence would require changing the physical storage structure (e.g., file organization).
B. Logical Data Independence; Absence would require rewriting the application code that queries the original table.
C. Physical Data Independence; Absence would require recompiling the query optimizer.
D. Physical Data Independence; Absence would require rewriting the application code that queries the original table.

42 In a high-traffic e-commerce application using a three-tier architecture, the application server tier is often scaled horizontally by adding more servers. Which of the following is the most critical design principle for the application tier that enables this scalability, and what is its primary side-effect on the database tier?

three tier dbms architecture Hard
A. Direct client-to-database connections; it enhances database security by bypassing the middle tier.
B. Statelessness of application servers; it concentrates connection management and can create a performance bottleneck at the database tier.
C. Isolation of presentation logic from the database; it simplifies database schema evolution.
D. Data locality on application servers; it reduces the number of database connections needed.

43 Consider a ternary relationship Enrolls between entities Student, Course, and Professor. The cardinality constraint on the Course side of the relationship is (1,1), while Student and Professor are (0,N). What is the most accurate implication when translating this ER model into a relational schema?

entity relationship model Hard
A. The primary key for the Enrolls relation can be a composite of the Student and Professor primary keys alone.
B. Every Course entity must have at least one student enrolled with at least one professor.
C. The foreign key referencing Course in the Enrolls relation cannot be NULL and must be part of its primary key.
D. A separate relation for Enrolls is not needed; its attributes can be merged into the Course relation.

44 A relational schema includes two tables: EMPLOYEE(EmpID, Name, DeptID) and DEPARTMENT(DeptID, DeptName, ManagerID). EmpID and DeptID are primary keys. EMPLOYEE.DeptID is a foreign key to DEPARTMENT. DEPARTMENT.ManagerID is a foreign key to EMPLOYEE.EmpID. Which of the following scenarios presents a circular dependency problem that requires special handling, such as deferrable constraints?

relational model Hard
A. Inserting a new EMPLOYEE into a DEPARTMENT that already exists.
B. Inserting the very first DEPARTMENT record and the EMPLOYEE record for its manager within a single transaction.
C. Updating the ManagerID of an existing DEPARTMENT to an existing EMPLOYEE.
D. Deleting a DEPARTMENT that has no employees.

45 A distributed system for managing financial trades requires that every transaction is fully completed or not at all, and that the database state is always valid according to defined business rules (e.g., account balances cannot be negative). During a network partition, the system must halt operations in the minority partition to prevent inconsistent data. According to the CAP theorem, which two properties is this system prioritizing, and what database model is most aligned with these priorities?

Comparison of relational and non-relational databases Hard
A. Consistency and Availability (CA); this model is not practical in distributed systems.
B. Consistency and Partition Tolerance (CP); typically a traditional Relational (SQL) model.
C. Consistency and Performance (CP); typically a Graph model.
D. Availability and Partition Tolerance (AP); typically a Document or Key-Value model.

46 A database has a schema defined by CREATE TABLE Users (UserID INT PRIMARY KEY, Email VARCHAR(255) UNIQUE). A DBA then executes ALTER TABLE Users ADD CONSTRAINT chk_email CHECK (Email LIKE '%@%.%'). Following this, a user inserts 10 new valid user records into the table. Which statement most accurately describes the sequence of events?

database schema, instance Hard
A. First the database schema was changed, then the database instance was changed.
B. Only the database instance was changed.
C. First the database instance was changed, then the schema was changed.
D. Only the database schema was changed.

47 When a query optimizer evaluates different execution plans for a complex SQL query, its cost model heavily relies on statistics about the data (e.g., table size, cardinality, histograms). Which DBMS component is responsible for maintaining and providing these statistics to the optimizer?

components of dbms Hard
A. The Concurrency Control Manager
B. The Storage Manager, specifically the Catalog Manager
C. The Buffer Manager
D. The Transaction Manager

48 A data architect is designing a database for a university. The initial ER diagram is implementation-agnostic. The architect then maps it to a set of 3NF relational tables with defined data types (e.g., VARCHAR, INT). Finally, for the production deployment on a specific cloud platform, the architect specifies B-Tree indexes on foreign keys and a hash-based partitioning strategy on the StudentID. This workflow corresponds to which sequence of data models?

data modeling Hard
A. Conceptual Model -> Physical Model -> Logical Model
B. Logical Model -> Conceptual Model -> Physical Model
C. Physical Model -> Logical Model -> Conceptual Model
D. Conceptual Model -> Logical Model -> Physical Model

49 A banking application processes a fund transfer by first debiting Account A and then crediting Account B. A system crash occurs after the debit is successfully written to disk but before the credit operation begins. Upon restart, the database is in a state where Account A is debited but Account B is not credited. Which ACID property has been violated, and what DBMS feature is responsible for preventing this?

purpose of database systems Hard
A. Consistency, prevented by integrity constraints.
B. Durability, prevented by the write-ahead log.
C. Isolation, prevented by the locking manager.
D. Atomicity, prevented by the transaction manager using the log for rollback.

50 In an ER model, Employee is an entity. Skill is also an entity. An employee can have multiple skills, and a skill can be possessed by multiple employees. Furthermore, we need to store the ProficiencyLevel (e.g., 'Beginner', 'Expert') for each skill that a specific employee has. How should this ProficiencyLevel attribute be modeled?

entity relationship model Hard
A. As an attribute of the M:N relationship between Employee and Skill.
B. As a new weak entity called Proficiency dependent on Employee.
C. As a multi-valued attribute of the Employee entity.
D. As a simple attribute of the Skill entity.

51 Given two relations, Students(sid, sname) and Enrolled(sid, cid), where sid is student ID and cid is course ID. Which of the following relational algebra expressions correctly finds the IDs of students who are enrolled in every course that exists in a third relation, Courses(cid, cname)?

relational model Hard
A.
B.
C.
D.

52 A DBA performs two actions on a production database: 1) Reorganizes a table's physical storage from a heap to a clustered index structure to speed up range queries. 2) Creates a view V as SELECT C1, C2 FROM T to provide limited data access to a new group of users. Which statement accurately describes the type of data independence primarily associated with each action's goal?

data independence Hard
A. Action 1 leverages logical independence; Action 2 leverages physical independence.
B. Both actions leverage physical independence.
C. Action 1 leverages physical independence; Action 2 leverages logical independence.
D. Both actions leverage logical independence.

53 The "object-relational impedance mismatch" refers to the challenges of mapping rich, graph-like object models from application code to the tabular structure of a relational database. Which database model is inherently designed to minimize this specific problem most effectively?

Comparison of relational and non-relational databases Hard
A. Document databases, because their native data model (e.g., JSON/BSON) naturally represents nested and hierarchical object structures.
B. Relational databases with advanced object-relational mapping (ORM) extensions and libraries.
C. Wide-column stores, because they allow for a flexible number of attributes per row.
D. Key-Value databases, by allowing the storage of serialized objects as opaque values.

54 Which of the following is a primary security advantage of a three-tier architecture over a two-tier (client-server) architecture, and which security threat does it most directly mitigate?

three tier dbms architecture Hard
A. It eliminates the need for database user credentials, primarily mitigating brute-force password attacks.
B. It encrypts all client-server communication by default, primarily mitigating Man-in-the-Middle (MITM) attacks.
C. It moves the database behind an additional network firewall, primarily mitigating Denial-of-Service (DoS) attacks.
D. It abstracts the database schema and centralizes data access logic, primarily mitigating SQL Injection attacks.

55 Given a relation R(A, B, C, D, E) with the functional dependencies: {A -> B, BC -> E, ED -> A}. Which of the following is a candidate key for R?

relational model Hard
A. {C, D}
B. {E, D}
C. {A, D}
D. {A, C}

56 Given a relation R(A, B, C, D, E) with the set of functional dependencies . Which of the following is a candidate key for R?

relational model Hard
A. {A, B}
B. {A, C, E}
C. {A}
D. {C, D}

57 An ER diagram for a Movie entity includes a multi-valued attribute named Keywords. To map this ER model to a relational schema that adheres to First Normal Form (1NF), what is the canonical approach?

entity relationship model Hard
A. Create a Keywords column in the Movie table and store the keywords as a JSON array string.
B. Create a fixed number of columns in the Movie table, such as Keyword1, Keyword2, Keyword3.
C. Create a new relation, MovieKeyword, with columns (MovieID, Keyword), where the composite key (MovieID, Keyword) is the primary key and MovieID is a foreign key to Movie.
D. Create a separate Keyword table with KeywordID and KeywordText, and add a KeywordID foreign key to the Movie table.

58 In the context of a DBMS, which statement provides the most technically precise distinction between the database schema and the system catalog (or data dictionary)?

database schema, instance Hard
A. The schema is a formal description of the database structure, while the catalog is the physical storage of that description as metadata.
B. They are synonymous terms for the collection of CREATE TABLE statements.
C. The schema contains the user data, while the catalog contains the structural data.
D. The schema is the logical design, while the catalog is the physical implementation of that design.

59 During the recovery process after a system crash, the Recovery Manager uses the ARIES (Algorithm for Recovery and Isolation Exploiting Semantics) protocol. What is the primary purpose of the 'Analysis' pass, which is the first of the three passes?

components of dbms Hard
A. To undo the changes of all transactions that were active at the time of the crash.
B. To identify which data pages were dirty (modified in memory but not written to disk) at the time of the crash and which transactions were in-flight.
C. To redo all changes for committed transactions whose updates may not have reached the disk.
D. To write a checkpoint record to the log to signify the start of the recovery process.

60 You are designing a system to manage a product catalog for an e-commerce giant. Products have highly variable attributes; for example, a 'Book' has 'Author' and 'ISBN', while a 'Laptop' has 'CPU' and 'RAM', and new product types with new attributes are added daily. Query patterns involve filtering products by these diverse attributes. Which database model provides the most natural and efficient solution for this schema evolution and query requirement?

Comparison of relational and non-relational databases Hard
A. Graph model, representing products and attributes as nodes connected by edges.
B. Document model, where each product is a separate document containing its specific key-value attributes.
C. Relational model using a single table with many nullable columns for all possible attributes.
D. Relational model using an Entity-Attribute-Value (EAV) pattern.

61 The "Durability" property in ACID transactions ensures that committed changes persist even if the system fails. Which underlying DBMS mechanism is the most direct and critical enabler of this guarantee?

purpose of database systems Hard
A. The use of two-phase locking (2PL) to prevent concurrent transactions from interfering with each other.
B. The ability to roll back a transaction automatically if an integrity constraint is violated.
C. The implementation of a write-ahead logging (WAL) protocol, where log records are written to stable storage before data pages are.
D. The maintenance of a main memory buffer pool to cache frequently accessed data blocks for performance.