paper 2005 dbms - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...dbms.pdf ·...

21
Paper 2005 DBMS Q,2 Do either part a or b of this question (5 marks) 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. The functional dependency WX holds for R TRUE FALSE NOT ENOUGH INFO 1. YZ is a key for R TRUE FALSE NOT ENOUGH INFO 2. YZ is a key for R TRUE FALSE NOT ENOUGH INFO 3. The functional dependency wz holds for R TRUE FALSE NOT ENOUGH INFO 4. The functional dependency WXY holds for R TRUE FALSE NOT ENOUGH INFO OR (b) Differentiate between 3NF and BCNF (2.5+2.5) Q.3 Do either part a or b of this question (a) Differentiate between entity type, relationship type. Explain with examples (3.5+1.5) OR (b) Differentiate between degree , cardinality (2.5+2.5) Q.4 Do either part a or b of this question (5marks) (a)What does REFRENTIAL INTEGRITY mean?(2.5) What is mean by database constraints?(2.5) W X Y Z 12 12 2 4 12 12 12 2 4 12 2 2 2 4 2 3 4 4 4 8

Upload: others

Post on 24-Jan-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

Paper 2005 DBMS

Q,2 Do either part a or b of this question (5 marks)

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. The functional dependency W—X holds for R

TRUE FALSE NOT ENOUGH INFO

1. YZ is a key for R

TRUE FALSE NOT ENOUGH INFO

2. YZ is a key for R

TRUE FALSE NOT ENOUGH INFO

3. The functional dependency w—z holds for R

TRUE FALSE NOT ENOUGH INFO

4. The functional dependency WX—Y holds for R

TRUE FALSE NOT ENOUGH INFO

OR

(b)

Differentiate between 3NF

and BCNF (2.5+2.5)

Q.3 Do either part a or b of

this question

(a) Differentiate between entity type, relationship type. Explain with examples (3.5+1.5)

OR

(b) Differentiate between degree , cardinality (2.5+2.5)

Q.4 Do either part a or b of this question (5marks)

(a)What does REFRENTIAL INTEGRITY mean?(2.5)

What is mean by database constraints?(2.5)

W X Y Z

12 12 2 4

12 12 12 2

4 12 2 2

2 4 2 3

4 4 4 8

Page 2: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

OR

(b) Write note on internal, conceptual and external schemas?

Q.5 Do either part a or b of this question (5marks)

(a) Draw an ERD for the given CASE STUDY

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

Q.6 Do either part a or b of this question

(a) Write advantages of relational model over hierarchical model and network model(5)

(b)Write note on Sub queries?

Why we use joins and how many types of joins exist in SQL?

PAPER 2005 OPERATING SYSTEM

Q.8 Do either part a or b of this question (5marks)

a) Write down the short note

Scheduling

Or

b) Write down the short note on deadlock with respect to operating system

Q.9 Do either part a or b of this question (5marks)

a) Explain the following terms:

1. Transmission medium (4)

2. Multi –point line configuration (with diagram) (1)

Or

b) Briefly explain the following components of the data communication system:

Page 3: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

1. Message (2.5)

2. Sender (2.5)

Q.10 Do either part a or b of this question (5marks)

a) Which is more efficient, circuit switching or visual switching? Why?

Or

b) Write a short note on segmentation with respect to operating systems?

Q.11 Do either part a or b of this question (5marks)

a) Write down the advantages and disadvantages of

(a) WAN

(b) Differentiate between Star topology and Bus topology

Q.12 Do either part a or b of this question (5marks)

(a) Briefly explain the function of the following layers of OSI model

(a1) Transport layer

(b) Write a short note on the following and draw the diagram also

(b1) Coaxial cable

Paper 2006 DBMS

Q.2 Do either part (a) of (b) of this question.

a. Differentiate between Data Dependence and Structural Dependence?

b. Differentiate between File System and Database System?

Q.3 Do either part (a) of part (b) of this question

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?

Q.4 Do either part (a) of part (b) of this question

a. Discuss Relational Database model, with examples.

b. List out some DBMS functions with little description.

Q.5 Do either part (a) of part (b) of this question

Page 4: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

a. Draw an E-R Model according to following Case study with assumptions. You may make your own

assumptions if needed. After identifying Entities, some attributes are given, other you can assume

according to your assumptions.

I. A company “Ahsan Corporation” deals in selling products to its customers after purchasing

products from different vendors, vendors have attributes like vendor id, vendor name, address,

