LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
SIXTH SEMESTER – APRIL 2012
CS 6609/CA 6609 – WEB PROGRAMMING WITH PHP & MYSQL – THEORY
Date : 16-04-2012 Dept. No. Max. : 100 Marks
Time : 1:00 – 4:00
PART – A
Answer ALL the Questions (10 x 2 = 20)
- What is PHP? What it is used for?
- Give the difference between conditional statements and loops.
- Define PHP session variable.
- State the uses of explode() & implode().
- Differentiate Primary Key and Foreign Key.
- State the three levels of Architecture.
- Give the uses of MySQL.
- State the use of Group By clause with an example.
- Differentiate DATE_FORMAT() and TIME_FORMAT().
- Give any four numeric functions used to format the query output.
PART – B
Answer ALL the Questions (5 x 8 = 40)
- (a) Define a variable. Give the rules for defining variables in PHP. Give examples.
(b) Explain the conditional statements in PHP with an example code.
- (a) Define Cookies. Give its uses. Discuss about setting, deleting and retrieving cookies.
(b) Define Arrays. Explain the types of arrays with examples.
- (a) Write notes on Integrity Constraints with examples.
(b) Solve the following queries for the table Purchase (bill-no, bill-date, item-name, quantity, unit-
price, amount, customer-id)
(i) List all items which starts with SO.
(ii) Find the total purchase amount of a given customer-id on the current date.
(iii) Retrieve all bill details of the purchase made on the current date.
(iv) Replace the item-name as ‘Wheat’ which has been Mis-spelled as ‘Cheat’.
- (a) Write short notes on Sub Queries and Set Operators.
(b) Explain with examples of Creating and populating a Database. Also explain Aggregate functions.
- (a) Write a code to connect to mySQL and select a database.
(b) Discuss about error handling in PHP.
PART – C
Answer Any TWO Questions: (2 x 20 = 40)
- (a) Explain the difference between for and foreach loop with examples.
(b) Define files. Explain the various modes of opening a file. Write a code to open and read the
contents of a file.
- (a) Explain sorting and filtering in mysql with examples.
(b) Write short notes on Full text searching in MySQL.
- (a) Define 1NF,2NF, 3NF and BCNF.
(b) Explain the functions involved in executing and retrieving query results.
Latest Govt Job & Exam Updates: