• date post

05-Aug-2018
• Category

## Documents

• view

450

4

Embed Size (px)

### Transcript of Slip 1 UNIVERSITY OF PUNE F.Y.B.Sc (Comp. Sc.) Practical ... · PDF fileF.Y.B.Sc (Comp. Sc.)...

• Slip 1UNIVERSITY OF PUNE

F.Y.B.Sc (Comp. Sc.) Practical Examination April/Oct - 2014.Lab Course I: Basic C and DBMS

[Duration: 3 Hours] [Maximum Marks80]

Q.1.

a)Accept dimensions of a cylinder and print the surface area and volume (Hint: surface area = 2r2 +2rh, volume = r2h)

[ 15 marks ]

b) Write a program, which accepts a number n and displays each digit in words. Example: 6702Output = Six-Seven-Zero-Two.

[ 20 marks ]

Q 1 ORWrite a menu driven program to perform the following operations on a square matrix. Write separate functions for each option.

i) Check if the matrix is symmetric.ii) Exit

[ 35 marks ]

Q 2 . Create the following tables. (Primary Keys are underlined) [35 Marks]Country (c_code, c_name, capital, continent)Population (p_code, population)

Country and Population are related with one-to-one relationship.Draw a E-R diagram accordingly & convert it into relational model, so that the relations are in 3NF.

Insert 5 records in each table.

Solve the following Queries in SQL.1) Add constraint to Country table such that country name should not be null.2) Display all the records from both the tables.3) List the details of the country whose capital is Delhi.4) Find the name and population of country whose capital is Tokyo.5) List all the countries from Asia continent.6) Change the capital as Tokyo for the country whose code is 25.7) Delete the country details of Europe continent.

OR7) Solve the following queries.

i) List the country with highest population.ii) List population of country whose code is 20.iii) Remove table Population from database.

Q 3. Viva [10 marks]

• Slip2UNIVERSITY OF PUNE

F.Y.B.Sc (Comp. Sc.) Practical Examination April/Oct-2014.Lab Course I: Basic C and DBMS

[Duration: 3 Hours] [Maximum Marks80]

Q 2 . Create the following tables. (Primary Keys are underlined) [35 Marks]

Doctor (dno, dname, address, city) Patient (opdno, pat_name, addr, disease) Patient and Doctor related many-to-many relationship with an attribute Fee. Draw a E-R diagram accordingly & convert it into relational model, so that the relations are in 3NF.

Insert 5 records in each table.

Solve the following Queries in SQL.1) Add constraint to Doctor table such that address should not be null.2) Display records from all the tables.3) List all the details of doctors from Nagpur.4) Find the number of patients suffering from Asthama, and have been charged a fee of Rs 200,

by Dr. Kumar.5) List the patient details who are suffering from T.B. or cancer.6) Find all patients of Dr. Apte who are suffering from T.B. 7) Increase the fee of Dr. Kulkarni by 5%.

OR 7) Solve the following queries.

i) Find the name of doctor who charges the maximum fee.ii) Delete records of patient suffering from Cancer.iii) Remove table patient from database.

Q 3 . Viva [10 marks]

Q.1. a) Accept temperatures in Fahrenheit (F) and print it in Celsius(C) and Kelvin (K) (Hint: C=5/9(F-32), K = C + 273.15)

[ 15 marks ]

b) Write a program to accept two integers x and n and compute xn [20 marks ]

Q 1. ORWrite a program to accept a decimal number and convert it to binary, octal Write separate functions.

[ 35 marks ]

• Slip3UNIVERSITY OF PUNE

F.Y.B.Sc (Comp. Sc.) Practical Examination April/Oct -2014.Lab Course I: Basic C and DBMS

[Duration: 3 Hours] [Maximum Marks80]

Q.2 Create the following tables. (Primary Keys are underlined) [35 Marks] Person (pnumber, pname, birthdate, income) Area (aname, area_type,pincode , city)

Person & Area related with many-to-one relationship.The attribute area_type can have values as either urban or rural.Draw a E-R diagram accordingly & convert it into relational model, so that the relations are in 3NF.Insert atleast 5 records in each table

