67
SET-1 No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination December, 2010 MCSL-045(P) : UNIX AND DBMS LAB 04083 Time allowed : 2 hours Maximum Marks : 50 Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hour duration. Attempt only that part(s) in which you are not yet successful . PART - I UNIX 1. Write and execute the UNIX commonds for the following : 5 (i) To split a file containing 50 lines into 25 lines each . (ii) To print last 10 lines of a text file. (iii) To count the number of words in a text file. (iv) To kill a process with its ID (v) To find out who is logged on to the system. 2. Write a shell script to accept a string as input and convert the lower case characters in 10 the string to upper case and upper case characters to lower case characters. Print the final string . 3. Write a shell script to append the contents of a text file into another text file. 5 MCSL-045(P)/S1 1 P.T.O. Downloaded from www.paraman.in

No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

  • Upload
    lyque

  • View
    226

  • Download
    6

Embed Size (px)

Citation preview

Page 1: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET-1 No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination

December, 2010

MCSL-045(P) : UNIX AND DBMS LAB

04083

Time allowed : 2 hours

Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hour duration. Attempt only that part(s) in which you are not yet successful .

PART - I

UNIX

1. Write and execute the UNIX commonds for the following : 5

(i) To split a file containing 50 lines into 25 lines each .

(ii) To print last 10 lines of a text file.

(iii) To count the number of words in a text file.

(iv) To kill a process with its ID

(v) To find out who is logged on to the system.

2. Write a shell script to accept a string as input and convert the lower case characters in 10 the string to upper case and upper case characters to lower case characters. Print the final string .

3. Write a shell script to append the contents of a text file into another text file. 5

MCSL-045(P)/S1 1 P.T.O.

Downloaded from www.paraman.in

Page 2: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Create a relational database with the following relations and insert ten meaningful records/data in each table of the relation. Book (B-ID, Title, Author, Year, Price )

PUBLISHER (Name, P_ID, D_ID, No. of title, S_ID)

SALES PERSON ( Name, S_ID, P_ID, B_ID, D_ID, order) where B_ID is Book id number, P_ID is Publisher id number, D-ID is distributor Id number, S_ID is Sales person id number.

2. Perform following queries using the relations created in Q 1, through SQL statements . 5 (a) List all the books for which sales person with id '001' has received order and

published by publisher '05'

(b) List all the titles of the books which are published by publisher '002' and ordered 5 by Distributor '10'.

(c) Print details of the books which are published in year '2010' by publisher '05'. 4

MCSL-045(P)/S1 2 5,000

Downloaded from www.paraman.in

Page 3: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET-2 No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination 02153

December, 2010

MCSL-045(P) : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hour duration. Attempt only that part(s) in which you are not yet successful .

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

5

1. Write and execute the UNIX commands for the following :

(i) To find the files that match specified criteria.

(ii) Change Password.

(iii) To print last ten lines of a text file .

(iv) To display year 2011.

(v) To append the redirected output to a storage file.

2. Write a shell script to reverse a given string as input. 5

3. Write a shell script to encrypt the content of a file using logic . 10

(i) Replace a character by just next character in the cycle for example

A by B ( or a by b), B by C (or b by c), Y by Z (or y by z), Z by A ( or z by a).

(ii) Leave numbers and any other symbols unchanged .

MCSL-045(P)/S2 1 P.T.O.

Downloaded from www.paraman.in

Page 4: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II DBMS

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks : 1 Create a relational. Database with the following relations and insert ten meaningful 6

row (data) in each table. STUDENT ( Roll. No, Name ) PROGRAM ( roll No, Course No, Batch, section ) TEACHER (Name, Course No, Batch, Section) ADVISE ( Section , Course No, Roll Number) GRADE ( Course No, Roll No, Grade, Year)

2. Consider the above relations and excute the following queries : (i) List Roll-No of all the students who have scored grade 'A' in course-No 5 and

6

taken advice for that course . (ii) List all the students who are in a section. 3 (iii) List all the students of a section who scored grade B.

5

MCSL-045(P)/S2 2 3,000

Downloaded from www.paraman.in

Page 5: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET -3 No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination 00333

December, 2010

MCSL-045(P) : UNIX AND DBMS LAB

Time allowed : 2 hours

Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hour duration. Attempt only that part(s) in which you are not yet successful .

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following : 5

(i) To display who logged on to this terminal .

(ii) To run a program at lower priority .

(iii) To move a file from one directory to other directory.

(iv) To run any job in background.

(v) Compare two files and show their differences.

2. Write a shell script which take a list of 10 numbers and print all the even numbers in 7

the list.

3. Write a shell scrip which count the number of words in a given sentence (statement ). 8

MCSL-045(P)/S3 1 P.T.O.

Downloaded from www.paraman.in

Page 6: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 'narks and the viva-voce is for 5 marks :

Question asked in this part are based on the following relations :

EMPLOYEE ( E - Id, Name, DOB, DOJ)

DEPARTMENT ( D - No, E - Id, Room - No)

SALARY ( E - Id, Basic, Grade - Pay, DA, TA, Other - A)

1. Insert 10 meaningful records in the tables . 5

2. Display details of employees who are of more than 50 year age . 4

3. Find the details of employees, who joined in Department number 5 in the year 2010. 6

4. Display details of all the employees whose grade pay is '8000' or more and work in 5 department number 1.

MCSL-045(P)/S3 2 3,000

Downloaded from www.paraman.in

Page 7: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET-4 No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination 01493

December, 2010

MCSL-045(P) : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hour duration. Attempt only that part(s) in which you are not yet successful .

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks and 5 marks is for viva-voce for each part.

1. Write and execute the UNIX commands for the following :

(i) Change the ownership of a file.

(ii) To run a program at high priority.

(iii) To display date and time.

(iv) To print first ten lines of a text file .

(v) To find the length of a file.

2. Write a shell script to write the initials of any name given as input .

3. Write a shell script to sort a list of 20 numbers stored in a file ( created by you ), in 10 ascending order.

5

5

MCSL-045(P)/S4 1 P.T.O.

Downloaded from www.paraman.in

Page 8: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Questions asked in this part are based on the following relations .

CD - STORE ( S. No., Type, Album, Price, Year, Album ID)

ARTIST ( Name , Album , Album ID, Year )

CUSTOMER ( Name, Address, Album, Year)

Where, Album ID is unique for any Album .

1. Insert 10 meaningful records in these table.

2. List all the albums of Artist Named " Myleo " in the CD - STORE.

3. List all the Albums launched in the year 2009 which is available in the CD - STORE.

4. Find the name (s) of customers) who purchased Album CD of year 2007.

5

6

4

5

MCSL-045(P)/ S4 2 2,000

Downloaded from www.paraman.in

Page 9: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Exarnination

]une, 2009

MCSL-045 : UNIX AND DBMS LAB

0 1 6 6 3

T i m e a l l o w e d : 2 h o u r s Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is far 1- hourduration. Attempt only that part(s) in which you nre not successful as yet.

PART I

UNIX

Note : Answer the following questions. They carry 20 marks and the aiaa-aoce is for 5 marks.

,,

3.

l. Write and execute the UNIX commands for the following :

(u) To run a progran/ job at a lower priority.

(b) To run any job in background

