Halaman

DIT Part-II Database Systems Solved Paper 2026 - SQL DBMS MySQL [Part A,B,C]

DIT Part-II Database Systems Solved Paper 2026 - SQL DBMS MySQL [Part A,B,C]

Khyber Pakhtunkhwa Board - DIT Part-II - Database Systems - 2nd Term 2026 (Fully Solved). Time Allowed: 02 Hrs & 40 Minutes | Marks: 60. Complete solved paper for exam preparation.

DIT, DIT Part-II, Database Systems, DBMS, SQL, MySQL, ERD, Normalization, DIT Solved Paper 2026
Q.1 a) Choose / Encircle the correct answer
i. Information is the __ form of data.
a) Processed
ii. A database is an organized collection of __
c) Logically related data
iii. In hierarchical model, each child has __
c) One parent
iv. Which model supports many-to-many relationships __
b) Network
v. RDBMS stores data in __
c) Tables
vi. Which SQL category includes CREATE and DROP __
c) DDL - Data Definition Language
vii. Example of RDBMS __?
b) MySQL
viii. A primary key must be __
b) Unique and Not Null
ix. 1NF requires __
b) Atomic values
x. Which clause is used to filter records __
c) WHERE
Q.1 b) Fill in the blanks

i. Data is raw facts, while Information is processed data.
ii. DBMS stands for Database Management System.
iii. Hierarchical model organizes data in tree structure.
iv. A database is an organized collection of logically related data stored in a Computer System.
v. SQL command used to insert data is INSERT INTO.

Part-B - Attempt any 06 (5 Marks Each)
Q2 i What is Database?

A Database is an organized collection of logically related data that is stored electronically in a computer system. It is designed to store, manage, and retrieve data easily. Example: Student database, Employee database. It is managed by DBMS.

Q2 ii Define Primary Key.

A Primary Key is a field or combination of fields that uniquely identifies each record in a table. Properties: Must be Unique, Must be Not Null, Only one primary key per table. Example: Student_ID in Student table.

Q2 iii What is normalization?

Normalization is the process of organizing data in a database to remove data redundancy and improve data integrity. It divides large tables into smaller tables and defines relationships between them. Its main types are 1NF, 2NF, 3NF, BCNF.

Q2 iv Define ERD.

ERD stands for Entity Relationship Diagram. It is a graphical representation of the database structure that shows Entities, Attributes, and Relationships between entities. It uses symbols: Rectangle for Entity, Oval for Attribute, Diamond for Relationship.

Q2 v Three advantages of MySQL.

Open Source & Free, High Performance and reliable, Easy to Use with PHP/Java, Provides strong data security, Runs on all major OS like Windows, Linux.

Q2 vi What is WHERE clause?

WHERE clause is used in SQL to filter records. It extracts only those records that fulfill a specific condition. Syntax: SELECT * FROM Students WHERE Marks > 50;

Q2 vii What is Second Normal Form (2NF)?

A table is in 2NF if: It is already in 1NF (all values are atomic) and it has no Partial Dependency - meaning all non-key attributes must fully depend on the whole primary key, not part of it. It is mainly important for tables with composite primary keys.

Q2 viii What is an entity and attributes?

Entity: An entity is a real-world object about which we store data. Example: Student, Teacher, Book. Represented by a rectangle in ERD. Attribute: A property of an entity. Example: For Student entity, attributes are Name, Roll_No, Class. Represented by an oval in ERD.

Part-C - Attempt any 03 (10 Marks Each)
Q3 Explain different database models.

1. Hierarchical Model: Organizes data in a tree structure. One parent can have many children, but each child has only one parent. Advantages: Simple, Fast. Disadvantages: Does not support many-to-many, complex to manage. 2. Network Model: Child can have many parents. Uses pointers to link records. Advantages: Supports many-to-many, flexible. Disadvantages: Very complex. 3. Relational Model (RDBMS): Data is stored in tables with rows and columns. Tables are related through keys. Advantages: Simple, flexible, supports SQL, widely used. Disadvantages: Can be slow for large data. 4. Object-Oriented Model: Data stored as objects like in OOP. Good for complex data like images, video but complex and not widely used.

Q4 Functions of DBMS.

a) Data Dictionary Management: DBMS maintains a Data Dictionary which stores metadata about database structure, tables, fields, relationships. b) Data Storage Management: DBMS creates and manages storage of data on disk efficiently. c) Data Integrity Management: DBMS ensures data is accurate and consistent. It enforces integrity rules like Primary Key, Foreign Key, Unique, Not Null.

Q5 DDL, DML and DCL.

1. DDL - Data Definition Language: Used to define and change structure. Commands: CREATE, ALTER, DROP, TRUNCATE. 2. DML - Data Manipulation Language: Used to manipulate data inside tables. Commands: SELECT, INSERT, UPDATE, DELETE. 3. DCL - Data Control Language: Used to control access. Commands: GRANT, REVOKE. Also TCL: COMMIT, ROLLBACK, SAVEPOINT.

Q6 Purpose of SQL Functions.

a) COUNT(): Returns total number of rows. SELECT COUNT(*) FROM Students; b) LENGTH(): Returns length of a string. LENGTH('Ali') = 3. c) RTRIM(): Removes blank spaces from right side. d) SUBSTR(): Extracts substring. SUBSTR('Pakistan', 1, 4) = 'Paki'. e) CONCAT(): Joins two or more strings. CONCAT('Good',' Morning') = 'Good Morning'.

Q7 INNER JOIN, LEFT JOIN, RIGHT JOIN and CROSS JOIN.

INNER JOIN: Returns only matching records from both tables. LEFT JOIN: Returns all records from left table and matching from right table. If no match, NULL. RIGHT JOIN: Opposite of LEFT JOIN. Returns all from right table. CROSS JOIN: Returns cartesian product - every row of first combined with every row of second. If A has 3 rows and B has 4, result = 12 rows.

Related Post

No comments