Autumn 2026 All AIOU Solved Assignments, Key Books & 8613 Projects Live!
100% Free Online Reading • Copy & Download Disabled
AIOU LIBRARY KEY BOOK Course Code 3435 • BS Computer Science (BSCS) 🇬🇧 English Medium

AIOU Code 3435: BSCS Computing Course 3435 — Complete Helping Key Book & Exam Guide

Read chapter-by-chapter summaries, solved self-assessment exercises, past paper long questions, and solved MCQs directly on AIOU Library. Free of cost for all AIOU students.

Published Units: 9 / 9 Units
← Course Hub

AIOU LIBRARY • READ ONLY

AIOULIBRARY.COM • CODE 3435

AIOU LIBRARY • DO NOT COPY

Unit 5 of 9 • Verified Key Book Authored by AIOU Library Academic Engine • 8588 Words

Unit 5: Database Systems and Information Management

Part 1: Comprehensive Unit Summary & Core Concepts

Easy Chapter Introduction & Learning Objectives

Welcome to Unit 5 of Course 3435 (BSCS Computing). As a distance-learning student at Allama Iqbal Open University (AIOU), you are likely familiar with how computers store information in simple files like Microsoft Word documents or Excel spreadsheets. However, imagine running a massive national system like NADRA (National Database and Registration Authority), the University's student examination portal, or a busy online shopping store like Daraz. These platforms handle millions of records every single second. If they stored all this data in simple files, the system would crash, slow down, or lose information due to multiple users trying to update things at the exact same time.

This is where Database Systems and Information Management come into play. In this comprehensive study chapter, we will break down the complex world of databases into simple, everyday concepts. You will learn how modern organizations store, protect, organize, and retrieve information safely and efficiently. Whether you are preparing for your final AIOU exams or building a foundation for your career as a software engineer or IT specialist, this guide will provide you with crystal-clear explanations, practical examples, and step-by-step breakdowns of every core syllabus topic.

Key Learning Objectives

  • Understand the fundamental differences between traditional file systems and modern Database Management Systems (DBMS).
  • Master the basics of the Relational Model and write simple, effective SQL (Structured Query Language) queries.
  • Visualize real-world data structures using Entity-Relationship (ER) Modeling (Entities, Attributes, and Relationships).
  • Apply Database Normalization techniques to eliminate data redundancy and keep databases clean and reliable.
  • Learn how Transaction Management and Concurrency Control maintain data integrity when multiple users access the system simultaneously.
  • Explore advanced concepts like Data Warehousing and modern trends in database technologies (NoSQL, Cloud Databases).

Detailed Explanation of Every Unit Topic

1. Introduction to Database Management Systems (DBMS)

To understand what a Database Management System (DBMS) is, let us first look at how we used to manage data in the past, and how we do it today using software systems.

Traditional File Systems vs. DBMS

In the early days of computing, organizations used File Systems to store data. In a file system, data is kept in separate, flat files managed by the operating system. For example, a college might have one file for student admissions, another file for library books, and a third file for fee payments.