(") To count the characters in a file.

(d) Set the permissions of any file to r, x for everyone.

(u) To print the last 10 lines of any text file.

Write a shell script to translate the characters from upper case characters to lower casecharacters of anv file.

Write a shell script to display the odd number from 0 to 100.

5xL =5

MCSL-04' / St P.T.O.

Downloaded from www.paraman.in

Page 10: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

2.

3.

PART II

DBMS

Note : Ansuter the following questions. They carry 20 marks and the aiaa-ooce is for 5 marks.

L. Create an EMPLOYEE table with the fields : l0

Emp-name, Emp-No, Dept-ID, Dept-Name, Manager, Basic-Salary, Date-ofJoin,Branch_Location, City, State.

Select appropriate data types for the fields. Select Emp-No as the primary key. InsertL0 records with meaningful data

Also, write the queries for the following :

(u) Create a view with the fields Emp-No, Dept-Name and Data-ofJoin.

(b) Find all the employees whose Basic-Salary is between Rs. 4000 / - and,Rs. 1O000/-.

Write a trigger that is fired before any modification in the Basic_Salary for the existingemployees in the database.

Write a function/procedure that takes Emp-ID and returns back the Man ager,Depts/he is working.

- o O o -

2MCSr-04s / St 5,000

Downloaded from www.paraman.in

Page 11: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET - 1

MCA (Revised)

Term-End Practical Examination

December, 2009

MCSL-045 : UNIX AND DBMS LAB

02856

Time allowed : 2 hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hourduration. Attempt only that part(s) in which you are not successful as yet.

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following : 1x5=5

To make a poster of "MCA FOURTH SEM".

To send any message to other users who are logged-in.

To run a process at lower priority.

To count the number of lines in a given file.

(e) To stop any process with its PID.

2. Write a shell script to print the sum and average of a list of "n" numbers given as input. 10

3. Write a shell script to print all the prime numbers between 1 and 100. 5

MCSL-045 / S1

1 P.T.O.

Downloaded from www.paraman.in

Page 12: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Create the tables with the respective fields given below : 10

SUPPLIERS (sid sname, address)

PARTS (pid, pname, colour)

CATALOG (sid, pid, cost)

The key fields are underlined. Select appropriate data types for the fields. Insert 5records with meaningful data. Also, write the queries for the following :

Find the sid's of SUPPLIERS who supply every red and green part.

Find all the pid's of parts that are supplied by atleast two different suppliers.

2. Write a trigger that is fived before any row is inserted or deleted in the SUPPLIERS and 5PARTS tables.

3. Write a function/procedure that takes the colour and displays all the pid's and Pname's 5

of that specified colour.

- o 0 o -

5,000

MCSL-045/ S1 2

Downloaded from www.paraman.in

Page 13: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

fsryil. i -

f , . ' l t . '

. ,MCA (Revised)

, . 1 , . . .

i"'iFerrtr-End Practical

June; 2OO8

: UNIX AND DBMS LAB

Examination

",,,;4j',',t' , Attemtpt,wnly that part(s) in which you are not success/ul as yet.,Th r q.qlrc ports {UNIX and DBMS) in fhis paper. Each part is for 7 hour duration.

. ' t l :

, ' . . i t .

PART I

. 6 1

following questions. They carry 20

I

marks and the uiua-uoceis for

5N7=5

bpecial,/other symbols in it and save,the file

mechanism.

I

7text file with a simple encrypting

: i . .

P;T.O:.

Downloaded from www.paraman.in

Page 14: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

. l

PART IIDBilTlS '

t ' : t . , . . t '

Nole : ' Answer , the following qurestions: l-fhe1r iailrv i 2O ,*q.ks snd the rr&4ti,s* ls ,.&r

' / 1 ' . . . ' , .

. : ,

l. Create an EMPLOYEE table with the felds EMPNO, ENAME, JOB,r ntmliOff-fpntnSAIARY and DEPTNO. Insert 10 record, *itf, meaningful data. Also, write ,fr* q*#*'il#following :

( a ) T o . d i s p l a y u n i q u e j o b s f r o r n . t h e . E D 4 P I . o Y E E t a b l e . : i ^ ' . | ' o,

: "

- . , , , ,

, . . , 1

lb) To display thoge employees, whose salary is not in the rangB'of ,Rs. s000/- andRs. 10,000,/-. :

: ,. i. a ' " . , r . r , . ! ! . :

Writeatr iggerthatisf iredbeforeanyrow,isinsertedintheEMPLoYEEtable.

. .Wnte a .function that takes 'the EMPNO and retums bapk the. ENAtttF unA .lOINDATE,.of1hsemployee

2.

3,

i . : , I

MCSI--045P/S1 , : l ' i

Downloaded from www.paraman.in

Page 15: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

December, 2008

MCSI-045 : UNIX AND DBMS LAB

04777

T i m e n l l o w e d : 2 h o u r s Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for t hourduration. Attempt only that part(s) in which you are not succi:essful is yet.

PART I

UNIX

\ote : Answer the following questions. They carry 20 marks and the aiba-aoce is for S marks.

1. write and execute the uNIX commands for the following :(a) To run a program at lower priority.

(b) To append the redirected output to a storage file.(c) To show the disk space used by files or directories.(d) To compare two files and show their differences.

G) To translate all the lower case letters of a text file to upper case.

write a shell script to check whether a given string is a palindrome or not.

write a shell script to sort the given list of "n" numbers stored in a file, inascending order.

MCSL-045 / Sr P.T.O.

Downloaded from www.paraman.in

Page 16: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

Decembet, 2OO7

MCSL-O4S : UNIX AND DBMS LAB

l ' imea l l owed :2hou rs Maximum Marks : 50

Note : There are two pafts (UN/X and DBMS) in this paper. Each part is t'or 7 hour duration.

Attempt only that part(s) ln which you are not successful as yet.

PART I

UNIX

Note ; Answer the lollowing questions. They carry 20 marks and the uiua-uoce is for5 marks.

l. Write and execute the UNIX commands for the following : 7x5:5

(a )Tod isp layconten tso fa f i lenamed. .He l lo ' ,andnumber the l inesconta ined in th is f i le .

(b) To identify the users logged on to the system and then sending message from your

terminal to any user logged in-

(c) To report repeated lines in the file named "Hello".

(d) To change the access mode of the file named "Hello" such that only read permission is

granted to any body accessing the file, except the owner.

(e) To make a poster of "WELCOME".

2. Write a shell script to find out the biggest number from'the given three numbers. Numbers are

supplied as command line arguments. Print error if sufficient arguments are not supplied. 1.0

3. Write a shell script to display current date, time, username and current directory. 5

MCSL-045P /S 1 P . T . O .

Downloaded from www.paraman.in

Page 17: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART II

DBMS

Note : Answer the t'ollowing questions. TheV carry 20 marks and the uiua-uoce is for

5 marks.

