- Answer the following questions:
(a) Expand the terms OSS and W3C.(2 Marks)
(b) What are the following software used for? (2 Marks)
(i) PHP
(ii) MySQL
(c) Name any four application areas of databases. (2 Marks)
(d) What are the different types of relationships that can be depicted through an ER model? Explain the concept of ER Model using the case study of a Ticket Reservation System that has three entities Ticket, Passenger and Train. Assume that each passenger can buy more than one ticket. (4 Marks)
- Answer the following questions: (2 Marks)
(a) Differentiate between the For ...Next and For Each ...Next loop of Visual Basic giving a suitable example of each.
(b) Name and explain the usage of any two types of modules available in Visual Basic. (2 Marks)
(c) What are data-aware controls? Name any two ActiveX data aware controls that can be used on a form. (2 Marks)
(d) Explain the term ADO object model. Differentiate between the Connection Timeout and Command Timeout properties of the Connection object.(4 Marks)
- Answer the following question :
(a) Differentiate between row-level and statement-level triggers. (2 Marks)
(b) Define the terms Candidate key and foreign key with respect to a database. (2 Marks)(c) Differentiate between DDL and DML commands. Give one example of each type of command.
(2 Marks)
(d) Mentions any two advantages of PL\SQL as compared to SQL. (2 Marks)
(e) Name the keyword used to (2 Marks)
(i) Allow duplicate rows in a query
(ii) Avoid duplicate rows in a query.
- Read the following case study and answer the questions that follow:
Mr. presi of Super Store decided to computerize the billing department. The accounts manager at Super store is creating billing software to generate the bill during the sale period. A new bill is generated for each item sold. The discount is given based on the item category. An additional discount of 5% is given to the store Membership Card holders. The following is the data entry screen used at the store:
The list of controls for the above form is as follows:
- Write the code for the Cmd Clear command button to clear all the textboxes
Except the Txt Bill Date textbox. (1 Marks)
(b) Write the code for the form load event of Form Bill so as to:(2 Marks)
(i) Display the system date in the Txt Bill date text box.
(ii) Disable the Txt Bill Date, Txt Disc and Txt Final textboxes.
(c) Write the code for the change event of the Txt Price textbox to ensure that the user does not enter a negative of a zero value. If a negative or a zero value is entered then the text box should be made blank and a warning message should be displayed. (3 Marks)
(e) Write the code for the Cmd Calc command button to display the discount and final price in the Txt Disc and Txt Final textboxes respectively. Note that Final price is calculated as price - discount and the discount is calculated based on the category and price according to the following table. Also remember to give an additional 5 % discount for membership card holders i.e. if the Chkmember checkbox is checked. (4 Marks)
Answer the following questions:
(a) Find the errors from the following code segment and rewrite the corrected Code Underlining the correction made. (2 Marks)
Private Function Is prime (num As Integer) As Bool
Dim Limit as Integer
Limit = num /2
For ctr = 2 To limit
If num modulo ctr = 0 Then
Exit for Loop
End If
Next
Is Prime = IIf (ctr > limit, True, False)
End Sub
(b) Find the output of the following code :(2 Marks)
Dim astr as string
Dim I as Integer
I = 1
Astr = "Come"
DO while I <= Len (astr)
Print Mid (astr, I)
I = I +1
Loop
(c) Rewrite the following code using If then Else construct without affecting the Output: (2 Marks)
Dim a as Integer
a = 1
Select Case a
Case 1
Print "Sunday"
Case 2 to 6
Print "weekday"
Case 7
Print "Nearing weekend"
End select
(e) Write a visual basic procedure that takes a number as argument and displays
The sum of all the digits in the number. For example, if the argument passed is 354, the procedure should display 12 (i.e. 3+5+4) (4 Marks)
Informatics Practices 2010 Question Papers Class XII