phone number etc.

II. Company sends purchase order to a vendor and provides the list of items to purchase by the

company.

III. An item may be purchased from different vendors.

IV. Item are stored in the stock after they ate received from vendor.

V. Customers send Ahsan Corporation, sales order with the list of products to buy from Ahsan

Corporation.

VI. Products are sent to Customers with the invoice after receiving sales order from customers.

Invoice has attributes of invoice number, data etc.

VII. Customers make the payments according to invoice after receiving the invoice and make

payments on some data.

b. Draw an E-R Model for the Ashan & Co. that is a chartered Accountants Firm. Use the following

assumptions about the Human Resource Department.

I. There are may departments of company having attributes of department number, department

name, phone number, address etc.

II. Each person in the organization is considered to be an employee including owner. Employee may

or may not belong to a department.

III. There are many employees is the organization with attributes of employee id, name, phone

number, address, hire-data, age, sex etc.

IV. An employee can go on leaves and leave has two types casual leave and paid leave and leaves had

attributes leave data, leave type, number of days etc.

V. The record of children of employees is also to be recorded. The attributes for the children are

children number, sex age, etc.

VI. Employees supervise projects running in the organization and each project has attributes of

project it, project name, start date and completion date etc.

VII. Company has some Laboratories in it and every project is competed in some Laboratory.

Q.6 Do either part (a) of part (b) of this question

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

Page 5: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

a. Draw a diagram showing the five common process states and the transitions among them. Be sure

to label all states and transitions.

b. What is PCB what sort of information contains PCB?

Q.9 Do either part (a) of part (b) of this question

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?

Q.10 Do either part (a) of part (b) of this question

a. Write down the difference between hierarchical and relational data model with the help of an

example.

b. Differentiate between FAT-16 and NTFS bit systems?

Q.11 Do either part (a) of part (b) of this question

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. Describe the layered architecture of the OSI Model?

Q.12 Do either part (a) or part (b) of this question

a. What is difference between MESH Topology and BUS Topology?

b. What is the difference between HUB and SWITCH? Describe with examples.

Paper 2007 DBMS

Q.2 Do either part (a) or part (b) of this question (5 marks)

a. Write at least five advantages of database approach over conventional file based approach.

b. By giving examples, differentiate following.

b 1. Reliability and security with respect to relation DBMS 930

b 2. Primary key and foreign key (2)

Q.3 Do either part (a) or part (b) of this question (5 marks)

a. Draw an E-R Model for the following case-study.

Case Study.

Page 6: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

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.

b. Write a note on components of DBMS.

Q.4 Do either part (a) or part (b) of this question (5 marks)

a. Normalize following STUDENT table up to 3rd normal form.

STUDENT

Std-ID Std-Name Course-ID Course-Title Instructor-

ID

Instructor-ID

101 Ali CS-4301 Programming 202 Nadeem Ahmad

102 Ayesha CS-4305 Networking 205 Aqeel Ahmed

MT-405 Algebra 203 Waseem Ahmad

CS-4305 Networking 205 Aqeel Ahmad

HM-4408 Sociology 204 Madeeha Akram

MT-4502 Algebra 203 Waseem Ahmad

b. Write a note on different types of data dependencies.

Q.5 Do either part (a) or part (b) of this question (5 marks)

a. Differentiate degree and cardinality of a relationship by giving example.

b. Write a note on responsibilities of database administrator.

Q.6 Do either part (a) or part (b) of this question (5 marks)

Consider following table

ITEM

ITEM-ID Item-Label Type Condition Price

101 Pen - 203 R Pen New 40

102 Pen - 203 B Pen Old 25

Page 7: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

103 Book – 303 N Book New 35

104 File – 405 File New 15

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)

PAPER 2007 OPERATING SYSTEM

Q. 8 Do either part (a) or part (b) of this question (5 marks)

a. Explain each of the following.

a 1. Context Switching (2).

a 2. Process Control Block (3).

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)

Turnaround time; by applying.

i. Round robin Algorithm with Time Quantum 3.

ii. Shortest Remaining Time.

Process Arrival Time Burst Time

P1 0 7

P2 2 5

P3 4 2

P4 6 3

P5 9 6

Page 8: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

Q.9 Do either part (a) or part (b) of this question (5 marks)

a. Write a note on each of following.

a 1. Monitors (2)

a 2. Mutual Exclusive (3)

b. Write a note on Associative memory (Translation Look Aside Buffers).

