Blog
Database Systems Past Paper 2024 – University of Sargodha (BS 4th Term)
University: University of Sargodha (UOS)
Program: BS 4th Term
Subject: Database Systems (CMPC-202)
Year: 2024
Time Allowed: 2 Hours 30 Minutes
Maximum Marks: 40
Why Use This Database Systems Past Paper?
This paper helps students understand real exam patterns and frequently asked topics in Database Systems.
- Practice SQL queries
- Understand normalization & ERD
- Revise database terminology
- Prepare structured answers
Database Systems Past Paper 2024 (Complete)
Below is the complete text of the paper:
University of Sargodha
BS 4th Term Examination 2024
Subject: Computer Science
Paper: Database Systems (CMPC-202)
Time Allowed: 02:30 Hours
Maximum Marks: 40
Note: Objective part is compulsory. Attempt any three questions from subjective part.Objective Part (Compulsory)
Q.1 Write short answers of the following in 2-3 lines each. (2×8)
- What is Data Warehouse?
- What is database management system?
- What is data independence?
- What is composite identifier?
- What is degree of relationship?
- Write down the limitations of hierarchical and network model?
- Explain the Multivalued Attribute.
- What is data dictionary?
Subjective Part (Attempt any Three)
Q.2 Explain the functions of each of the following SQL keywords using sample SQL queries. COUNT, GROUP BY, HAVING, INNER JOIN, IN, LIKE
Q.3 Explain Degree and Cardinality of Relationships with example.
Q.4 Convert the given table into 3rd Normal Form.
Q.5 Draw ER-Diagram for the given scenario (employees, organizations, jobs, budget, employment dates etc.).
Q.6 Write SQL commands for given relational queries.
Download
Download Database Systems Past Paper (PDF)
Related Past Papers
More papers coming soon – stay connected.
Short Question Solutions
1. What is Data Warehouse?
A data warehouse is a centralized repository used to store large volumes of historical data for reporting and analysis.2. What is database management system?
A DBMS is software that allows users to create, store, retrieve, update, and manage databases efficiently.3. What is data independence?
Data independence is the ability to change a database schema without affecting application programs.4. What is composite identifier?
A composite identifier (composite key) is a primary key made up of two or more attributes.5. What is degree of relationship?
The degree of relationship represents the number of entity types involved in a relationship (Unary, Binary, Ternary, etc.).6. Write down the limitations of hierarchical and network model?
They are complex, difficult to modify, lack flexibility, and require rigid data relationships.7. Explain the Multivalued Attribute.
A multivalued attribute can store more than one value for a single entity (e.g., student phone numbers).8. What is data dictionary?
A data dictionary stores metadata — definitions and descriptions of database tables, fields, indexes, constraints, etc.References:
DBMS Concepts — GeeksforGeeks
Oracle Database Docs
Subjective questions – answer guide (Database Systems 2024)
Q.2 COUNT, GROUP BY, HAVING, INNER JOIN, IN, LIKE
- COUNT – counts rows:
SELECT COUNT(*) FROM student; - GROUP BY – groups rows to apply aggregates per group:
SELECT dept_id, COUNT(*) FROM student GROUP BY dept_id; - HAVING – filters groups after grouping (WHERE filters rows before):
SELECT dept_id, COUNT(*) FROM student GROUP BY dept_id HAVING COUNT(*) > 50; - INNER JOIN – returns rows with matching values in both tables:
SELECT s.name, d.name FROM student s INNER JOIN dept d ON s.dept_id = d.id; - IN – matches any value in a list or sub-query:
SELECT * FROM student WHERE city IN ('Sargodha', 'Lahore'); - LIKE – pattern matching with % (any characters) and _ (one character):
SELECT * FROM student WHERE name LIKE 'A%';
Q.3 Degree and cardinality of relationships
Degree is the number of entity types in a relationship: unary (Employee manages Employee), binary (Student enrolls in Course) and ternary (Supplier supplies Part to Project). Cardinality is how many instances can be related: one-to-one (Person–Passport), one-to-many (Department–Employees) and many-to-many (Students–Courses). Minimum cardinality shows whether participation is optional (0) or mandatory (1).
Q.4 Converting a table to 3NF – method
- 1NF: remove repeating groups so every cell holds one value; choose a primary key.
- 2NF: remove partial dependencies – attributes that depend on only part of a composite key go to a new table.
- 3NF: remove transitive dependencies – non-key attributes that depend on another non-key attribute go to their own table.
Always show the dependencies (A → B) you found at each step; most marks are for that reasoning.
Q.5 ER diagram – method
Identify entities (Employee, Organization, Job), their key attributes (emp_id, org_id, job_id) and other attributes (budget, start/end dates). Draw relationships (an Employee works for an Organization, holds a Job), mark cardinalities, and put attributes such as employment start/end date on the relationship (or an associative entity) when they describe the employment rather than the employee.
Q.6 SQL for relational queries
Translate each requirement step by step: decide the tables (FROM/JOIN), the condition (WHERE), any grouping (GROUP BY/HAVING) and the columns (SELECT). Use the patterns from Q.2 above.
Answers prepared by Shining Study for revision. Check them against your class notes and teacher’s guidance.