However, file systems have major problems:

  • Data Redundancy: The same information (like a student's home address and phone number) is saved multiple times in different files. If the student moves, the address must be updated manually in every single file, which often leads to errors.
  • Data Inconsistency: If a student's phone number is updated in the admission file but forgotten in the library file, the system holds conflicting information.
  • Poor Security: It is difficult to restrict users from accessing parts of a file system they shouldn't see.
  • Data Isolation: Data is scattered across various formats, making it hard to write new programs to fetch combined reports.

A Database Management System (DBMS) is a specialized software package that serves as an interface between the database and end-users or application programs. It allows users to create, read, update, and delete data safely and efficiently while maintaining centralized control.

Real-Life Pakistani Example: Think of a local school office that keeps student records in separate notebooks (File System). If a student changes their section, the clerk has to search through five different registers to make the change, often missing one. Now, imagine that school upgrading to a computerized software system (DBMS) where a student’s profile is stored in one single central database. Changing the section in one place automatically updates it everywhere instantly!

Components of a DBMS Environment
  • Hardware: The physical computers, servers, storage devices (Hard Disks/SSDs), and network cables where the database runs.
  • Software: The actual DBMS software itself (like MySQL, Oracle, Microsoft SQL Server, or PostgreSQL), along with the operating system and network software.
  • Data: The actual facts, figures, and operational information stored in the database. In a DBMS, data is integrated (bringing together different files) and shared.
  • Procedures: The rules, policies, and instructions on how to design, manage, backup, and use the database.
  • People: The human beings involved with the system, including Database Administrators (DBAs), database designers, application programmers, and end-users.

2. Relational Model and SQL Fundamentals

The Relational Model was introduced by Edgar F. Codd in 1970. It organizes data into tables (formally called relations), which consist of rows and columns. This model is the foundation of almost all popular commercial and open-source database systems used today.

Structure of a Relational Table
  • Relation (Table): A two-dimensional structure made up of rows and columns. For example, a table named Students.
  • Tuple (Row/Record): Each horizontal row in a table represents a single, related set of values. For example, one row represents a specific student named Ali with ID 101.
  • Attribute (Column/Field): Each vertical column represents a specific property or characteristic of the entity. Examples include StudentID, StudentName, and EnrollmentDate.
  • Domain: The set of allowable values for a specific column. For instance, the domain for an Age column might be integers between 17 and 60.
Keys in Relational Databases

Keys are crucial attributes used to establish relationships between tables and ensure data integrity:

  • Primary Key: A unique column (or set of columns) that identifies each row in a table uniquely. No two rows can have the same primary key value, and it cannot be NULL. (Example: RollNumber in a Student table).
  • Foreign Key: An attribute in one table that points to the primary key of another table. It is used to link two tables together. (Example: CourseID in a Registration table pointing to the CourseID in a Courses table).
  • Candidate Key: Any column or combination of columns that can uniquely identify a row. From the candidate keys, one is chosen as the Primary Key.
  • Composite Key: A primary key made by combining two or more columns when a single column is not enough to guarantee uniqueness.
Introduction to SQL (Structured Query Language)

SQL is the standard language used to communicate with relational databases. It allows you to create tables, insert data, query records, and update information. SQL commands are divided into categories:

  • DDL (Data Definition Language): Used to define database structures.
    • CREATE TABLE: Builds a new table.
    • ALTER TABLE: Modifies an existing table structure.
    • DROP TABLE: Deletes a table completely.
  • DML (Data Manipulation Language): Used to manage data inside tables.
    • SELECT: Retrieves data from a database.
    • INSERT: Adds new rows of data.
    • UPDATE: Modifies existing data.
    • DELETE: Removes rows of data.

Simple SQL Examples:

-- Creating a simple table
CREATE TABLE Customers (
    CustomerID INT PRIMARY KEY,
    CustomerName VARCHAR(50),
    City VARCHAR(50)
);

-- Inserting data into the table
INSERT INTO Customers (CustomerID, CustomerName, City) 
VALUES (1, 'Ahmed Khan', 'Lahore');

-- Querying data from the table
SELECT CustomerName, City FROM Customers WHERE City = 'Lahore';

3. Entity-Relationship (ER) Modeling

Before writing code or creating tables in a database, database designers use a high-level conceptual design technique called Entity-Relationship (ER) Modeling. An ER model helps visualize the logical structure of a database using diagrams known as ER Diagrams (ERDs).

Core Components of ER Diagrams
  • Entity: A real-world object or concept that has an independent existence and about which we want to store data. Represented by a rectangle. (Examples: Student, Car, Employee).
  • Attribute: The characteristics or properties that describe an entity. Represented by ellipses (ovals). (Examples: A Student entity has attributes like Name, Age, and Email).
    • Simple/Composite Attributes: Simple cannot be divided (e.g., Age); composite can be split (e.g., Address into Street, City, Country).
    • Single-valued/Multi-valued Attributes: Single has one value (e.g., CNIC); multi-valued can have multiple values (e.g., PhoneNumbers).
    • Derived Attribute: An attribute whose value is calculated from other attributes (e.g., calculating Age from DateOfBirth).
  • Relationship: An association or connection between two or more entities. Represented by a diamond shape. (Example: A Student enrolls in a Course).
Cardinality and Participation Constraints

Cardinality expresses the maximum number of relationship instances that an entity can participate in:

  • One-to-One (1:1): One record in Table A is related to only one record in Table B. (Example: One person has one National ID Card).
  • One-to-Many (1:N): One record in Table A is related to multiple records in Table B. (Example: One department has many employees, but an employee belongs to only one department).
  • Many-to-Many (M:N): Multiple records in Table A can relate to multiple records in Table B. (Example: Multiple students can enroll in multiple courses).

Participation Constraints: Specify whether the existence of an entity depends on its being related to another entity.

  • Total Participation: Every entity in the set must be involved in the relationship (represented by a double line). For example, every loan must be associated with a customer.
  • Partial Participation: Not every entity in the set needs to be involved in the relationship (represented by a single line). For example, not every employee is a manager of a department.

4. Normalization and Database Design

When designing tables, poor structure can lead to data anomalies—problems that occur when inserting, updating, or deleting records. Normalization is the step-by-step process of organizing columns and tables in a relational database to minimize data redundancy and dependency.

Types of Data Anomalies
  • Insertion Anomaly: Inability to add data because mandatory primary key information is missing. (Example: You cannot add a new course fee structure until at least one student registers for it).
  • Update Anomaly: When a piece of data is updated in one place but remains outdated elsewhere, causing inconsistencies.
  • Deletion Anomaly: Unintentional loss of valuable data when a specific row is deleted. (Example: Deleting the last student enrolled in a class accidentally erases all records of the class itself).
The Normal Forms

Normalization breaks down complex, messy tables into smaller, clean tables through standard stages called Normal Forms (NFs):

  • First Normal Form (1NF):
    • Rule: Every table cell must contain a single, atomic (indivisible) value. There should be no repeating groups or arrays within a column.
    • Example: If a Student table has a column called Hobbies containing "Cricket, Reading", it violates 1NF. To fix it, each hobby must be placed in its own individual row.
  • Second Normal Form (2NF):
    • Rule: The table must already be in 1NF, and all non-key attributes must be fully functionally dependent on the entire primary key (no partial dependency). This applies mostly to tables with composite primary keys.
    • Example: If a composite key is (StudentID, CourseID), any column like StudentName that depends only on StudentID (and not CourseID) must be moved to a separate table.
  • Third Normal Form (3NF):
    • Rule: The table must already be in 2NF, and there must be no transitive dependencies. This means non-key attributes must depend *only* on the primary key, not on other non-key attributes.
    • Example: If a table contains StudentID, CourseID, InstructorID, and InstructorEmail, the email depends on the Instructor ID, not the Student. The instructor details should be moved to an Instructor table.

5. Transaction Management and Concurrency Control

In a multi-user environment, hundreds of people might perform actions on a database at the exact same time. A Transaction is a single logical unit of work that accesses and potentially modifies the contents of a database.

The ACID Properties

To ensure reliability, every transaction in a robust DBMS must strictly follow the four ACID properties:

  • Atomicity ("All or Nothing"): A transaction is treated as a single indivisible unit. Either all the operations within the transaction succeed and are saved, or none of them happen. (Example: When transferring money from Account A to Account B, if money is deducted from A but power fails before adding it to B, the system must rollback the deduction).
  • Consistency: A transaction must take the database from one valid, legal state to another valid state, obeying all database rules, constraints, and primary keys.
  • Isolation: Even though multiple transactions run simultaneously, the execution of one transaction must be isolated from others. It should appear as if each transaction is running all by itself.
  • Durability: Once a transaction successfully commits, its changes are permanent. Even if the server crashes or loses electricity immediately afterward, the data will not be lost.
Concurrency Control Problems

When multiple transactions run concurrently without proper management, several serious problems can occur:

  • Lost Update: Occurs when two transactions read the same value and update it, causing the updates of the first transaction to be overwritten and lost.
  • Dirty Read: Occurs when Transaction A reads data modified by Transaction B before Transaction B has committed. If Transaction B rolls back, Transaction A has read incorrect, "dirty" data.
  • Unrepeatable Read: Occurs when Transaction A reads a value, and while it is still running, Transaction B updates or deletes that value and commits. If Transaction A reads the same value again, it gets a different result.

DBMS uses techniques like locking (exclusive and shared locks) and timestamp ordering to prevent these issues and maintain order.

6. Data Warehousing and Modern Trends in Databases

As businesses grow, operational databases are optimized for everyday transactions (OLTP - Online Transaction Processing). However, for long-term business planning, forecasting, and decision-making, organizations use Data Warehouses (OLAP - Online Analytical Processing).

What is a Data Warehouse?

A Data Warehouse is a large, centralized, read-only repository of integrated data collected from multiple different operational systems across an enterprise. Unlike regular databases designed to handle fast inserts and updates, data warehouses are optimized for complex queries, historical reporting, and data mining.

Modern Trends in Database Systems

Traditional relational databases (SQL) are powerful, but modern applications handling massive amounts of unstructured data (social media posts, sensor streams, videos) have introduced new paradigms:

  • NoSQL Databases: "Not Only SQL" databases designed to handle unstructured or semi-structured data (like JSON documents, key-value pairs, graphs). Examples include MongoDB, Cassandra, and Redis. They offer high scalability and flexible schemas.
  • Cloud Databases: Databases hosted on cloud computing platforms (such as Amazon RDS, Google Cloud SQL, Microsoft Azure Cosmos DB). They allow organizations to scale storage up or down instantly without maintaining physical hardware servers.
  • Distributed Databases: Databases spread across multiple physical locations or servers connected via a network, ensuring high availability and fault tolerance.

Key Terms & Easy Glossary

  • Database Management System (DBMS): A collection of programs that enables users to create and maintain a database. It serves as an interface between application programs and the physical data storage.
  • Relational Model: A database model that organizes data into two-dimensional tables consisting of rows and columns, allowing easy linking of information using common keys.
  • Primary Key: A unique column or set of columns in a table that identifies each individual row without any duplication. It cannot contain null values.
  • Foreign Key: An attribute or set of attributes in a table that matches the primary key of another table, creating a relationship between the two tables.
  • Entity-Relationship Diagram (ERD): A visual blueprint of a database that displays entities, their attributes, and the relationships between them using standard geometric symbols.
  • Normalization: The systematic process of breaking down tables to remove data redundancy and eliminate anomalies, making the database clean and efficient.
  • ACID Properties: A set of four fundamental principles (Atomicity, Consistency, Isolation, Durability) that guarantee database transactions are processed reliably and safely.
  • Transaction: A single sequence of database operations executed as a unified unit of work. It must follow the ACID rules to maintain system accuracy.
  • Data Warehouse: A massive, centralized repository of historical data gathered from various operational systems, specially designed for complex querying, business intelligence, and data analysis.
  • NoSQL Database: A non-relational database management system designed to store and manage unstructured, semi-structured, or large-scale distributed data with flexible schemas.
Part 2: Solved Self-Assessment & Short Questions

Q: What is the difference between file processing systems and Database Management Systems (DBMS)?

Easy Answer: A traditional file processing system stores data in separate, disconnected files managed by various application programs. In contrast, a Database Management System (DBMS) is a centralized software system designed to store, manage, retrieve, and secure an integrated collection of data. Key Differences:

  • Data Redundancy and Isolation: In file systems, the same data is often duplicated across multiple files, leading to wasted storage and inconsistencies. A DBMS minimizes redundancy by centralizing data storage.
  • Data Sharing and Concurrency: File systems make it difficult for multiple users to access the same file simultaneously without corrupting data. A DBMS provides robust concurrency control to allow safe, simultaneous access.
  • Data Security: File systems rely heavily on operating system-level file permissions, which are often weak. A DBMS includes sophisticated access controls, authentication, and encryption mechanisms.
  • Data Integrity: File systems lack built-in validation rules, meaning incorrect data types can easily be saved. A DBMS enforces integrity constraints (like data types, null constraints, and check constraints) automatically.
  • Maintenance and Program-Data Independence: In file systems, if the physical structure of a file changes, all dependent application programs must be rewritten. A DBMS provides data independence, isolating application code from physical storage changes.
Real-World Example: Imagine a university using a file system where the Accounts department and the Admissions department each keep separate student spreadsheets. If a student changes their address, Accounts might update it while Admissions misses it, causing data inconsistency. In a DBMS, the student table is centralized; updating the address once instantly updates it for all authorized departments, ensuring accuracy and synchronization.

Q: Explain the three-schema architecture of a DBMS and its purpose.

Easy Answer: The three-schema architecture is a standard framework for database systems designed to separate the user applications from the physical database storage. Proposed by ANSI/SPARC, its main purpose is to achieve data independence, ensuring that changes at one level do not require modifications at other levels. The Three Levels:

  • External Level (View Level): This is closest to the users. It consists of multiple external schemas or user views, showing only the specific subset of data that a particular user or application needs while hiding the rest.
  • Conceptual Level: This is the community view of the database. It describes what data is stored in the database, the relationships among the data, and all constraints, hiding the physical storage details.
  • Internal Level (Physical Level): This is closest to the physical storage. It describes how the data is actually stored on storage media, including file structures, indexes, compression techniques, and data paths.
Mappings:
  • External/Conceptual Mapping: Translates requests between the user views and the conceptual schema.
  • Conceptual/Internal Mapping: Translates conceptual requests into physical storage operations.
Real-World Example: Consider a banking app. The mobile user sees a simplified screen of their account balance (External Schema). The bank's business logic manages accounts and customers collectively (Conceptual Schema). Meanwhile, the database server stores these records in indexed B-trees on solid-state drives (Internal Schema). If the bank upgrades its hard drives (Internal change), the mobile app's user interface remains completely unaffected.

Q: Define primary key, foreign key, and candidate key with examples.

Easy Answer: Keys are fundamental constraints in relational databases used to uniquely identify tuples (rows) and establish relationships between tables. 1. Candidate Key:

  • Definition: An attribute or a set of attributes that can uniquely identify a single tuple in a relation. A table can have multiple candidate keys.
  • Example: In an Employee table, both Employee_ID and Email_Address can uniquely identify an employee. Both are candidate keys.
2. Primary Key:
  • Definition: A chosen candidate key selected by the database designer to uniquely identify records in a table. It cannot contain null values and must be unique.
  • Example: Out of the candidate keys Employee_ID and Email_Address, the designer chooses Employee_ID as the Primary Key because it is shorter and never changes.
3. Foreign Key:
  • Definition: An attribute (or set of attributes) in one table that references the primary key of another table. It is used to link two tables together and enforce referential integrity.
  • Example: In a Department table, Dept_ID is the primary key. In the Employee table, Dept_ID is included as a column; here, it acts as a Foreign Key to link each employee to their specific department.

Q: What is normalization? Explain 1NF, 2NF, and 3NF with examples.

Easy Answer: Normalization is the systematic process of organizing data in a relational database to reduce data redundancy, eliminate undesirable anomalies (insertion, update, deletion), and ensure data consistency. 1. First Normal Form (1NF):

  • Rule: Each column must contain atomic (indivisible) values, and each record must be unique with no repeating groups.
  • Example: If an Employee table has a multi-valued column Skills containing values like "Java, SQL" in a single cell, it violates 1NF. To fix it, we break it down so each row contains a single skill per employee.
2. Second Normal Form (2NF):
  • Rule: The table must be in 1NF, and all non-key attributes must be fully functionally dependent on the entire primary key (no partial dependencies). This applies mostly to composite primary keys.
  • Example: In an Order_Details table with a composite key (Order_ID, Product_ID), if Product_Name depends only on Product_ID (part of the key) rather than the whole key, it violates 2NF. We fix it by moving Product_Name to a separate Product table.
3. Third Normal Form (3NF):
  • Rule: The table must be in 2NF, and there must be no transitive dependencies. Non-key attributes must depend only on the primary key, not on other non-key attributes.
  • Example: In an Employee table, if Emp_ID determines Dept_ID, and Dept_ID determines Dept_Name, a transitive dependency exists (Emp_ID -> Dept_ID -> Dept_Name). We fix it by moving department details into a separate Department table.

Q: Describe ACID properties in the context of database transactions.

Easy Answer: ACID is a set of four key properties that guarantee reliable processing of database transactions, ensuring data integrity even in the event of system failures, power outages, or concurrent operations. The Four Properties:

  • Atomicity ("All or Nothing"): A transaction is treated as a single, indivisible unit of work. Either all operations within the transaction execute successfully, or none of them do. If a failure occurs midway, the database rolls back all changes.
  • Consistency: A transaction must take the database from one valid state to another, maintaining all predefined rules, constraints, and cascading triggers. Any transaction that violates database rules is rejected and rolled back.
  • Isolation: Transactions execute independently of one another. The intermediate state of a concurrent transaction is invisible to other transactions until it is fully committed, preventing read/write interference.
  • Durability: Once a transaction is successfully committed, its changes are permanent, even if the system crashes immediately afterwards. Database management systems use transaction logs to recover committed data in case of power failure.
Real-World Example: When transferring $100 from Account A to Account B, Atomicity ensures that money is debited from A and credited to B together. If the system crashes after debiting A but before crediting B, the transaction aborts and rolls back, ensuring no money is lost.

Q: What are the main functions of a database administrator (DBA)?

Easy Answer: A Database Administrator (DBA) is an IT professional responsible for the design, implementation, configuration, security, performance, and maintenance of an organization's databases. Main Functions and Responsibilities:

  • Database Installation and Upgrades: Installing DBMS software, applying security patches, and upgrading database engines to newer versions without disrupting business operations.
  • Security Management: Creating user accounts, defining access roles, assigning granular privileges, and ensuring compliance with data privacy regulations.
  • Backup and Disaster Recovery: Designing and executing regular backup schedules (full, incremental, differential) and testing restoration procedures to protect against data loss.
  • Performance Tuning and Optimization: Monitoring query execution plans, creating efficient indexes, tuning system memory buffers, and resolving performance bottlenecks.
  • Capacity Planning: Analyzing current storage utilization and forecasting future hardware, memory, and disk space requirements to prevent system crashes.
  • Integrity and Schema Maintenance: Collaborating with developers to design efficient database schemas, enforcing constraints, and managing database migrations.

Q: Define Data Independence and its types.

Easy Answer: Data Independence is the capacity to change the schema at one level of a database system without having to change the schema at the next higher level. It protects application programs from being modified when database storage structures or logical definitions change. Types of Data Independence:

  • Logical Data Independence: The ability to modify the conceptual schema (e.g., adding a new table, column, or relationship) without altering existing external schemas or application programs.
  • Physical Data Independence: The ability to modify the internal schema—such as changing file organizations, indexing strategies, or storage hardware—without affecting the conceptual schema or application code.

Q: What is an ER diagram? List its basic components.

Easy Answer: An Entity-Relationship (ER) diagram is a visual, conceptual representation of data and the relationships among them for a given organization or business domain. It helps database designers model data requirements clearly before writing code. Basic Components:

  • Entities: Real-world objects or concepts with an independent existence, represented by rectangles (e.g., Student, Course).
  • Attributes: Characteristics or properties of an entity, represented by ellipses (e.g., Student_Name, Age).
  • Relationships: Associations or interactions between entities, represented by diamonds (e.g., Enrolls_In).
  • Cardinality: Defines the numerical constraints on relationships (e.g., One-to-One, One-to-Many, Many-to-Many).

Q: What is SQL? Differentiate between DDL and DML.

Easy Answer: SQL (Structured Query Language) is the standard programming language specifically designed for managing, querying, and manipulating relational databases. Differences:

  • DDL (Data Definition Language): Used to define and modify the structure or schema of the database. Commands include CREATE, ALTER, DROP, and TRUNCATE. Changes made by DDL are auto-committed and permanent.
  • DML (Data Manipulation Language): Used to manage and manipulate the actual data stored within database tables. Commands include SELECT, INSERT, UPDATE, and DELETE. DML operations can be rolled back if executed within a transaction block.

Q: Explain the concept of referential integrity.

Easy Answer: Referential integrity is a database constraint rule that ensures relationships between tables remain consistent. It dictates that if a foreign key value is present in a child table, it must point to a valid, existing primary key in the parent table. Key Points:

  • Prevents "orphan" records where a child record references a parent record that has been deleted.
  • Enforced using Foreign Key constraints during INSERT, UPDATE, and DELETE operations.
  • Often paired with cascade rules (e.g., ON DELETE CASCADE) to automatically delete child records when the parent record is removed.

Q: What is meant by a deadlock in transaction management?

Easy Answer: A deadlock is an unwanted state in concurrency control where two or more transactions are permanently blocked because each transaction holds a lock on a resource that the other transaction needs. Key Points:

  • Neither transaction can proceed, resulting in a permanent freeze unless system intervention occurs.
  • Example: Transaction T1 locks Row A and waits for Row B. Transaction T2 locks Row B and waits for Row A. Both are stuck waiting for each other.
  • Resolution: DBMS uses deadlock detection algorithms (like wait-for graphs) to abort one of the transactions (the "victim") and roll back its changes to let the other proceed.

Q: Differentiate between OLTP and OLAP systems.

Easy Answer: OLTP (Online Transaction Processing) and OLAP (Online Analytical Processing) serve entirely different operational and business intelligence needs. Differences:

  • Purpose: OLTP manages day-to-day, real-time transactional operations (e.g., ATM withdrawals). OLAP supports complex business decision-making, reporting, and data mining (e.g., analyzing sales trends over 5 years).
  • Data Structure: OLTP uses normalized relational databases optimized for fast inserts, updates, and deletes. OLAP uses denormalized schemas (like star or snowflake schemas) optimized for complex read queries.
  • Query Volume: OLTP handles many short, concurrent transactions involving few records. OLAP processes fewer, long-running queries that scan millions of historical rows.

Q: What is a view in SQL? Give its utility.

Easy Answer: A view is a virtual table in a database whose contents are defined by a stored SQL query. It does not store data physically; instead, it dynamically retrieves data from underlying base tables whenever it is accessed. Utility:

  • Security: Restricts user access to sensitive data by exposing only specific rows and columns (e.g., hiding employee salaries while showing names and departments).
  • Simplicity: Encapsulates complex multi-table joins and aggregations into a single virtual table, making queries much easier to write and read.
  • Logical Independence: Provides a consistent interface for applications even if the underlying base table structure changes.

Q: Define functional dependency.

Easy Answer: A functional dependency (FD) is a constraint that describes the relationship between attributes in a relation, specifying that the value of one attribute uniquely determines the value of another attribute. Key Points:

  • Represented notationally as $X \rightarrow Y$, meaning attribute $X$ functionally determines attribute $Y$.
  • If two rows have the exact same value for $X$, they must also have the exact same value for $Y$.
  • It serves as the theoretical foundation for database normalization, helping identify redundant columns and split tables into higher normal forms.

Q: What is a distributed database system?

Easy Answer: A distributed database system (DDBMS) is a collection of multiple, logically interrelated databases spread across physical locations and connected via a computer network. Key Points:

  • Appears to the user as a single centralized database due to distributed transparency.
  • Data is either replicated (copied across multiple sites for reliability) or fragmented (split into subsets stored at different sites).
  • Provides high availability, fault tolerance, and localized performance, though it introduces complexity in transaction management and data synchronization.

Q: Explain the role of indexes in improving database query performance.

Easy Answer: An index is a specialized database data structure (such as a B-tree or Hash index) created on a table column to speed up data retrieval operations. Role in Performance:

  • Faster Lookups: Without an index, the database must perform a slow full-table scan (checking every row). An index allows the database to locate rows instantly using a sorted search structure.
  • Efficient Sorting: Indexes maintain sorted order, accelerating queries with ORDER BY and GROUP BY clauses.
  • Trade-off: While indexes drastically speed up SELECT queries, they slow down INSERT, UPDATE, and DELETE operations because the index must be updated whenever data changes.

Part 3: Detailed Exam Long Questions (20-Marks Standard)

Long Question: Discuss the evolution of database systems from hierarchical and network models to modern relational and NoSQL databases, highlighting their structural differences.

Welcome to the study of database evolution for AIOU Course 3435 (BS Computer Science). In the early days of computing, data storage was primitive, relying on flat files where data was scattered across independent files, leading to massive redundancy and update anomalies. To solve this, database management systems (DBMS) emerged. Over the past five decades, database architectures have undergone a radical transformation. This answer explores the historical journey from early legacy models—hierarchical and network databases—to the structured relational model, and finally to modern NoSQL databases designed for the big data era.

1. The Primitive Era: Flat Files and Early Challenges

Before true databases, organizations used flat-file systems. Each department stored its own data in text files. This caused severe data redundancy (storing the same customer address in billing, shipping, and marketing files), data inconsistency, and application-program dependence. If a file's format changed, every program reading that file had to be rewritten. This bottleneck forced computer scientists to invent structured database models.

2. The Hierarchical Model: Tree-Like Structures

Introduced in the late 1960s (most famously IBM’s Information Management System or IMS), the hierarchical model organized data in a strict tree-like structure. Data was represented as nodes and branches.

  • Parent-Child Relationship: Each child node could have only one parent node (1-to-N relationship).
  • Top-Down Navigation: Searching for data required starting at the root node and traversing down branch by branch.
  • Example: A university database where "University" is the root, its children are "Faculties", whose children are "Departments", and finally "Courses".
However, its major limitation was its inability to handle many-to-many relationships naturally. If a student took courses from multiple departments, duplicating data or complex workarounds were required.

3. The Network Model: CODASYL and Graph-Like Flexibility

To overcome the strict limitations of the hierarchical model, the Conference on Data Systems Languages (CODASYL) developed the network model in the early 1970s.

  • Graph Structure: Unlike trees, a child node in a network model could have multiple parent nodes (called "owners" and "members").
  • Complex Relationships: This easily modeled many-to-many relationships (e.g., multiple students enrolled in multiple courses).
  • Pointers and Links: The database used physical memory pointers to connect records directly.
Despite its flexibility, the network model was extremely complex. Programmers had to understand the intricate physical layout of pointers, making database maintenance and ad-hoc querying exceptionally difficult.

4. The Relational Model: Edgar F. Codd’s Mathematical Revolution

In 1970, Dr. E.F. Codd published his landmark paper proposing the relational model, which shifted database design from physical pointer navigation to mathematical set theory and predicate logic.

  • Tables and Relations: Data is organized into two-dimensional tables (relations) consisting of rows (tuples) and columns (attributes).
  • Declarative Querying: Instead of telling the computer *how* to fetch data using pointers, users specified *what* data they wanted using declarative languages like SQL (Structured Query Language).
  • Data Independence: Physical storage changes did not affect the logical structure of data.
This model became the undisputed industry standard for decades, powering systems like Oracle, MySQL, Microsoft SQL Server, and PostgreSQL.

5. Structural Differences: Navigational vs. Declarative

The core structural difference between early models and relational databases lies in data navigation.

  • Hierarchical/Network: Navigational models require procedural logic. The application must explicitly traverse physical links and pointers to find records.
  • Relational: Relational models use set-at-a-time processing. The DBMS query optimizer automatically determines the fastest path to retrieve rows based on table definitions and indexes.
Everyday Analogy: Navigational databases are like walking through a specific maze with fixed hallways to reach a room; relational databases are like asking a receptionist for a folder, and they fetch it instantly regardless of where it is filed.

6. The Limitations of Relational Databases in the Big Data Era

While relational databases are robust for transactional systems (OLTP) requiring ACID compliance, they faced severe scaling challenges in the 21st century with the explosion of "Big Data" (social media feeds, sensor logs, unstructured text).

  • Rigid Schemas: Every table requires a predefined schema. Adding a new attribute means altering the entire table.
  • Vertical Scaling: Relational databases traditionally scale "vertically"—meaning you must buy bigger, more expensive servers when data grows.
  • Join Overhead: Complex queries across multiple large tables using SQL JOINs become slow at petabyte scales.

7. The Rise of NoSQL Databases: Flexibility and Horizontal Scaling

To address big data challenges, NoSQL ("Not Only SQL") databases emerged. They discarded strict tabular schemas to prioritize high scalability, high availability, and flexible data storage.

  • Horizontal Scaling (Sharding): NoSQL databases are designed to scale "horizontally"—spreading data across hundreds of cheap commodity servers in a cluster.
  • Schema-less Design: Data can be added dynamically without altering existing structures.
Example: MongoDB or CouchDB allows storing user profiles where one user has a phone number and another has multiple social media handles, all within the same collection.

8. Categorization of NoSQL Databases

NoSQL is not a single technology but a family of four primary structural models:

  • Document Stores: Store data as JSON or BSON documents (e.g., MongoDB, CouchDB). Ideal for content management systems.
  • Key-Value Stores: Simple hash tables of keys and values (e.g., Redis, Amazon DynamoDB). Extremely fast for caching and session management.
  • Column-Family Stores: Store data in column families rather than rows, optimized for massive write-heavy analytics (e.g., Apache Cassandra, HBase).
  • Graph Databases: Focus on relationships using nodes and edges (e.g., Neo4j). Perfect for social networks and fraud detection.

9. Summary and Exam Conclusion

In conclusion, the evolution of database systems reflects humanity’s growing need to manage data efficiently. Hierarchical and network models solved early file redundancy but failed due to rigid physical pointers and navigational complexity. Codd’s relational model revolutionized computing through mathematical tabular structures and SQL, dominating enterprise applications. Finally, modern NoSQL databases broke the relational mold to conquer horizontal scalability and unstructured big data challenges. Understanding this progression is crucial for computer scientists to select the right database architecture for specific software engineering problems.

Long Question: Explain the complete database design life cycle, starting from requirements gathering to conceptual, logical, and physical design phases using an ER modeling case study.

Designing a robust database requires a systematic engineering approach to prevent performance bottlenecks, data anomalies, and costly redesigns later. The Database Design Life Cycle (DDLC) is a structured methodology that guides developers from abstract user needs to high-performance physical storage. In this answer, we will explore the complete DDLC lifecycle using a real-world University Management System case study.

1. Case Study Introduction: University Management System

To make our explanation practical, let us consider designing a database for a university. The university needs to manage Students, Courses, Instructors, and Enrollments. Students take multiple courses, instructors teach multiple courses, and courses are offered in specific semesters.

2. Phase 1: Requirements Gathering and Analysis

The DDLC begins with understanding what the system must accomplish. Database architects interview stakeholders (students, professors, administrators) and analyze existing forms and reports.

  • Functional Requirements: What actions must the system perform? (e.g., Register a student, assign a grade, schedule a course).
  • Data Requirements: What information must be stored? (e.g., Student name, email, course title, instructor ID).
  • Non-Functional Requirements: Performance expectations, security levels, and concurrent user loads.
Output: A comprehensive Requirements Specification Document.

3. Phase 2: Conceptual Database Design (ER Modeling)

In this phase, we translate the requirements into a high-level conceptual model, independent of any specific DBMS software (like MySQL or Oracle). Entity-Relationship (ER) modeling is the primary tool here.

  • Entities: Real-world objects with independent existence. In our case study: `Student`, `Course`, `Instructor`.
  • Attributes: Properties describing entities. For `Student`: `StudentID` (Primary Key), `Name`, `DateOfBirth`.
  • Relationships: Associations between entities. Example: A `Student` "enrolls in" a `Course`.
Output: An ER Diagram (ERD) visually mapping entities, attributes, and relationships.

4. Defining Cardinality and Participation Constraints

During conceptual design, we define how many instances of one entity can relate to instances of another entity (Cardinality):

  • One-to-One (1:1): E.g., One `Student` has one `ID Card`.
  • One-to-Many (1:N): E.g., One `Instructor` teaches many `Courses`, but a course is taught by one primary instructor.
  • Many-to-Many (M:N): E.g., Many `Students` enroll in many `Courses`.
Participation constraints dictate whether an entity's existence depends on a relationship (Total vs. Partial participation).

5. Phase 3: Logical Database Design (Mapping ER to Relational Schema)

The logical design phase takes the conceptual ER diagram and maps it into a specific data model—in our case, the relational model (tables, rows, and columns). DBMS software is now chosen, but hardware details are ignored.

  • Entity Tables: Each regular entity becomes a table. `Student(StudentID, Name, DOB)`.
  • Resolving M:N Relationships: A many-to-many relationship cannot exist directly in relational tables. We create a junction (associative) table. For `Student` and `Course`, we create `Enrollment(EnrollmentID, StudentID, CourseID, Grade)`.
  • Foreign Keys: `StudentID` in `Enrollment` becomes a Foreign Key referencing `Student(StudentID)`.

6. Phase 4: Schema Refinement and Normalization

Once the logical tables are drafted, we apply normalization rules (1NF, 2NF, 3NF) to eliminate data redundancy and anomalies. For example, ensuring that student department details are not needlessly duplicated inside the course table. Normalization guarantees database integrity.

7. Phase 5: Physical Database Design

Physical design adapts the logical schema to a specific DBMS platform (e.g., PostgreSQL) and hardware infrastructure. It focuses on performance, storage optimization, and indexing.

  • Data Types: Selecting optimal storage sizes (e.g., `VARCHAR(50)` for names, `INT` for IDs).
  • Indexing: Creating B-Tree or Hash indexes on frequently searched columns like `Student(Email)` to speed up query execution.
  • Partitioning and Clustering: Splitting massive tables across physical drives to improve input/output (I/O) performance.

8. Phase 6: Implementation, Testing, and Maintenance

The final phase brings the database to life.

  • Implementation: Writing DDL (Data Definition Language) SQL scripts (`CREATE TABLE`, `CREATE INDEX`) to build the database.
  • Testing: Verifying security permissions, backup routines, and query speeds under load.
  • Maintenance: Monitoring performance, tuning slow queries, and applying patches over time.

9. Summary and Exam Conclusion

In summary, the Database Design Life Cycle is a disciplined roadmap for building efficient database systems. Starting from raw stakeholder requirements, it progresses through abstract ER modeling in the conceptual phase, translates into structured relational tables in the logical phase, and optimizes for speed and hardware in the physical phase. Adhering to this lifecycle ensures scalable, secure, and error-free database deployments.

Long Question: What is database normalization? Explain anomaly problems in unnormalized relations and step-by-step normalize a relation up to Boyce-Codd Normal Form (BCNF).

In relational database design, data redundancy is a major enemy. Stored duplicate data wastes storage disk space and leads to severe data inconsistencies. Database normalization is a formal mathematical technique developed by Dr. E.F. Codd to organize attributes within relations (tables) to minimize redundancy and dependency anomalies. This answer explains normalization anomalies and provides a step-by-step normalization guide up to Boyce-Codd Normal Form (BCNF).

1. Understanding Normalization and Why It Matters

Normalization is the process of decomposing poorly structured, large relations into smaller, well-structured relations based on functional dependencies. By breaking tables apart correctly, we ensure that every table represents a single logical concept (e.g., separating students from course registrations), making database maintenance clean and efficient.

2. The Three Classical Database Anomalies

Unnormalized tables (often containing repeating groups or mixed concepts) suffer from three severe anomalies when data is modified:

  • Insertion Anomaly: Inability to add data without supplying unrelated data. E.g., You cannot add a new Course to the database unless at least one Student is enrolled in it.
  • Deletion Anomaly: Unintended loss of data when a record is deleted. E.g., If the only student in a course drops out, deleting their record erases all information about the course itself.
  • Update Anomaly: Data inconsistency caused by redundant data. E.g., If an instructor changes their office phone number, and their name appears in 50 rows, updating only 49 rows leaves the database in an inconsistent state.

3. Case Study Unnormalized Relation (UNF)

Let us consider an unnormalized relation: `Emp_Project (Emp_ID, Emp_Name, Dept_Name, Project_List)` where `Project_List` contains repeating groups of projects an employee works on.
To fix this, we begin step-by-step normalization.

4. First Normal Form (1NF): Eliminating Repeating Groups

Rule: A relation is in 1NF if all attributes contain atomic (indivisible) values, and there are no repeating groups or arrays within a single table cell.

  • Action: We expand the table so that every row contains only a single value for every attribute. Each project gets its own row.
  • Result: The primary key becomes a composite key (`Emp_ID` + `Project_ID`).

5. Second Normal Form (2NF): Removing Partial Dependencies

Rule: A relation is in 2NF if it is in 1NF AND every non-key attribute is fully functionally dependent on the *entire* primary key (no partial dependency).

  • Identify Issue: If our composite primary key is `(Emp_ID, Project_ID)`, but `Emp_Name` and `Dept_Name` depend *only* on `Emp_ID` (part of the key), we have a partial dependency.
  • Action: Decompose the table into two:
    1. `Employee (Emp_ID, Emp_Name, Dept_Name)`
    2. `Emp_Project_Assignment (Emp_ID, Project_ID, Hours_Worked)`

6. Third Normal Form (3NF): Eliminating Transitive Dependencies

Rule: A relation is in 3NF if it is in 2NF AND there are no transitive dependencies involving non-key attributes (i.e., non-key attributes should not depend on other non-key attributes).

  • Identify Issue: In our `Employee` table, suppose `Dept_Name` determines `Dept_Head_Office`. Here, `Emp_ID -> Dept_Name -> Dept_Head_Office`. This is a transitive dependency.
  • Action: Remove the dependent attributes into a separate table:
    1. `Employee (Emp_ID, Emp_Name, Dept_ID)`
    2. `Department (Dept_ID, Dept_Name, Dept_Head_Office)`

7. Boyce-Codd Normal Form (BCNF): The Stricter Form of 3NF

Even in 3NF, anomalies can occur if a relation has multiple candidate keys that overlap. BCNF is a stricter version of 3NF.

  • Rule: A relation is in BCNF if and only if, for every functional dependency $X \rightarrow Y$, $X$ must be a **super key**.
  • Every BCNF table is in 3NF, but not every 3NF table is in BCNF.

8. Step-by-Step BCNF Transformation Example

Consider a relation `Student_Advisor (StudentID, AdvisorID, Advisor_Percent)` where a student can have multiple advisors, but a specific advisor advises a student for a specific percentage of their thesis.

  • Candidate Keys: `(StudentID, AdvisorID)` is the primary key. Also, `(StudentID, Advisor_Percent)` could be a key if percentages are unique per student.
  • Functional Dependency Violation: Suppose we have a dependency `AdvisorID -> Advisor_Department`. Here, `AdvisorID` is *not* a super key, yet it determines `Advisor_Department`. This violates BCNF.
  • BCNF Resolution: We split the relation into:
    1. `Advisor (AdvisorID, Advisor_Department)`
    2. `Student_Advisor_Mapping (StudentID, AdvisorID, Advisor_Percent)`
Now, every determinant on the left side of our functional dependencies is a super key, achieving BCNF.

9. Summary and Exam Conclusion

In summary, database normalization is vital for maintaining data integrity and efficiency. Unnormalized relations cause insertion, deletion, and update anomalies that corrupt databases. By systematically applying normal forms—transforming 1NF (atomic values), 2NF (removing partial keys), 3NF (removing transitive dependencies), and finally BCNF (ensuring all determinants are super keys)—database engineers build clean, anomaly-free relational architectures.

Long Question: Explain concurrency control techniques in detail, focusing on locking protocols, timestamp ordering, and how they ensure ACID properties in multi-user environments.

In modern enterprise systems, multiple users and applications access and modify databases simultaneously. If database management systems (DBMS) allowed uncontrolled concurrent execution, severe data corruption could occur (such as lost updates, uncommitted dependency errors, and inconsistent analysis). Concurrency control is the mechanism used to ensure that simultaneous execution of transactions occurs without violating database integrity. This answer explores concurrency control protocols, focusing on locking, timestamps, and the ACID properties.

1. The Foundations: ACID Properties in DBMS

To guarantee reliable data processing, all transactions must adhere to ACID principles:

  • Atomicity ("All or Nothing"): Either all operations in a transaction complete successfully, or none are applied.
  • Consistency: A transaction must transition the database from one valid state to another, maintaining all integrity constraints.
  • Isolation: Transactions execute independently. The intermediate state of one transaction is invisible to other concurrent transactions.
  • Durability: Once a transaction commits, its changes are permanent, even in the event of a system crash.
Concurrency control protocols specifically safeguard the **Isolation** property.

2. Concurrency Anomalies (Why We Need Control)

Without protocols, concurrency hazards arise:

  • Lost Update: Transaction T1 and T2 read the same value, both modify it, and T2 overwrites T1's update, causing T1's work to be lost.
  • Dirty Read (Uncommitted Dependency): Transaction T1 updates a record, T2 reads this updated record before T1 commits, and T1 subsequently aborts/rolls back. T2 now holds invalid data.
  • Unrepeatable Read: T1 reads a value, T2 modifies or deletes that value and commits, and T1 reads the value again, getting a different result.

3. Lock-Based Protocols: Shared and Exclusive Locks

Locking is the most common method to regulate data access. A transaction must acquire a lock on a data item before reading or writing to it.

  • Shared Lock (S-lock): Used for reading data (Read-Only). Multiple transactions can hold S-locks on the same data item simultaneously.
  • Exclusive Lock (X-lock): Used for writing data (Read/Write). Only one transaction can hold an X-lock on a data item; all other requests for S or X locks are blocked.

4. Two-Phase Locking (2PL) Protocol

Simply acquiring and releasing locks randomly does not guarantee serializability. The Two-Phase Locking protocol solves this by dividing transaction execution into two distinct phases:

  • Growing Phase (First Phase): The transaction may acquire locks (S-locks or X-locks), but cannot release any locks.
  • Shrinking Phase (Second Phase): The transaction may release locks, but cannot acquire any new locks.
2PL guarantees serializability (meaning concurrent transactions execute with the same net effect as if executed serially one after another).

5. Variations of Two-Phase Locking

To optimize performance, variations of 2PL are used:

  • Strict 2PL: Requires all exclusive locks held by a transaction to be held until the transaction *commits* or *aborts*. This prevents dirty reads entirely.
  • Rigorous 2PL: Requires *all* locks (both shared and exclusive) to be held until the transaction commits or aborts. Most commercial DBMS use Rigorous 2PL.

6. Deadlocks and Livelocks in Locking Protocols

Locking introduces the risk of deadlocks:

  • Deadlock: Occurs when Transaction T1 holds a lock on Data A and waits for Data B, while Transaction T2 holds a lock on Data B and waits for Data A. Neither can proceed.
  • Resolution: DBMS uses Deadlock Detection (waiting for graphs / timeouts) or Deadlock Prevention (wait-die and wound-wait schemes).
  • Livelock: When a transaction is continuously denied locks because other transactions keep preempting it.

7. Timestamp-Based Protocols

Unlike locking, which makes transactions wait by blocking them, timestamp ordering protocols use system timestamps to serialize transactions proactively.

  • Timestamp Generation: Every transaction $T_i$ is assigned a unique timestamp $TS(T_i)$ when it starts (usually based on a system clock or logical counter). Older transactions have smaller timestamps.
  • Read Timestamp ($R-TS$): The maximum timestamp of any transaction that successfully read a data item $Q$.
  • Write Timestamp ($W-TS$): The maximum timestamp of any transaction that successfully wrote to data item $Q$.

8. Timestamp Ordering (TO) Algorithm Rules

When transaction $T_i$ attempts to issue a `Read(Q)` or `Write(Q)`, the protocol checks timestamps:

  • Read Rule: If $TS(T_i) < W-TS(Q)$, it means $T_i$ is trying to read a value that was already overwritten by a younger transaction. $T_i$ is rolled back and restarted. Otherwise, the read is allowed, and $R-TS(Q) = \max(R-TS(Q), TS(T_i))$.
  • Write Rule: If $TS(T_i) < R-TS(Q)$ (trying to write to data already read by a younger transaction) OR $TS(T_i) < W-TS(Q)$ (trying to overwrite data written by a younger transaction), $T_i$ is rolled back. Otherwise, the write proceeds and $W-TS(Q) = TS(T_i)$.
This ensures conflict serializability without requiring locks or causing deadlocks.

9. Summary and Exam Conclusion

In conclusion, concurrency control is essential for maintaining database integrity in multi-user environments, directly preserving ACID isolation properties. Lock-based protocols (like Strict and Rigorous 2PL) manage data access by blocking concurrent transactions, though they risk deadlocks. Conversely, timestamp ordering protocols use transaction timestamps to order execution and prevent deadlocks proactively. Mastering these concurrency mechanisms is a fundamental requirement for designing high-performance database management systems.

Part 4: Solved Multiple Choice Questions (MCQs)

MCQ #1 What does DBMS stand for in computer science?

Database Management System
Data Backup Management Software
Digital Business Mapping Service
Database Manipulation Security

MCQ #2 Which of the following is a primary key constraint property?

Allows duplicate values
Allows NULL values
Uniquely identifies each record
Can be changed frequently

MCQ #3 What does SQL stand for?

Structured Query Language
Simple Query Logic
System Quality Link
Standardized Question Language

MCQ #4 Which of the following is used to retrieve data from a relational database in SQL?

GET
EXTRACT
SELECT
FETCH

MCQ #5 In an Entity-Relationship (ER) diagram, what does a diamond shape represent?

Entity type
Attribute
Relationship
Primary key

MCQ #6 What is the main purpose of database normalization?

To increase data redundancy
To reduce data redundancy and anomalies
To slow down query execution
To encrypt user passwords

MCQ #7 Which normal form deals with the elimination of transitive dependencies?

First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Fourth Normal Form (4NF)

MCQ #8 What property in transaction management ensures that all operations in a transaction complete successfully or none at all?

Atomicity
Consistency
Isolation
Durability

MCQ #9 Which ACID property ensures that once a transaction is committed, its changes are permanent?

Atomicity
Consistency
Isolation
Durability

MCQ #10 What is a data warehouse primarily optimized for?

Online Transaction Processing (OLTP)
Online Analytical Processing (OLAP)
Real-time data entry
File sharing

MCQ #11 What term describes the phenomenon where two transactions wait for each other to release locks, causing a permanent halt?

Starvation
Deadlock
Rollback
Serialization

MCQ #12 In the relational model, what is a table also known as?

Tuple
Attribute
Relation
Domain

MCQ #13 Which of the following is a NoSQL database type?

Relational
Document-based
Hierarchical
Network

MCQ #14 What does an oval shape represent in an ER diagram?

Entity
Attribute
Relationship
Link

MCQ #15 Which SQL clause is used to filter records based on a specific condition?

GROUP BY
ORDER BY
HAVING
WHERE

Manage Cookie Preferences

Strictly Necessary Cookies

Required for consent storage and site security.

Always Active

View full details in our Cookies Policy & Privacy Policy.