Q.10 Do either part (a) or part (b) of this question (5 marks)

a. On a system using demand paged memory, it takes 120 ns to satisfy a memory

request if page is in memory. If the page is not in memory, the request take 5 ms.

If the page fault rate is 20%, what is effective access time?

b. What is magnetic disk? Explain how data are stored and organized on magnetic

disk.

Q.11 Do either part (a) or part (b) of this question (5 marks)

a. Write a note on Functions of Session Layer.

b. What is meant by topology? Write a note on Ring Topology.

Q.12 Do either part (a) or part (b) of this question (5 marks)

a. What are different types of unguided media, give examples of each.

b. Explain Phase-Shift keying by given examples.

Paper 2008 DBMS

Q2) Do either part (a) or part (b) of this question. (5 Marks)

a) Write a note on weak entities.

b) What are the different types of object? Explain each one briefly.

Q3) Do either part (a) or part (b) of this question. (5 Marks)

a) Differentiate between database processing systems and file processing systems.

b) Write a note on advantages of relational Modal.

Page 9: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

Q4) Do either part (a) or part (b) of this question. (5 Marks)

a) Explain the term normalization. Why it is required.

b) What is Boyce-Codd Normal Form,Give an example.

Q5 Do either part (a) or part (b) of this question. (5 Marks)

a) Write a note on form Design.

b) How are entities represented with a relational Modal.

Q6) Do either part (a) or part (b) of this question. (5 Marks)

Consider the following table named Product.

Product ID Product Name Product Type

100 Iron Electric Appliance

200 Ball Point Stationary

300 Notebook Stationary

400 Chair Furniture

500 Perfume Cosmetics

a) Write SQL statement that create the above table Product and insert these four records into it.

b) Write SQL statement that retrieves the list of all the product Types in the table.

PAPER 2008 OPERATING SYSTEM

Q8) Do either part (a) or part (b) of this question. (5 Marks)

a) Write down the different states of a process and briefly explain each one.

b) Write a note on priority Scheduling.

Q9) Do either part (a) or part (b) of this question. (5 Marks)

Page 10: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

a) If logical address is of 32 bits and page size is 1212 bytes .then how many bits are reserved for

page numbers.

b) Write in detail about fragmentation.

Q10) Do either part (a) or part (b) of this question. (5 Marks)

a) Briefly describe Message passing system.

b) Write note on deadlock prevention.

Q11) Do either part (a) or part (b) of this question. (5 Marks)

a) Write a note on Network layer of OSI model.

b) What is the interconnection of networks write briefly.

Q12) Do either part (a) or part (b) of this question. (5 Marks)

a) Write note on infrared.

b) Write note on coaxial cabel.

Paper 2009 DBMS

Q.2 Do either part a or b of this question (5marks)

a) Write note on basic components of database environment.

OR

B) Write at least five advantages of data base approach.

Q.3 Do either part a or b of this question (5marks)

a) Draw an ERD for the following g case study

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

Page 11: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

b) Differentiate between the following

Strong and weak entity

Primary key and composite key

Simple and composite attribute

Q.4 Do either part a or b of this question (5marks)

a) Normalize the following relation upto 3rd normal form (show each step clearly)

Client no Client

name

Property

no

Rent

start

Rent Owner no Owner

name

Property

address

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.

a) Write SQL

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.

PAPER 2009 OPERATING SYSTEM

Q.8 Do either part a or b of this question (5marks) a) What is “REPLACMENT” strategy in regard to store management? Describe the least recent used and optimal algorithm of page replacement. b) Following table shows a set of process with arrival timed and CPU burst calculated average waiting time per process by applying shortest remaining time algorithm.

Process Arrival time (ns) Burst time (ns)

P1 0 5

Employee ID Employee name Job title

50 Ali Manager

51 Fatima Analyst

52 Ahmad Salesperson

53 Maria Manager

Page 12: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

P2 3 4

P3 6 4

Q.9 Do either part a or b of this question (5marks) a) What is meant by a deadlock and what are four necessary conditions that can arises the deadlock in a system. b) If logical address is of 32 bits and age size 1216 bytes, then how many bits are reserved for page no and page offset. Q.10 Do either part a or b of this question (5marks) a) What is meant by a process? Write down the different states of a process and briefly explain each of them b) on s system using demand paging memory, it takes 140 ns to satisfy a memory request. If page in memory. If the page is not in memory, the request takes 5ms. If the page fault rate is 30% what is effective access time? Q.11 Do either part a or b of this question (5marks) a) W hat is meant by topology? Name the five basic network topologies and give advantages of mesh topology. b) What are the main categories of network? Write a short note on LAN Q.12 Do either part a or b of this question (5marks) a) How do guided media differ from unguided media? What is the major advantage of shielded twisted pair over the unshielded twisted pair? b) What is meant by transmission mode? Write a short note on half duplex transmission mode.