1. [:or the schema given below, pdrform thg tasks (a).and (b)., '

Instructor (l_no, I_name, I_Salary, I-DOB, I-supervisor, I-Desig, Ijoiningdate)

Session (S-no, I-no, S-room)

Earning (E-min, E-max,'E-grade)

,' (a) r'Display the list of all instructors who are earning equal to any instructors who have joined

. before '31-Dec-98'.

(b) Display Name, Salaries and Earning grade of all instructors.

2. Using the schema given above, write a procedure to display the names of all those instructors 10whose supervisor is 'Mohan'.

3. Using the schema given above, write a trigger that is fired before any row is inserted in the

' Instructor table. 5

M CS L-045 P/S 1 2 5,O00

Downloaded from www.paraman.in

Page 18: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

|une, 2009

MCSL'045 : UNIX AND DBMS LAB

0 2 7 0 0

T i m e a l l o w e d : 2 h o u r s Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. F,ach part is for L hourd"rrtt"". Atttrryt t@

PART I

UNIX

Note : Answer the follouring questions. They carry 20 marks and the aioa-aoce is for 5 marks.

1-. write and execute the UNIX commands for the following :

(a) To run a specific program at specified intervals.

(b) To display the first five lines of a text file.

(") To rename a file.

(d) To delete all the files in a specific directory.

G) To read the messages sent by the UNIX administrator.

Write a shell script to display the count of no. of files available in your current directorywith the file extensions .txt, .doc, .c, .cpp and .bak.

Write a shell script to replace the file names of all the files in the current directorystarting with the alphabet " a" to "k" . The rest of the filename and the extensionsshould remain unchanged.

Example; atcprogram.c should be changed to ktcprogram.c

3.

5 x L = 5

MCSL-04' / 32 P.T.O.

Downloaded from www.paraman.in

Page 19: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART II

, DBMS

Note : Answer the following questions. They carry 20 marks and the uiaa-aoce is for S marks.L. create a REGIoNAL_CENTRE table with the fields :

RC-Name RC-Code, RC-Director, Year-Establisted, Addressl, Address2, City, State,No-of-Students, No-of-Programes-Activated, No-of_Ac_counsellors.Select appropriate data Wpes for all the fields.

Select RC_Code as the primary k"y.

Insert L0 meaningful records with appropriate data.Also, wtite the queries for the following :

(u) Create a view with the fields RC-Name, RC-Code, City and State.(b) To display the RC-Code, RC-Name which has maximum no. of students enrolled.

Wlite a trigger that is fired before any row is inserted in the REGIONAL_CENTREtable.

Write a function that takes the RC*Code and returns back the Year-Establisled alongwith the No_of_Ac_Councillors.

o O o -

10

2.

3.

MCSL-A4' / 32 Addl. 1,000

Downloaded from www.paraman.in

Page 20: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET-2No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination 02939June, 2010

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is of 1 hourduration. Attempt only that part(s) in which you are not successful yet.

PART - IUNIX

Note : Answer the following questions. They carry 20 marks and viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following : 5To run any Job in background.To find the file length.Create a file for storing name of your friend and find wether name of a specificfriend is there in the file or not.To move file from one directory to other directory.

(e) To run a program at higher priority.

2. Write a shell script which take a list of 10 numbers and print all the odd numbers in the 10list.

3. Write a shell script which remove all the vovels from a given sentence (statement). 5

MCSL-045/ S2

1 P.T.O.

Downloaded from www.paraman.in

Page 21: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 marks and viva-voce is for 5 marks :

1. Create an Institute Table with the field Inst_Name, Ins_Address, Institute_Owner, 10Year of Establishment.Select appropriate data type for the fields. Insert 10 records with meaningful data.Also write queries for the following :

Create a view with the fields Inst_Name, Year_of_Establisnment.List the Institutes which are established after year 2005.

2. For question 1 above create a procedure that finds whether an Institute_Name given 10by the user exist in the Table Institute or not. If it does not exist then display "Theinstitute of this name does not exist".

MCSL-045/ S2

2 2,000

Downloaded from www.paraman.in

Page 22: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET - 2

MCA (Revised)

Term-End Practical Examination

December, 2009 01301

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours

Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hourduration. Attempt only that part(s) in which you are not successful as yet.

PART - IUNIX

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following : 1 x 5=5

To move to the root directory from the current working directory.To make a copy of any text file.Set the permissions to read only for everyone for any file.To select the lines from a file that have exactly two characters and count them.

(e) To select a text file and double space the lines.

2. Write a shell script that accepts a string from the terminal and echo a suitable message 10if it doesn't have atleast 6 characters including other symbols.

3. Write a group command to select the lines in a file that has one or more blank spaces. 5

MC SL-045/ S2

1 P.T.O.

Downloaded from www.paraman.in

Page 23: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Create the database with the following tables and their corresponding fields : 10

FLIGHTS (flno, from, to, distance departs, arrives)AIRCRAFT (aid, aname, cruisingrange)CERTIFIED (eid, aid)EMPLOYEES (eid, ename, salary)

The key fields are underlined. Select appropriate data types for the fields. Insert 5meaningful records. Also, write the queries for the following :

Find the eids of employees who certified for the largest number of aircrafts.Find the aid of the aircrafts which has highest cruisingrange.

2. Write a trigger that will five before any row is inserted of deleted in the FLIGHTS, 5AIRCRAFT and CERTIFIED tables.

3. Write a simple function/procedure that takes the eid as input and displays the salary. 5

- o 0 o -

MCSL-045/ S2

2 3,000

Downloaded from www.paraman.in

Page 24: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

June, 2OOg

: UNIX AND DBMS LAB

, q

Anstper

PART I

UNIX

follawing questions. They carry 20 marks and the uiuq-uoce Is for: :

i,r:* :, rlr li/fite'and exht*e the UNIX commands for the following :

, ,1 -t '

I .,, llt4, To shoqrt tle inode number of a file.

rl,'jr..,:'; i .'{b},i'!'io ,ortlnuep ttrpt access time in the current directory

' .Xyz.qt and rename the file as abc.Urt

i,i, ,1 ,,j . .. . ,,i' Ul , To detenr{4e the type of a file.. ; , , : i i t i , t . . . l , . l

i'{e}, To trandatts tlre charasters in a file name from lourer case to upper case.

5xI=5 .

subtraction,

1 5

1

Downloaded from www.paraman.in

Page 25: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

dnd the uhn'lpqce,, ls,,,

, i .

- a

" l

PART trDBMS

INoJe : ' Answer the followtng qugsttSns. They iarry "V}'marks

" 1

r ' , i ; '

MCSL-045P/Sz

5 marks.

10 meaningful records. Also write the queries for tf {oHownhg :' ,,

, ,

(a }Mod i fu theBook tab leby inser t ingano ther f ie ld . in l l edDIScouNr . . ' ' - , - :' , : ' ' '

(bl From the Book bble, display the tdghest, louest and sutb ol a[ tha':p$css of tE boak ,,t:]':r' ' ".l' : Ias per their prices.

. ., i

2, ' Write a higger that ts ftred urtre4erm an.$fSfnf .na tl*.UppAfe *"or "n

tU neot trUb,!. ;Sf:|, '

,. . '

= " " " " ' " J " r+ ' :4 r * r '

" ' ' ' " ' { i i ' 1 t l l ' 11

3. Wrtte a procedrrre that takes the ISBN "ria

retur*,ltr nti", rorr*ror ana the ptlce:ot dte Sgh ' 6:. ,l

j ?

Downloaded from www.paraman.in

Page 26: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Terrn-End Practical Examination 02265December, 2008

MCSL-045 z UNIX AND DBMS LAB

T i m e a l l o w e d : 2 h o u r s Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for t hourfurrttt". Arrt-pt tq

PART I

UNIX

Note : Answer the folluning questions. They carry 20 marks and the aiua-uoce is for 5 marks.

1. Write and execute the following UNIX commands : 5 x 1=5

(a) To run a program/process at a later time.

(b) To print the status of all the processes running.

(.) To re-run earlier command from history list.

(d) To open and screen editor and type the contents.

(e) To set file permissions of any file to read only for all'

2. Write a shell script to split the contents of the text file given as input into two files of 15

equal lines of each. For example, if a source file consists of 30 lines, it should be splittedinto 2 files of L5 lines each.

MCSL-045 / 52 P.T.O.

Downloaded from www.paraman.in

Page 27: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

i

l

MCA (Revised)

Term-End Practical Examination

Decembet, 2OO7

MCSL-O45 : UNIX AND DBMS LAB

T ' i m e a l l o w e d : 2 h o u r sMaximum Marks : 50

Nate : There are twoparfs (UNIX and DBMS) in this paper' Each part is lor 7 hour duration'

Attemptonlythatpart(s) inwhichyouarenotsuccessfulasyet.

l ' l

PART I

UNIX

Note : Answer the following questions. They carry 20 morks and the uiua-uoce is for

5 marks

1. Write and executethe UNIX commands for the following : 7x5:5

(a) To display first three lines of a file named l?eace" '

(b) To count number of words contained in a file'

(c)Todisplayinformationaboutvariousprocessesrunningcurrent ly.

(d) To kill more than'one process at a time'

(e) To run a program at lower priority'

2. Write a shell script to print sum of digits of a given number i'e' if number is 123 then your

script should Print 1+2+3:6. 70

3. Write a shell script to print Fibonacci series.

MCSL-045P/S2P . T . o .

Downloaded from www.paraman.in

Page 28: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART II

DBMS

Note : Answer the following quesfions . Threg carry' 2A marks and the uiua-uoce is t'or5 mqrks.

Questions asked in this part are based on the foilowing reritions ,

Sales-person (S-id, S-name, S-age, S-experience, S-designation, S-product, S-supervisor)

Sales_record (S*id, S_target, S_sold, S_status)

Sales-earning (S_id, S_basic, S_perks, S_grade, S_salary)

l. Create a view that stores details of all salespersons who are designated as sales executives andearning more than Rs tZ,b00.

2- Write a procedure to search the name of a salesperson in the relation sales_person.

3. Perform the following queries

(i) Display the list of all salespersons whose designation and salary is same as that of thesalesperson named "Tushar".

(ii) Display names of all salespersons whose sales target is 100 units of any product

5i . . ' . '

1 0

5

4,000MCSL-045P/S2 ._r 2

Downloaded from www.paraman.in

Page 29: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

|une, 2409

MCSL-045 : UNIX AND DBMS tAB

0 0 4 9 7

Maximum Marks : 50T i m e a l l o w e d : 2 h o u r s

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 7,hour duration. Attempt only that part(s) in which you are not successful asyet.

PART I

UNIX

Note : Answer the following questions. They cnrry 20 marks and the aiaa-aoce is for 5 marks.

2.

L. Write and execute the UNIX commands for the following :

(u) To change a password.

(b) To display the data only.

(") To display the disk space used by the files and folders.

(d) To compare two files and report the differences.

(") To kill a process with the PID.

Write a shell script which reads the contents of a text file and removes " is" ftom all itsoccurrences and count the total no. of times it appeared in the file.

Write a shell script to store all the executed commands by the user in a file called"HISTORY" till the user logs_out.

5xL=5

3.

MCSL-045 / 33 Tt 'Tt nl - . I . \ - t .

Downloaded from www.paraman.in

Page 30: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET-3No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination

June, 2010 01634

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours

Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is of 1 hourduration. Attempt only that part(s) in which you are not successful yet.

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following :

To append the redirected output to a storage file.

To translate all the upper case letters of a text file to lower case.

To copy file from one directory to other directory.

To display year of 2009.

(e) To create a file 'student' and give read and write permission to it.

2. Write a shell script to count all the vovels in a text file, mytext.txt, which to be created 6by you.

3. Write a shell script to sort a list of 20 numbers stored in a file (created by you), in 9descending order.

MCSL-045/ S3

1 P.T.O.

Downloaded from www.paraman.in

Page 31: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

Questions asked in this part are based on the following relations :

STUDENT(S_id, Programme, Did, Year)

TEACHER(D_id, Course_id, T_id)

GRADE (Sid, Course_id, Grade, Year)

Where S_id represent student roll number and Did represents Department ID andT_id represent Teacher ID :

Insert 10 meaningful records in these tables. 4

List all the teachers ID in a particular department. 3

Find grades given by a teachers to all the students in a specific course. 8

List all the students who have registered in year 2007 and later. 5

MCSL-045/ S3

2 2,000

Downloaded from www.paraman.in

Page 32: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET - 3MCA (Revised)

Term-End Practical Examination

December, 2009 02445

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hourduration. Attempt only that part(s) in which you are not successful as yet.

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following : 1x5=5

To compare two text files.

To display the current environment variables.

To display lines from 2 to 4 of any file which contains more 4 lines in a text file.

To list the statistics of the largest file in the current directory.

(e) To fill a particular process.

2. Write a shell script to echo the length of the string given as input. 5

3. Write a shell program to find the factorial of a given number. 10

MCSL-045/ S3

1 P.T.O.

Downloaded from www.paraman.in

Page 33: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Create the database with the following tables and corresponding fields as shown 10below :

SAILORS (sid sname, rating, age)

BOATS (bid, bname, colour)

RESERVES (sid, bid, day)

The key fields are underlined. Select appropriate data types for all the fields. Insert 5meaningful records. Also, write the queries for the following :

Display the sid's, bid's and corresponding bname's for the reserved date10/10/2009.

Display all the sid's whose ratings are equal to and above 8.

2. Write a trigger that will five before any row is inserted or deleted is all the tables. 5

3. Write a function/procedure that tables the reserved date and display all the sid's and 5bid's scheduled on that day. Also, it should display the total reservation for that day.

- o 0 o -

MCSL-045/ S3

2 3,000

Downloaded from www.paraman.in

Page 34: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Terrrl-End Practical Exanrination

June, 2OOB

MCSL-O4S : LlNlx AND DBMS ,LAB

t There are twa parts (UNIX and DBMS) in thls paper. Each pa'rt is for 7 howt'duration^

Attempt pnly that part(s) in which you are npt success/ul as yet.

PAR'T IUNIX

and the uiua-uw Is for

5xI:5' i j '

, i' ' - r ' t , " . t

: i

,'i.. (ai' To saft the files in reverse onder in the ctrrent directory.' i : , : ' ' : l . _ , : .

i " , i . . . - . i

- . : . : , .,,,i'lrru;l.tb)" Tlh drectb,move to the parent flirectory frorn the current'directory. : ,

' '- 1 ,

" . ' 1

' ' \(c) lUgng cat cotnmand create a text file and mve as fest. txf .

,1.,

't {r#1. To-.,count number of lines, words and characters in a gjiven file.' ' - : .

- : . (u} . . .To ' .d igp[aythef i rs tmismatchaf tercompar ingtwof , i les.

. , , ' . .

2. Wrlte "'rh"[

oi,pt to display the smallest file name (in relpect of the string length] arfiong the

list of files arra$eble in the current directory. 8', i ,

3. Write e shgfl,script to direct the odd and even numbers,giv€n by the user to the respectiw files

P,T.O;

Downloaded from www.paraman.in

Page 35: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

, PART IIDBMS

' 1

Nole: Answer the followtng gueef&ilis]tTh " cafi Zblmarks and5 marks.

l. , Create. :a CATALOG table with the fields : .

BookJD, Title, AuthorJD, RrblisherJD, C,ategory_lD, Year and price

Select appropriate data types for the fields. Select Book-lD as the primqry key.10 recor-ds with meaningful data" '

' ' , ' ,' "' ..

Also, write the queries for the following :

(a) Create a view with th€ fields Book-tD, Title, Auhor-trD and Price of CATAIffi, t&andithat too only for the bool$ pddished after 19.90.

(b) Fnd the titles of the books and their publishers whose price of the b.cilr is r*ru 'than

.,; ' ,

Rs. 600/-.. '

rice, column for the existing booksin the database.

3. Write a function/procedure that takes the Book-lD and fetr,rms back the Author-lD, YeaF oqs[ ', I

its Price.

MC$HOaSF/S3

. . . . 1

Downloaded from www.paraman.in

Page 36: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

December, 2008

MCSI-045 : UNIX AND DBMS LAB

0 0 8 5 3

T imea l lowed :2hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 7 hourduration. Attempt only that part(s) in athich you are not successful as yet,

PART I

UNIX

Note : Anxoer the folluning questions. They carry 20 marks and the aiaa-aoce is for 5 marks.

Write and execute the following UNIX commands :

(a) To give 2 or more UNIX commands on the same line.

(b) To count no. of times a particular string appears in a text file.

(c) To send a file to print queue.

(d) To rename a file.

(e) To kill a process with its PID.

Write a shell script to count the no. of lines, characters, other symbols in a given file.

5x1=5

MCSL-o45/ 53 P.T.O.

Downloaded from www.paraman.in

Page 37: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

/

MCA (Revised)

Term-End Practical Examination

December, 2OO7

MCSL-O4S : UNIX AND DBMS LAB

T i m e q l l o w e d : 2 h o u r s Maximl)m Marks : 50

Note : There are two Parts (UIVIX

Attempt onlY that Part(s)

and DBMS) in this paper. Each psrt is for 7 hour duration.

in which you are not succes sful os yet'

PART I

UNIX

Note : Answer the following questions. They corry 20 marks and the uiua-uoce is for

5 marks.

l. Write and execute the I.JNIX commands for the following : 7x5:5

(a) Create a file named 'lPhor,"" containing information about the names of persons and

-their phone numbers. Now write a command to display a list having details of phone

numbers of all persons in the file "Phone" with surname "Singh"'

To combine two existing files named "Hello" and "Hi" into a new file named "welcome"'

To sort the contents of a file named "numbers" in reverse order.

To compare any two files and show the differences'

To change current password of the user to a new password'

(b)

(c)

(d)

(e)

2. Write a shell script to find factorial of a number.

3. , Write a shell script to print the following pattern :

I

2 2

3 3 3

+ 4 4 4

5 5 5 5 5

M CS 1 .045 P/S3P . T . o .

Downloaded from www.paraman.in

Page 38: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

\

PART IT

DBMS

Note : Answer the t'ottowing questions. They carry 20 marks and the uiua-uoce is for5 marks.

Questions asked in this part are based on following relations :

Engineer (E-id, E-name, E-salary, E-DOB, E_date_ofjoining)

Department (D-no, F id, Rooml

Scale (Min-Sal, Max_Sal, Grade)

l- Write a trigger that verifies the joining date when a new row is inserted in the table for relationEngineer. Joining date should be greater than or equal to current date. j0

2- Write a host language block to delete all the rows from Engineer table where the salary is lessthan Rs. 5000/-. 10

I

MCSL-045P/S3 2,O00

Downloaded from www.paraman.in

Page 39: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Exarnination

|une, 2009

MCSL-045 : UNIX AND DBMS LAB

0 0 1 6 2

Maximum Marks : 50T ime a l l owed :2hou rs

Note : There are two parts GINIX and DBMS) induration. Attempt only that part(s) in which

this paper. Each part is for L houryou are not successful as yet.

PART I

UNIX

Note : Ansnter the following questions. Thty carry 2A marks and the aiaa-aoce is for 5 marks.

1. Write and execute the UNIX commands for the following :

(u) To display the login details of the user.

(b) To display the inode number of a file.

(.) To display only the sizes of the files in the current directory.

(d) To determine the type of the file.

(") To sort the files by their access time from the latest to the old.

5xL=5

2. Write a shell script to split the given text f i le into two equal divisions 1-5(w.r.t the no. of lines) and redirect the contents to two different files namely

fle, and filrz.

MCSL-045 / S4 P.T.O.

Downloaded from www.paraman.in

Page 40: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

2.

3 .

PART II

DBMS

Note : Answer the fottowing questions. They cilrry 20 ma*s and the aiaa-aoce is for 5 marks. ll. Create a SOCIS table with the fields : L0

Programme-Code, Programme title, No-of-Students-Enrolled, Year-of-Start,No-of-Activation-Centres, No-of-Credits, No_of_Semesters, Programme_Coordinator

Select Programme-Code as the primary k"y. Insert L0 meaningful records. Also writethe queries for the following :

(u) Modify the table by inserting another field called "Practicals IY /N]" and"TYPE_of_Programme lC/B / MJ" .

(b) From the table display the programme-codes with the highest enrollments andleast enrollments respectively.

Write a trigger that will be fired whenever an insertion or update occurs on the SOCIStable.

Write a procedure that takes the YeaLof-Start as input and display all the prograrnrnedetails activated in that specific year.

- o O o -

MCSL-045 / 34 2,00a

Downloaded from www.paraman.in

Page 41: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

No. of Printed Pages : 2 SET - 4

MCA (Revised)

Term-End Practical Examination01389

June, 2010

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours

Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is of 1 hourduration. Attempt only that part(s) in which you are not successful yet.

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks. The viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following : 5Find out who is logged on to the system.

To display first 10 lines of a file

Change password.

To count the number of words contained in a file.

(e) To run a program at lower priority.

2. Write a shell script to print Factorial n. 5

3. Write a shell script that print the smallest digit of a given number , i.e. if the number is 101 2 3 4 5 then your script should print 1. Make necessary assumption.

MCSL-045/ S4

P.T.O.

Downloaded from www.paraman.in

Page 42: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 marks and viva-voce is for 5 marks :

Question asked in this part are based on the following relations :

EMPLOYEE(E_id, E_name, E_DOB, EDOJ)

DEPARTMENT (D_No., E_id, Room_No.)

SALARY (BASIC, Grade_Pay, DA, Other_A, E_id)

Insert 10 records with meaningful data in all the tables 6

Display details of employees who are of less than 30 year age. 4

3. Create a procedure that find whether an employee whose id is given, draw '9000' as 10Grade Pay or not. If employee of that id is not available in database then display "Thisemployee is not part of this system".

MCSL-045/ S4

2 2,000

Downloaded from www.paraman.in

Page 43: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET-4MCA (Revised)

Term-End Practical Examination

December, 2009 01285

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1 hourduration. Attempt only that part(s) in which you are not successful as yet.

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following :

To display the date and time.

To change the password.

To change the prompt from $ to —.

To list all the users from /etc./passwd in the alphabetically sorted order.

(e) To select the lines from the file that end with a period (.)

1x5=5

Write a shell script that translate all the characters to lower case from upper case of 10any given text file.

Write a shell script that redirects all the even numbers to a file called "even" from a list 5of "n" numbers given as input.

MCSL-045/ S4

1 P.T.O.

Downloaded from www.paraman.in

Page 44: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART-II

DBMS

Note : Answer the following questions. They carry 20 marks and the viva-voce is for 5 marks :

1. Create the database with the following tables and their corresponding fields : 10

STUDENT (snum, sname, major, level, age)

CLASS (name, meats_at, room, fid)

ENROLLED (snum, cname)

FACULTY (fid, fname, deptid)

The key fields one underlined. Select appropriate data types for the fields. Insert 5records with meaningful data. Also, write the queries for the following :

Find the names of all classes that either meet in room R1 or have five or morestudents enrolled.

Find the names of the students who are not enrolled in any class.

2. Write a trigger that will five before any row is inserted or deleted in the database. 5

3. Write a function/procedure that will take fid as input and displays the deptid and all 5the respective classes associated with him.

- o 0 o -

MCSL-045/ S4

2 2,000

Downloaded from www.paraman.in

Page 45: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET - 1No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination01362

June, 2010

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is of 1 hourduration. Attempt only that part(s) in which you are not successful yet.

PART - I

UNIX

Note : Answer the following questions. They carry 20 marks. The viva-voce is for 5 marks :

1. Write and execute the UNIX commands for the following : 5

To split a file containing 50 lines into two files of 25 lines each..To print the last ten lines of a text file.Create a file having name and corresponding roll number of 5 students.Compare two files and show their differences.

(e) To show the disk space used by files or directories.

2. Write a shell script to check whether a given string is a palindrome or not. 8

3. Write a shell script that print table of 5. 7

MCSL-045/ S1

1 P.T.O.

Downloaded from www.paraman.in

Page 46: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART - II

DBMS

Note : Answer the following questions. They carry 20 marks and viva -voce is for 5 marks :

Questions asked in this part are based on the following relations :

VIDIO_LIB_INFO( VIDIO-ID, VIDIO_NAME, YEAR_OF_RELESE, NO_COPIES)

CUSTOMER (CUST_ID, NAME, ADDRESS, MEM_DATE)

ISSUE (VIDIO_ID, CUST_ID, OPERATION, TR_DATE)

Select appropriate data type for the fields. Insert 10 records with meaningful data. 5

List all the customers of the library who are its member from 2005. 3

List the name of customers to whom video of specific ID is issued. 5

Create a procedure to identify where a customer of specific CUST_ID exist or not. 7Display appropriate message for result.

5,000

MCSL-045/S1 2

Downloaded from www.paraman.in

Page 47: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

ls.ET4,

MCA (Revised)

T -End Practical Examination

June, 2OO8

UNIX AND DBMS

., :iii . ffo$,*i There siie ttib patts (UJ.IIX and DBMS) in this paip€r. Each part is for 7 houi duration.

. -' , Attempt only that part(s) in which you are not successful as yet.

. ' , . ,r , , ' - . , I'.,,:.l.;]!.'

PART IUNIX

They carry 20 marks an.d the uiua-uoce'is for

' . , . : , 1 . ' , . . . , r . , , : - : _ , . .

, :i.f.li ''. iW] and a<ecr*e- 'Sre UNIX commands for the following :- . ,

' t t , . .

. {a} To count tlre number of differences between twcj files.

a shell script.to sort all the files in the current directory in an alphabetical order and direct

. t : i .

Maximum Mqrlcs,;'50

5x7-5

t

, : , " i ', ,,';

' ffi To saw the output in a file as well as display the same on the VDU:' i ' i i ; . _ , . 1 - :

- .

: , ' ' : { ,':':-l '; :, To count the nurnber of files in,the current directory.,,; ' li ' l ',. : -, ,

! i . , : j r ! '

1 , , . ''-l,,Jir.,i,.I(tsi

Split a file u*th each file containing 72llnes per page.Ii..

,,, . (GI To kill a prffiess with a PID.

. 8

..",I

Downloaded from www.paraman.in

Page 48: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

' . ' j ' :

j ' ' \ " ' :

. ' - : ; " ' '

P A R T I I . t , 7 . . ' , : : : 'f u ' .

DBfrs . . :-i;.."t . ;, ,..;,,.ti ,.i;,,.

Notc t Ansuer thb fuIlowlng gu6ttons.. TheV t*trrVy20 morfts dnd tlr- vii*tncc k'for . ,',. j .

. . . \ . .

. 5 m.a*s. .o: ll,, . . ''

":i,"' 1. ' -r.<.;iql; , , :::i: ;t, '"tt

1. Create an AUTHOR table wlth the ffel& : . ..: .i

' AUII{OB-ID, nAr,,re, Cfiy, .COUNIRY, *OILdittOJ{, CnrnCOmr;,dnR,,n,la., ,:ij

, Pt BHSHER and PtsICE ' . . ri i : ii{ -l

S€lect AUT}IOI|p as . a prirnry kql. SdEt aspropdata dda {,pei fo,r,.ihe ffgl&. Ingcrt :.10recordswithmeaningfuldatq.Also,writethequer1es.forthefollowing:

r.:{il , T9 dlsflay all the arrthor's nanres w}roce name darts u,tttr tE alphab4 '!(ii1'":;,.,, , .

' ..'

(ll) To dbplay the Atrthor-D, ard FRICE wtrose U*.t's i*" ** '

Rs. 500/- ts Rs. 1000f.

, :

3. Write a function/procedure that takes year and r€firms back all the books u*richlare puHished

during the year along with the AUTHOR-ID and NAME.

. :l: ,.,

t , , ' . ' , , t '

:

2

J

Downloaded from www.paraman.in

Page 49: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

December,2008

MCSL-045 : UNIX AND DBMS LAB

01-L45

T imea l lowed :2hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 1. hourduration. Attempt only that part(s) in which you are not successful as yet.

PART I

UNIX

Note : Ansanr the futtowing questions. They carry 20 marks and the uiaa-aoce is for 5 marks.

l. Write and execute the UNIX commands for the following : 5x1=5

(a) To sort the given list of "n" strings in a alphabetical order.

(b) To run any job in background.

(c) To count the no. of characters in any file.

(d) To display the calender for the current month.

(") To print the information/status about the current processes running.

Write a shell script to immediately echo the length of the string given as an argument.

Write a shell scipt to count the no. of ".bak" files in the current working directory.

MCSL-o4s/54 P.T.O.

Downloaded from www.paraman.in

Page 50: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

Decembet, 2OO7

MCSL-O45 : UNIX AND DBMS LAB

Timea l lowed:2hoursMaximum Mqrks ; 50

Note : |'here ore two parts(UNx and DBMS) in this poper. Each part is lor 7 hour duration'

Attempt only that port(s) in which you ore nof successful as yet'

PART I

UNIX

Note : Answer the t'ollowing questions. They corry 20 marks ond the uiuo-uoce is lor

5 marks.

l. write and execute the UNIX commands for the following : 7x5=5

(a) To delete all the files in the current directory whose name ends in "'bak"'

(b) To list the details of the largest file in the directory'

(c) To place everything that appears on the screen in the log file, including prompt'

(d) To check the spellings of the words in a file'

(e) To display your current environment variables'

2. write a shell script to delete all even nurnbered lines in a text file'

3. Write a shell script that prints the message Good Morning, or Good Afternoon' or Good

livening, according to the system's time'

M CSL-045 P/S4P . T . O .

Downloaded from www.paraman.in

Page 51: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART IIDBMS

Note : Answer the following questions. They carl 210 marks and the aiua-uoce is for5 marks.

say, Job (j-id, j-name, j-cost, j-date) be the schema of. the jobs to be allotted toemployees by administrator. Write a trigger such that it does not allow the administratordatabase operation like Insert, Delete, update on Job, on weekends.

2' Create a procedure that finds whether the job-identifier i.e. j-id, given by the administratorexists or not. If j-id doesn't exist then display "Job does not exist,,. 10

l .vanous

to any

1 0

MCSL-045P/S42,OOO

Downloaded from www.paraman.in

Page 52: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

June, 2007

MCSL-045 : UNIX AND DBMS LAB:

T imea l l owed :2hours Maximum Marks : 50

Nole : There are two parts (UNIX and DBMS) in fhis paper. Each part is for t hour duration.'.Attempt only that part(s) in which you are not success/ul as yet.

PART I

UNIX

Nofe : Answer the following questions. They carry 20 marks and the uiua-uoce is for5 marks.

lowing :

(a) To find out who is logged on to the system and prevent the information from rolling offthe screen.

, (b) To start a Telnet session and- open a connection to the host "Business".

(d) To display first five lines of a file.

(e) To sort the contents of a file in decreasing order.

2. Write a shell script to echo the string length of the given string as argument.- - - - - - o - - - _

3. Write a shell script to display the date, time, usemame and current directory.

t

MCSL.O45PIS1

5

1 0

I

D ' r nI r I r L f r

Downloaded from www.paraman.in

Page 53: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

Note : Answer the following questions.

5 marks.

PART IIDBMS

They carry 20 marks and the uiua-uoce is for

l . Say, WORK (Wid, Wname, Wcost, Wdate) be the schema of work to.be allotted to various

employees by the administrator. Write a statement trigger such that it does not allow the

administrator to perform any database operatiort like Insert, Delete, Update on WORK, on

weekends. 1 0

2. Write a procedure to search the name of work in the relation WORK, given in question 1

1 0above.

MCSL.O45P/S1 4,000

Downloaded from www.paraman.in

Page 54: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

June, 2OO7

MCSL-045 : UNIX AND DBMS LAB

T imea l l owed :2hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 7 hour duration.' Attempt only that part(s) in which you are not successful as yet.

PART I

, UNIX

Note .' Answer the foltowing questions. They carry 20 marks and the uiua-uoce is t'or

1. Write and execute the UNIX commands for the following : g

(a) To create a file 'list of name' and give read and write permission for the file named 'list'

of name' to all users.

(b) To move file from one directory to other directory.

(c) To create a file such that it contains name and phone number of your'friends. Now searchthe created file to find the phone number of any.name in your friends list, stored in thefile.

(d) To compare any two files and show the differences.

(e) To display the calendar of year 2007.

2. Write a shell script to delete all vowels in a text file, vowel.txt, to be created by user. s

3. Write a shell program to check that the string given by a user is a palindrome or not. 10

MCSL.O45P/Sz P . T . O .

Downloaded from www.paraman.in

Page 55: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART II

DBMS

Note : Answer the following questions . They carry 20 marks and the uiua'uoce ts for'

5 marks.

Questions asked in this part are based on the following relations :

EMPLOYEE (E-id, Ename, Esalary, E-DOB)

DEPARTMENT (D-no, E-id, Room-no)

SCALE (Min-Sal, Max-Sal, Grade)

Now answer the following questions.

1. Createa view that displays E-id, Ename, Esalary, Age and Grade of allthe employees. 10

Now make following query on this view :

Displays details of all employees whose age is more than 30 years.

2. .Create a procedure that finds whether an employee id given by the user exists or not. If id

doesn't exist then display "ernployee does not exist"' 70

MCSL-045P/S2 3,000

Downloaded from www.paraman.in

Page 56: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

MCA (Revised)

Term-End Practical Examination

l

Timea l lowed:2hours Maximum Marks : 50

Note : There are two parts (UNIX and DBMS) in this paper. Each part is for 7 hour duration.Attempt only that part(s) in which you are not successful as yet.

PART TUMX

Note t Answer the following questions. They carry 2a marks and the uiua-voce is for5 marks.

l. Write and execute the UNIX commands for the following :

(a) To run a program at lower prioriry.

(b) To list all the information about the files and the directori€s in current directory.

(c) To change the current password of the user to a new password.

(d) To list the details of the largest file in the directory.

(e) To count the number of words in a text file.

2- write a sheli script to count the number of vowels in a string, entered,by user.

3. Write a shell program to create a directory "DISC" in the current directory, then transfer allthe files having filename starting with "d" from the current directory to the directory "DISC". 10.

MCSL-045P/S3 1 ' "

Downloaded from www.paraman.in

Page 57: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART II

DBMS

Note : Answer the following qud;+iaos.' Ihey' ,oiyl 20 marks and the uiua-uoce is for5 marks '

: l l . ' - . i i L . . : i : t l t i { i : , l . i j , " ' , : ' i ' : ' - ' : ' ' ' ' r1 ; ' . ; , r i : l t t ' : : ' i " i i ' t ' i : . ' l } '

l. Say, the schema of the relation Tepcfrgr iF.TEACHER ff-id, T-name, T-Qual, T-salary).

Createa program that updates a ,"cofd inio in" f;i"Ui iable. Trap and handle the exception

if the teacher id (i.e. T-id) is not available in the Teacher table. 10

2. For the schema of the fpletiQgl,]e^gq$er, g!,uen. in*Qli;.create;aihostihnduage block to declare

a cursor for displaying T-id and T-name of all teachers having Qualification (i.e. T-Qual) as.M-TECH'.

i , . : . , , l j i ' ! : . , : , : l : r , r ' . 1 , ' : l ' I

" " t ' t t ' - 1 9

i r

l , . t , l i

MCSU-045P/S3 2,OOO

Downloaded from www.paraman.in

Page 58: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

Tffi Pr l,flxa,rnination

Jurre, 2OO7

' : i i ' r , i : . . ' . , . 1 ; . . , . : :

Time sll,owed : ,2 hours

l1 ""-r: l:

Maxirnarn,Morlcs : 50

'!$o*e : There are two perfs {UNIX and DBMS) rn ihrs pap,eir. Eachporf is .for 7 hawr duratiol.' | t 1 e m t p I ' o n l y t h a t p a r I ( s ) i n w h i c h 9 o . ! a r e n o t s u c c e s s f u I a s y e ! . : : : . : . .

:,

PART I

{mD(

tlo#e I Ansurer the following questions. They carry 2O marks and the uiua-uoce is for5 marks.

t. Wrtte and,execute the,Uhl{X cornrrmnds {or the folloruing :

{a) To place everything that appears on the screen in the log file, including prompts.

(b) To cornbine the two edsting files named filel and file2into a file named "crnbfile".

i(c) To rnerge the contents of two sorted files into a third file strch that the data in the thirdfile is also sorted.

(d) To kill a process with its plD.

(e) To print last five lines of a text file.

2'- 'Write a shell script to find the'G:C.D, (Greatest Common Divisor) of two numbers entered by

the user.

3. Write a shett script which deletes all even numbered lines in a text file and displays the alteredoutput in a separate file. IO

I ' .

"trficst -o45P/s4

Downloaded from www.paraman.in

Page 59: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

PART II

DBMS

Note : Answer the followihg q**tnons tfliefic&rg ?26''marks and the uiua-uoce is for

5 marks.: ' ; ; , : i j 1 r , ' ; ; je ' ; ' i i r ; : ; : i i * . ' ' i i i ' . i r , i { i f i " ' l t : : t : t ' ; r '1 E : " j } $

1. This question is based on the fottowtlg 13piiont,-_.;.r,.u 1,,

Sports-person (Sp*id, Sp-name, Sp-age, Sp-experience, Spgame, Sp-coach)

Sports (Sp-id, Sp-game, Sp-tot-match, Sp-win, Sp-lose)

Salary (Sp-id, W.basii'$piperksr'Sp:gradel' :' :' r' ' - i''

Createa view named 'sports-person-info' that only allows users to view the Sp-id, Sp-name,

.; .Sp game, Sp-tot-match, Sp-win, Sp lose; attributes of the sportsperson' It should not allow

any user to cnunge,/update-any information. 1.0

Z. Refer to the relation given in Question 1 above. Create a host language block to declare a

:-. ,'', cursorfbr displaying"Sp-id, Sp-name of all sportspersons having Sp-gamP as 'SOCCER;:-;8".''

Sp-coach as'CHEEMA'. 70

MCSt-045P/S4' ' : . " : ' , , . ; - 2 "000

Downloaded from www.paraman.in

Page 60: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET-4 No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination 00724

December, 2011

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two sections in this paper. Each section is of 1 hour duration and carry 20 marks. 5 marks is for viva - voce of each section separately. Attempt only that section(s) which is not yet clear.

SECTION - A : UNIX

1. Write Unix command and execute them for performing the following :

(a) To pipe the output of "who" command to the "short" command.

(b) To show the current working directory.

(c) To run a program at lower priority.

(d) To kill more than one process at a time.

(e) To display your current environment variable.

2. Write a shell script - to delete all odd numbered lines in a text file named My Doc.txt.

3. Write a shell script to print sum of digits of a given number i.e. if number is 9263 then the script should print :

9+2+6+3 =20

5

7

8

MCSL-045/ S4

1 P.T.O.

Downloaded from www.paraman.in

Page 61: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SECTION - B DBMS

Note : Answer the following questions :

1. Create a relational database with the following relations and insert ten meaningful data/records in each table of the relation.

Sales-Person (Sid, S_name, Experience, S_Designation, S_product, S-supid)

Sales-Record (Sid, Siarget, S_sold, S_order)

Sales-Salary (S_id, S_basic, S_perks, S_grade, S_salary)

2. Create a view that stores details of all salespersons, who are designated as sales executives and earning more than Rs 20000/- per month, using relations of Q 1.

3. Perform the following queries using the relations created in Q.1. through SQL statements.

List name of all the sales. Persons whose salary is more than Rs. 15000/- per month and did not meet the sales target.

(ii) List the name of all the ''Sr. Sales Executives," whose salary and target are same.

(i)

MCSL-045/ S4

2 2,000

Downloaded from www.paraman.in

Page 62: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET-2 No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination 00369

December, 2011

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two sections in this paper. Each Section is of 1 hour duration and carry 20 marks. 5 marks is for viva - voce of each section separately. Attempt only that section(s), which is not yet clear.

SECTION - A : UNIX

1. Write UNIX commands and execute them for performing the following : 5 (a) To report repeated lines in the file named Repeat.txt. (b) To check the spellings of the words in a file. (c) To reset the password. (d) To display first three lines of a file named UNIX.TXT. (e) To change the ownership of a file.

2. Write a shell script to find out the average of four given numbers. These numbers to be 8 supplied as command line arguments. Print the error if sufficient arguments are not provided.

3. Write a shell script to print the following pattern on screen. A AB ABC ABCD ABCDE

7

MCSL-045/ S2

1 P.T.O.

Downloaded from www.paraman.in

Page 63: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SECTION - B : DBMS

Note : Answer the following questions :

1. Create a relational database with the following relations and insert ten meaningful 6 data/records in each table of the relations HOD (D_id, D_Name, DOB, E_id, Date - of - Joining) Employee (D_id, E_id, name, Designation, specialization) Salary (Eid, Basic, DA, HRA, Perks, gross)

2. Using the schema given above in Q 1 write a procedure to display the names of all the employees whose Department id is 101 and whose gross salary is Rs 50000/- per month and specialization is in "Accounts".

3. Using the schema given above in Q 1, write a trigger that is fired before any row is 3 inserted in the table HOD.

4. Using SQL query perform the followings on relations given in Q1. (i) Find the specialization of the Head of Department id = 107. (ii) Find the gross salary of HOD of Department id = 109. (iii) List the Designation of all the employees in Department id = 110, whose salary is

more than Rs, 20000/- per month.

6

MCSL-045/ S2

2 3,000

Downloaded from www.paraman.in

Page 64: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET - 3 No. of Printed Pages : 2

MCA (Revised)

Term-End Practical Examination 00734

December, 2011

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two sections in this paper. Each section is of 1 hour duration and carry 20 marks. 5 marks is for viva -voce of each section separately. Attempt only that section (s) which is not yet clear.

SECTION - A : UNIX

1. Write the UNIX commands and execute them for performing the following : 5

(a) To connect to a remote machine.

(b) To change the ownership of a file.

(c) To kill a process with its given ID.

(d) To make poster of "WEL COME."

(e) To display the number of lines in a file named mytext.txt.

2. Write a shell script to display current date, time, user name and current directory. 5

3. Write a shell script to find the sum of first 10 elements of the series : 10 1, 4, 9, 16, 25 ,

MCSL-045/ S3

1 P.T.O.

Downloaded from www.paraman.in

Page 65: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SECTION - B : DBMS

Note : Answer the following questions

1. Create an relational database with the following relations and insert ten meaningful 6 data/records in each table of the relation.

Department ( D_ID, Name, T_ID, S_ID)

Teacher (T_ID, Name, Subject, S_ID)

Student (S_ID, D_ID, T_ID, Name, Semester)

2. Perform the following queries using the relation created in Q.1, through SQL statements .

(i) List name of all the students who are registered in Department ID = 101 and

4 whose Teach ID is 505.

(ii) List name of all the teachers whose subject is "Computer" and associated with 5 department ID = 202.

(iii) List name of all the students whose Department ID is 205 but they are taught by Teacher ID = 507.

MCSL-045/S3

2 3,000

Downloaded from www.paraman.in

Page 66: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SET - 1 No. of Printed Pages : 2

MCA (Revised) 04702

Term-End Practical Examination

December, 2011

MCSL-045 : UNIX AND DBMS LAB

Time allowed : 2 hours Maximum Marks : 50

Note : There are two sections in this paper. Each section is of 1 hour duration and carry 20 marks. 5 marks is for viva - voce of each section separately. Attempt only that section(s) which is not yet clear.

SECTION - A : UNIX

1. Write UNIX commands and execute them for performing the following :

(a) To identify the users logged on the system and then sending message from your 5 terminal to any user logged in

(b) To compare any two files and show the differences .

(c) To delete all the files in the current directory whose name ends in ".bak".

(d) To show the current working directory.

(e) To remove a directory.

2. Write a shell script to take a six digit number as input and print the reverse of the 8 number :

Input : 1 2 3 4 5 6

Output : 6 5 4 3 2 1

3. Write a shell script that prints the message "Good Morning", "Good After Noon," or

7 "Good Evening", according to the system's time.

MCSL-045/ S1

1 P.T.O.

Downloaded from www.paraman.in

Page 67: No. of Printed Pages : 2 MCA (Revised) Term-End Practical Examination · PDF file · 2012-05-20MCA (Revised) Term-End Practical Examination ... MCSL-045(P) : UNIX AND DBMS LAB 04083

SECTION - B : DBMS

Note : Answer the following questions :

1. Create a relational data base with the following relations and insert ten meaningful 6 data /records in each table of the relation :

Company (C_id, C_name, P_id, C_Address)

Product (P_id, P_name, P_size, P_price)

Sale (P_id, Area_code, P_target, P_sold)

2. Using the schema given above in Q. 1, write a trigger that is fired before any row is 3 inserted in the table product.

3. Using the relations given in Q1. Write a procedure to display the name of company whose product id =1000 and date of product manufacturing is 01/01/2011.

4. Perform the following queries using the relations created in Q-1, through SQL statements :

(i) List name and address of the companies whose products are sold in area code = 1000.

(ii) Find the company name and the price of the product id = 235.

4

4

3

MCSL-045/ S1

2 5,000

Downloaded from www.paraman.in