Solve the following Queries in SQL .1) add a constraint to the person table such that income is greater than zero.2) List the names of all people living in rural area.3) List the names of all people whose birthday falls in the month of Feb4) List the details of people living in urban and having income greater than 10,0005) List the people who are living in same area as Mr. Joshi& having same income as Mr.

Joshi.6) Give a raise of 20% to People earning less than the income Rs.10,000.7) Delete information of all people staying in urban area

OR 7) Solve the following queries.

i) List the details of areas, which the maximum number of people.ii) List names of people with Lowest incomeiii) Remove the table Area from the database.

Q 3 . Viva [10 marks]

Q 1 a) Accept the cost price and selling price from the keyboard. Find out if the seller has made a profit or loss and display how much profit or loss has been made.

[ 15 marks ]

b) Write a program to accept an integer, count number of digits and calculate sum of digits in the number. Example: Number = 1234 Output: Digits = 4, Sum = 10

[ 20 marks ]

Q 1

OR

Write a program to find the union of the two sets of integers. Store them in another array. [ 35 marks ]

• Slip4UNIVERSITY OF PUNE

F.Y.B.Sc (Comp. Sc.) Practical Examination April/Oct-2014.Lab Course I: Basic C and DBMS

[Duration: 3 Hours] [Maximum Marks80]

Q.2 Create the following tables. (Primary Keys are underlined) [35 Marks] Emp(eno,ename,designation,sal) Dept(dno,dname,loc) Dept & Emp related with one-to-many relationship .

Draw a E-R diagram accordingly & convert it into relational model, so that the relations are in 3NF. Insert 5 records in each table.

Solve the following Queries in SQL .1) Give a 5% raise in salary to employees of Finance department.2) Delete details of all employees of deparment 30;3) Modify the employee schema, to add a phone-no column.4) List all the employees of department 10 & 205) Display min,max,avg salary of each department, located in pune .6) List employees working at departments located at Calcutta.7) List the total amount spent as salary for each department in decreasing order of total salary.

OR 7) Solve the following queries: i) List the employees having salary less than 40,000. ii) List the names of employees who do not work in sales department. iii) Remove the table employee from the database.

Q 3 . Viva [10 marks]

Q 1 a) A cashier has currency notes of denomination 1, 5 and 10. Accept the amount to be withdrawn from the user and print the total number of currency notes of each denomination the cashier will have to give.

[ 15 marks ]

b) Write a program to accept an integer and reverse the number. Example: Input: 546, Reverse =645.

[ 20 marks ]

Q 1 ORWrite a program to find the intersection of the two sets of integers. Store them in another array.

[ 35 marks ]

• Slip5UNIVERSITY OF PUNE

F.Y.B.Sc (Comp. Sc.) Practical Examination April/Oct-2014.Lab Course I: Basic C and DBMS

[Duration: 3 Hours] [Maximum Marks80]

Q 1 a) Accept initial velocity (u), acceleration (a) and time (t). Print the final velocity (v) and the distance(s) travelled. (Hint: v = u + at, s = u + at2)

[ 15 marks ]

b) Accept a single digit from the user and display it in words. For example, if digit entered is 9, display Nine.

[20 marks ]

Q 1 ORWrite a program to merge two sorted arrays into a third array such that the third array is also in the sorted order. [ 35 marks ]

Q.2 Create the following tables. (Primary Keys are underlined) [35 Marks] Property(pno,description, city,price) Owner(ono,oname,address,phone) Property and Owner related with many to one relationship. Draw a E-R diagram accordingly & convert it into relational model, so that the relations are in 3NF. Insert 5 records in each table.

Solve the following Queries in SQL.1) Add a constraint to the property table such that information of properties belonging to pune,

mumbai and calcutta, are only stored in the table.2) Modify the phone no of Mr. Nene to 9890278008.3) Remove all properties belonging to pune city and owned by Mr. Joshi4) List the details of the properties that cost in the range of 500000-1000000.5) Display records of Owner who has more than 2 properties.6) Display the pno, description from Property where area is pune. 7) List the names of the owners who own all their properties in the same city where Mr.Joshi lives.

OR 7) Solve the following Queries: i) Display all the records from both tables. ii) List t