Paper 2010 DBMS

PAPER 2010 OPERATING SYSTEM

Paper 2011 DBMS

Q.2. a) Write a brief note on history of database processing. (Marks: 4.5).

b) Draw and Entity Relationship Diagram (ERD) for the following Company. (Makrs:8) Golden company wants to computerize its sales system. Golden Co. has its network across the

country. Country is distributed in zones. Each zone covers on or more citics. Each city has one or

more distributors. Golden company has number of products. Some products have more than one

packing size. The sales process is: Delivery order is made for each approved order. One delivery

order can be served in more than one supply depending on the availability of material in the store.

For each supply invoice is made. Invoice should be made from the delivery order. Therefore we

have to save the record of pending items in delivery order. Golden company has dealing with

number of transporters to send their goods to distributors. Golden company is maintaining record

of each transporters. Invoice also contains the name of transporter. Golden company receives

payments from the distributors. We have to save the record of each distributor.

Q.3. a) Define entity, attribute and relationship with examples. (Marks: 4.5)

b) Discuss different type of database anomalies with examples. (Marks:4)

Page 13: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

c) Define Functional Dependency and its types with examples. (Marks:4)

Q.4. a) Write SQL Statement: (Marks: 4.5)

i) Which Create the following table STUDENT

ii) Which insert the following given data is STUDENT Table

iii) Which Display all students name who earns more than 3.00 CGPA

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

B# Address Sr# Sname Salary C# Cname

B1 PU Old Campus B1S1 Naveed 45,000 C1 PUCIT

B1 PU Old Campus B1S2 Nadia 20,000 C2 PUCAD

B1 PU Old Campus B1S3 Kiran 38,000 C1 PUCIT

B2 PU New Campus B2S1 Ifrah 46,000 C1 PUCIT

B2 PU New Campus B2S2 Naveed 50,000 C5 Phy. Dept.

B2 PU New Campus B2S3 Umer 38,000 C3 Eng. Dept.

Note: B#: Branch Number S# Staff Number Sname: Staff

name

C#: Client Number Cname: Client name

PAPER 2011 OPERATING SYSTEM

Paper 2012 DBMS

List the major components of a database systems, and briefly explain the function of each.( Marks:

4.5) Draw an entity relationship diagram ( ERD) for the following company. ( Marks:8)

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

Page 14: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

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.

Define referential integrity constraint and explain with example. (Marks:3.5)

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

Invoice

_ID

Invoice

_DATE

CUST

_ID

CUST

_NAME

ITEM

_ID

ITEM

_NAME

ITEM

_QTY

ITEM

_PRICE

Invoice

_TOTAL

601 14/06/09 C_101 Naveed 1 Scanner 50 10$ 2500 $

601 2 Mouse 100 20$

602 14/06/09 C_101 Naveed 3 Printer 40 10$ 400 $

603 15/06/09 C_102 Amjad 2 Mouse 50 20$ 1800 $

603 4 Monitor 40 10$

603 1 Scanner 40 10$

Q.4. a) Explain the difference between an entity class and entity instance with example.

(Marks.4.5)

b) Write the following SQL Statements. (Marks:8)

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

of Math course only.

iii) Write a SQL SELECT statement on the following given Result Table which count

number of students

who earn more than 75 marks.

iv) Write a SQL INSERT statement on the following given Student table, which insert the

following

record

Page 15: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

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

Kernal mode from user mode. (Marks:6.5)

b) Draw and explain process state transition diagram. (Marks:6)

Q.7. a) Write a note on demand paging. (Marks:6.5)

b) Describe Second Chance page replacement algorithm. (Marks:6)

Q.8. a) Differentiate among LAN, WAN and MAN. (Marks:6.5)

b) Discuss briefly functions of Network Layer of OSI Model. (Marks:6)

Paper 2013 DBMS

Q.2. Identify Entities, Attributes and draw an Entity Relationship Diagram (ERD) for the

following Hospital. (Marks:4+8.5=12.5)

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.

Q.3. a) What is attribute? And discuss different types of attributes.

4 Inaam ul Haq MSc IT

