Professional Documents
Culture Documents
Consider the relation R(A,B,C,D) with legal instance of R as shown below. Each statement below
can be categorized either true or false or not enough information to be sure. Circle one of those
categories for each statement and justify your answers briefly
1. YZ is a key for R
TRUE FALSE NOT ENOUGH INFO
2. YZ is a key for R
TRUE FALSE NOT ENOUGH INFO
OR
(b)
W X Y Z
12 12 2 4 Differentiate between 3NF
12 12 12 2 and BCNF (2.5+2.5)
4 12 2 2
2 4 2 3 Q.3 Do either part a or b of
4 4 4 8 this question
(a) Differentiate between entity type, relationship type. Explain with examples (3.5+1.5)
OR
OR
(b) Draw the possible schemas (table, attributes, keys) for given CASE STUDY
CASE STUDY: PUCIT operates a fleet of 40 buses that serve approximately 1000 students in
masters of electronics commerce .The bus operation involves 30 regular routes, plus special routes
for activities, athletic events, and summer sessions. The PUCIT employs 12 full time drivers and 25
to 30 part time drivers. A dispatcher coordinates the staffing and routes and relays messages to
driver regarding and parents who call drop off arrangements each payment is required to be
generated to one customer
(a) Write advantages of relational model over hierarchical model and network model(5)
Why we use joins and how many types of joins exist in SQL?
Scheduling
Or
b) Write down the short note on deadlock with respect to operating system
Or
2. Sender (2.5)
Or
(a) WAN
(a) Briefly explain the function of the following layers of OSI model
(b) Write a short note on the following and draw the diagram also
a. Explain with the help of examples, what are primary key and foreign key?
b. Explain with the help of examples, what are Simple Attribute and Composite Attribute?
a. Write SQL Statements the update the following table STUDENT with new records.
STUDENTS
Student – ID Student – name Class DOB
01 M. ARSLAN MECOM 12-Apr-82
02 JAVARIA AKRAMI MIT 18-Sep-81
03 FALAK SHER BIT 15-Mar-83
04 FATIMA MECOM 10-Oct-82
b. Write a SQL Statement, which will display the all students who born in year 1981, from the
table STUDENT assuming that STUDENT contains records about1500 students.
**************
PAPER 2006 OPERATING SYSTEM
Q.8 Do either part (a) of part (b) of this question
a. Draw a diagram showing the five common process states and the transitions among them. Be sure
to label all states and transitions.
a. Write down the necessity of file management system and explain reason of disk fermentation
b. What do mean by cache memory and how it’s different from RAM?
a. Write down the difference between hierarchical and relational data model with the help of an
example.
a. You are trying to install a network card into a computer with the following hardware: COM1,
COM2, LPT1, PS/2 mouse, and an IDE hard drive controller. The NIC supports IRQ(s) 3, 4, 5, 7
and 10. Which IRQ(s) could you use?
b. What is the difference between HUB and SWITCH? Describe with examples.
a. Write at least five advantages of database approach over conventional file based approach.
Case Study.
A large bank operates several divisions. Information Technology (IT) is operated as one of
these divisions. Within the IT division are many department that are managed by one manager, and all IT
employees belongs to one of these department. The IT division assigns it’s employees to one or more
ongoing projects in the bank. A project may be planned, but not have any employees assigned to it for
several months. Each project will have a single employee assigned who acts as a project leader.
ITEM
a. Write SQL Statement, which create the give table ITEM and also insert the given four records
into the created table.
b. Consider the table ITEM, given above, suppose there are1500 records.
b 1. Write a SQL statement which retrieves labels of those books, which are in old condition. (3)
b 2. Write a SQL statement which retrieves sum of prices of all new items. (2)
b. Following tables show a set of processes with arrival time and CPU bursts
calculate (a) Waiting time for each process (b) Average Response Time (c)
P1 0 7
P2 2 5
P3 4 2
P4 6 3
P5 9 6
Q.9 Do either part (a) or part (b) of this question (5 marks)
a 1. Monitors (2)
request if page is in memory. If the page is not in memory, the request take 5 ms.
b. What is magnetic disk? Explain how data are stored and organized on magnetic
disk.
a) Write down the different states of a process and briefly explain each one.
b) Write a note on priority Scheduling.
OR
A company has several departments. Each department has supervisor and at least one employ.
Employees must be assigned to at least one, but possible more departments. At least one employee is
assigned to a project, but an employee may be on vacation and not assigned to any projects. The
important data field are the names of the departments, project .supervisor and employees, as well as
the supervisor and employee number and a unique project number.
OR
b) Differentiate between the following
a) Normalize the following relation upto 3rd normal form (show each step clearly)
OR
b) Write a detailed note on different types of data dependencies, also give examples. Form
Q.5 Do either part a or b of this question (5marks)
a) Discuss in detail the reliability and security with respect to relation database system
OR
b) Discuss in detail the Client server architecture in Database system.
Q.6 Do either part a or b of this question (5marks)
a) Consider the following table named employee.
Employee ID Employee name Job title
50 Ali Manager
51 Fatima Analyst
52 Ahmad Salesperson
a) Write SQL
53 Maria Manager
statements that
create the
above table Employee and insert these four records into it.
b) Write SQL statement that retrieve the list of all the managers in this table.
Q.3. a) Define entity, attribute and relationship with examples. (Marks: 4.5)
b) Discuss different type of database anomalies with examples. (Marks:4)
c) Define Functional Dependency and its types with examples. (Marks:4)
b) Normalize the following HBL “Branch _ Staff” Relation up to 3rd Narowal from but step
by step show each intermediate resultant table with its data. (Marks:8)
Branch _ Staff
A database is to be designed for a Car Rental Co. (CRC). The information required includes a description
of cars, subcontractor (i.e, garages), company expenditures, company revenues and customers. Cars are to
be described by such data as: make, model, year of production, engine size, fuel type, number of
passenger, registration number, purchase number, purchase price, purchase date, rent price and insurance
details. It is the company policy not to keep any car for period exceeding one year. All major repairs and
maintenance are done by subcontractors (i.e, franchised garages), with whom CRC has long term
agreements. Therefore the data about garages to be kept in the database include garages names, addresses,
range of services and the like. Some garages require payments immediately after a repair has been made;
with others CRC has made arrangements for credit facilties. Company expenditures are to be registered
for all outgoings connected wih purchases, repairs maintenance, insurance etc. Similarly the cash inflow
coming from all sources-car hire, car sales, insurance claims-must be kept of file. CRC maintains a
responsibly stable client base. For this privileged category for customers special credit card facilities are
provided. These customers may also book in advance a particular car. These reservations can be made for
any period of time up to one month. Casual customers must pay deposit for an estimated time of rental,
unless they wish to pay by credit card. All major credit cards are accepted. Personal details (such a name,
address, telephone number, living license, number) about each customer are kept in the database.
b) Normalize the following “ Customer_Order” Relation up to 3rd normal from but step by step
each intermediate resultant table with its data. (Marks:9)
Cutomer Order
Q.4. a) Explain the difference between an entity class and entity instance with example.
(Marks.4.5)
i) Write a SQL SELECT statement on the following given Student and Result tables
which display
students name and marks who earns more than 65 marks in any course.
ii) Write a SQL SELECT statement on the following given Result Table which display
average marks
iii) Write a SQL SELECT statement on the following given Result Table which count
number of students
iv) Write a SQL INSERT statement on the following given Student table, which insert the
following
record
4 Inaam ul Haq MSc IT
Student Result
Std Std ID Crs ID
Std_Na Crs
ID Degree (PK) (PK) Marks
me _Name
(Pk) (FK) (FK)
Jawad 1 1 Math 80
1 BS_CS
iqbal
2 2 Physics 85
Shahzad
2 BS_IT 3 3 Biology 50
Hassan
Tariq 3 1 Math 40
3 BS_SE
Nazeer
PAPER 2012 OPERATING
SYSTEM
Q.6. a) Differentiate Kernal mode and User mode of a system excutation and also disscss three ways to enter in
A General Hospital consists of a number of specialized wards (such as Maternity, Pediratic Oncology,
etc). Each wards hosts a number of patients, who were admitted on the recommendation of their own
physician and confirmed by a consultant employed by the Hospital. On admision, the personal details of
every patient are recorded. A seprate rigester is to be held to store the information of the tests undertaken
as tha results of a prescribed treatment. A number of test may be conducted for each patient. Each patient
is assigned to one leading consultant but may be examined by another doctor, if required. Doctor are
specialists in some branch of medicine and may be leading consultants for a number of patients, not
necessarily from the same ward.
College_Result
i) Write a SQL SELECT statement on the following given Student and Result tables
,which display students name and marks earns more than 65 marks in any coursre.
ii) Write a SQL SELECT statement on the following given Faculty table, which display
fact-name and specialization of programming only.
iii) Write a SQL SELECT statement on the following given Result table, which count
number of stiudent who earns more than 75 marks.
iv) Write a SQL INSERT statement on the following given Course tables, which insert the
following record.
4 Database System 4
Student Faculty
Std Fact
Fact
ID Std_Name Degree ID Specialization
Name
(Pk) (Pk)
Absar Ejaz
Course 1 BS_CS 1 SE
Mushtaq Ashraf
Crs Crs_Name Cr_hrs Umair
2 Rabbiya BS_IT 2 Programming
Najeeb Baber
3 BS_SE Hasan
Aslam 3 Programming
khan
Result
Crs
Std ID Fct ID
ID Marks
(Fk) (Fk)
(Fk)
1 1 1 80
2 2 2 85
3 3 3 50
ID
(Pk)
1 SE 3
2 DSA 4
3 IAP 4
Q.7. a) Differentiate First-in First-out (FIFO) and least Recently used (LRU) page replacement alogaritms. (Marks:6.5)
Q.8. Disscus briefly functions of Transport and Session Layer of OSI Model. (Marks: 6+6.5=12.5)
Q3. a) Write a SQL statement, which create the following EMP table with mentioned datatype and
constraints.
EMP
Empno Ename Salary Dept No.
(data type: Number) (data type:CHAR) (data type: (data type: Number)
Primary Key Number) Foreign Key
Relationship with Dept
Table
b) Write a SQL statement on EMP table which displays the following table : containing first column
deptno, second column sum of salaries of the employees of each department whose name start with ‘A’
and third column total salary of all the employees of that department.
b) Normalize the following “Project Management” Relation up to 3rd Normal form but step by step, show
each intermediate resultant table with its data.
(P.T.O)
Project Management
P-Code P-Title P-Manager P-Budget Emp-No. Emp-Name Dept Dept- Hours
-ID Name
PC010 Pensions Ahmad 24500 S10001 Tariq 1 IT 22.00
PC010 Pensions Ahmad 24500 S10030 Khyzer 2 Accounts 18.50
PC010 Pensions Ahmad 24500 S21010 Baqar 3 Sale 21.00
PC045 Salaries Khayyam 17400 S21010 Baqar 3 Sale 21.75
PC045 Salaries Khayyam 17400 S10001 Tariq 1 IT 18.00
PC045 Salaries Khayyam 17400 S13210 Naveed 2 Accounts 17.00
PC064 HR IQRA 12250 S31002 Umair 1 IT 23.25
PC064 HR IQRA 12250 S21010 Baqar 3 Sale 17.50
PC064 HR IQRA 12250 S10030 Khyzer 2 Accounts 16.50
Q8. a) What is network Topology and discuss different types of topologies with figures.
b) What is transmission mode and discuss three different types of transmission mode with examples.
Paper 2015 DBMS
Q#2
(b) Define primary key, Foreign key and also discuss briefly role of keys in database integrity.
Q#3 Identify entities with attributes, Relationships and Draw an entity relationship diagram (ERD)
for the car rental co. (CRC). Use the following requirements and take your own assumption (if
needed)
The information required includes a description of cars, subcontractors (i.e garages), company
expenditures, company reveneus and customers. Cars are to be descibed By such data as:make , model ,
year of productions, engine size, fuel type, number of pessengers, registration number, purchase price,
purchase date, rent price and insurance details. it is the company policy not to keep any car for a period
exceeding one year. All major repairs and maintenance are done by subcontractors (i.d. faranchise
garages), with whom CRC has long term agreements. Therefore the data about garages to be kept in the
database include garage names , address, range or servicrs and the like. Some garages require payment
immidiately after a repair has been made: with other CRC has made agreement for credit facilities.
Company expenditure are to be registered for all outgoings coonected with purchases, repair,
maintainance, insurance etc. Similarly the cash inflow coming from all sources - car hire, car sale,
insurance claim, must be kept of file. CRC maintain a resonably stable client base. For this privileged
category of customers special credit card facilities are provided. These customers may Casual customer
must pay a deposit for an estimated time of rental, unless they wish to pray by credit card . All major
credit cards care accepted. Personal detail (such as name, address, telephone number, driving licence,
number) about each customer are kept in the database.
Q#4:
(b) Normalize the following"Patient Visit" relation up to 3rd normal form step by step show each
intermidiate resultant table with its data.
(Patient Visit)
Note: Doc-ID: Doctor id Doc-Name: Doctor Name Pat-ID: Patient Id Pat-Name:
Patient name Pat_Address: Patient address
Q# 8 Discuss briefly function of physical layer and Data link layer of OSI model,