Beruflich Dokumente
Kultur Dokumente
UNIT - MySQL
Q1. Define database. What is DBMS?
Q2. Explain the fool owing Database Models briefly:
a) Relational Data Model
b) Hierarchical Data Model
c) Network Data Model
Q3. Differentiate between
a) Logical and physical data independence
b) DDL and DML
c) Char and Varchar datatype
d) SQL and MySQL
e) GROUPBY and ORDERBY command
Q4. Define the following terms:-
a) Relation b) Attribute c) Tuple d) Degree e) Cardinality
f) Primary Key g) Foreign Key h)Alternate Key i)Candidate Kay
Q5. What is the purpose of:
a) ALTER TABLE command
b) DROP TABLE Command
c) DELETE Command
d) UPDATE Command
e) Distinct clause
f) Between clause
g) LIKE clause
Q6. Write SQL commands for (a) to (f) and Outputs for (g)
BANK
Acc_no CName BName Amount DateofOpen T_Transactions
1 Karan Bank of 15000 1998-01-12 10
Baroda
2 Puneet State Bank 25000 1997-02-01 09
3 Anirban Oriental 17000 1999-07-15 05
Bank
4 Yatin Standard 38000 1999-02-10 11
Charted
5 Sunny StateBank 47000 1998-02-06 15
6 Jayant Uco Bank 34000 1998-08-10 07
7 Nikhil Bank of 56000 1999-01-02 12
Baroda
8 Tarun Oriental 22000 1999-04-04 08
Bank
9 Jisha Uco Bank 34500 1998-01-05 11
a)Display data for customers whose total transactions are between 8 and 11
b) Display data for all customers sorted by the DateofOpen
c) To count the number of customers with amount<30000
d) List minimum and maximum amount from the bank
e) List CName, BName, Amount for all the clients whose amount is<20000
f)Display Acc_No, CName, BName, Total Transactions in descending order of Amount
g)Give output for following
i) Select Avg(Amount) from BANK where Amount<23000;
ii) Select Max(Amount) from BANK Where Amount>30000;
iii) Select Sum(T_Transactions) from BANK;
iv) Select COUNT(DISTINCT BName) from BANK
Q1. Write code for event handler of each of the buttons in following applications:-
Decrement
Q 2. Write code needed to perform the wage calculations as per the following GUI
Enter number of
hours worked Hrs TF
Q3. WAP to input a number if number is greater 10 print square of number .Otherwise print
cube of number. (use if – else )
Roll No Term 1
Q.4.
Name Term 2
Average Term 3
Calculate
Q5. WAP to input day no & print day name (Switch – case )
Q6. WAP to print to multiples of 10 in reverse order (use for, while or do – while).
Q7. WAP to input temperature, Convert in Fahrenheit on clicking Fahrenheit button and
convert in Celsius on clicking Celsius button. (F to C = (temp – 32) / 1.8 and C to F = ( 1.8 *
temp ) + 32)
Q8. Design a GUI application having interface as shown below:
(a) The percentage marks are to be entered in the text field (marksTF) and upon
clicking at the button (calcBTN), corresponding grade(as per following
rules) should be displayed in the label (resultLBL) below command button.
Grade Calculator
You get an A+
Marks % Grade
>=90 A++
80-90 A+
75-80 A
60-75 B
50-60 C
40-50 D
<40 FAIL