Result

Std ID

(PK)

(FK)

Crs ID

(PK)

(FK)

Crs

_Name Marks

1 1 Math 80

2 2 Physics 85

3 3 Biology 50

3 1 Math 40

Student

Std

ID

(Pk)

Std_Na

me Degree

1 Jawad

iqbal BS_CS

2 Shahzad

Hassan BS_IT

3 Tariq

Nazeer BS_SE

Page 16: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

b) Normalize the following “College_Result” Relation up to 3rd Normal form but step by step,

show each intermediate resultant table its data.(Marks:9)

College_Result

Std

_ID

Std

_Name

Teacher

_ID

Teacher

_Name

Crs

_ID

Crs

_ Name

Max

_Marks

Obtained

_Marks

Status

501 Waseem 101 Naveed 1 Computer 70 20 Fail

102 Amjad 2 Physics 100 85 Pass

502 Imran 103 Ejaz 3 Math 100 63 Pass

503 Mohsin 102 Amjad 2 Pysics 100 23 Fail

104 Zafar 4 Chemistry 100 63 Pass

101 Naveed 1 Computer 70 46 Pass

Q.4. Write the following SQL Statements (Marks:12.5)

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

Result

Std ID

(Fk)

Fct ID

(Fk)

Crs

ID

(Fk)

Marks

1 1 1 80

2 2 2 85

3 3 3 50

Student

Std

ID

(Pk)

Std_Name Degree

1 Absar

Mushtaq BS_CS

2 Rabbiya BS_IT

3 Najeeb

Aslam BS_SE

Faculty

Fact

ID

(Pk)

Fact

Name Specialization

1 Ejaz

Ashraf SE

2 Umair

Baber Programming

3 Hasan

khan Programming

Course

Crs Crs_Name Cr_hrs

Page 17: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

PAPER 2013 OPERATING SYSTEM

Q.6. What is process scheduling criteria ? And list out any six scheduling criteria with short description. (Marks: 3+9.5=12.5)

Q.7. a) Differentiate First-in First-out (FIFO) and least Recently used (LRU) page replacement alogaritms. (Marks:6.5)

b) Discuss File System Architecture. (Marks:6)

Q.8. Disscus briefly functions of Transport and Session Layer of OSI Model. (Marks: 6+6.5=12.5)

Paper 2014 DBMS

Q2) Differentiate the following (Marks: 12.5)

I. Entity Integrity constraint and Referential constraint

II. Hierarchical database and network database

III. File Systems and Database system

IV. SQL-Groups By Clause and SQL- Order By Clause

Q3. a) Write a SQL statement, which create the following EMP table with mentioned datatype and

constraints.

EMP

Empno

(data type: Number)

Primary Key

Ename

(data type:CHAR)

Salary

(data type:

Number)

Dept No.

(data type: Number)

Foreign Key

Relationship with Dept

Table

ID

(Pk)

1 SE 3

2 DSA 4

3 IAP 4

Page 18: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

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.

Dept No: Name Contains ‘A’ Total Salary

10 2450 8750

20 1100 10875

30 7900 9400

---

c) Write a SQL statement on EMP table which displays the Ename, salary and deptno of those employees

who earns more salary than ‘UMAR’. (Note: UMAR is employees name (Ename) in EMP Table)

a) Discuss BCNF with one example

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

-ID

Dept-

Name

Hours

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

PAPER 2014 OPERATING SYSTEM

Q6. Discuss Briefly Different Process Attributes.

Q7. a) Write a note on Critical Section.

b) Define Deadlock and also discuss four conditions for deadlock occurrence.

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.

Page 19: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

Paper 2015 DBMS

Q#2

(a) What is a DBMS? And also discuss its components?

(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:

(a) Define attributes and its types.

(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)

Page 20: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a

Note: Doc-ID: Doctor id Doc-Name: Doctor Name Pat-ID: Patient Id Pat-Name:

Patient name Pat_Address: Patient address

PAPER 2015 OPERATING SYSTEM

Questions:

Question 6. a) Write note on Boot Process

b) Describe number of factors affect the determination of the page size.

Q# 7 Discuss different types of operating systems.

Q# 8 Discuss briefly function of physical layer and Data link layer of OSI model,

Page 21: Paper 2005 DBMS - informationtechnology.pkinformationtechnology.pk/wp-content/.../03/...DBMS.pdf · Paper 2007 DBMS Q.2 Do either part (a) or part (b) of this question (5 marks) a