2
 SET 1 o. of Printed Pages : 2 MCA Revised) 4702 Term-End Practical Examination December, 2011 MCSL-045 : UNIX AND DBMS LAB Time allowed : 2 hours aximum Marks : 50 Note : here 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 sec tion s) which i s not yet clear. SECTION - A : UNIX 1. Write UNIX com mands an d e xec ute them for performing the f ollowing : a) To ide ntify the users logged on the system and then sending message from your terminal to any user logged in b) To compare any two files and show the differences . c) To delete all the files in th e c urrent directory w hose nam e ends in .bak . d) To show the current working directory. e) To remove a directory. 2 . rite a shell script to take a six digit number as input and print the reverse of the number : Input : 2 3 4 5 6 Output : 6 5 4 3 2 3. rite a shell scrip t that p rints the message G ood Morning , Good A fter Noon, or Good Evening , according to the system's time. MCSL-045/ S1 .T.O.

MCSL-045-S1

Embed Size (px)

DESCRIPTION

question paper

Citation preview

  • 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.

  • 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

    Page 1Page 2