Wednesday, October 27, 2010

1. Write a program using VB to make a calculator.

&

a) To find out average minimum and maximum salary of each dept.

b) To find out average maximum and minimum salary of departments where average salary is greater than 2000.

c) To list the minimum salary to various categories of employees.

d) To find the minimum salaries of various categories of employees in various depts.

e) To find the minimum salaries of various categories of employees, department wise such that minimum salary is greater than 1500.


2. Write a Visual basic program to perform the following task.

i) Reverse a string.

ii) Determine whether the given string is palindrome or not.

iii) Find out whether given no is prime.

&

i) Retrieve emp name and job who have the same job as that of allen?

ii) List all emp name and their job of those depts. That are located at Chicago?

iii) List all emp name and sal whose sal is greater then that of all managers?


3. Write a Visual basic program to perform the following task.

i) Find the power of a given number.

ii) Determine that weather a given number is Armstrong.

iii) Display the table of a given number

iv) Arithmetic operations.

&

a) To list all employees whose name begins with ‘J’.

b) To list employees whose name begins with ‘J’ and has ‘N’ as the third character

c) To list all employees not entitled for commission.

d) To list all employees who receive commission.

e) To list employees working in dept no 10 or 20.

f) To list employees hired after 01-jan-81 and working in dept no. 10

g) To list employees working in dept other than 10.

4. Create a visual basic project that will either convert U. S. dollars into a foreign currency or convert a foreign currency into U. S. dollars.

The foreign currencies and their U. S. dollar equivalents are:

1 U. S. dollar = 0.6 British pounds

1.4 canadian dollars

6.8 Frech francs

2.0 German marks

2000 Italian lira

100 Japanese yen

9.5 Mexican pesos

1.6 Swiss francs

Your project should include two option buttons within a frame, to select either U. S. to foreign conversion or foreign to U. S. conversion. Nine additional option buttons should be placed within another frame to select the particular foreign currency. Use a text box to specify a given amount of money in the source currency, and another text box to display the equivalent amount of money in the target currency. Include an appropriate set of labels for each conversion type.

&

a) To find the total number of employees.

b) To find the total number of clerk hired after 13-jan-81.

c) To find the sum paid as salary to all employees every month.

d) To find the yearly compensation paid to all sales men.


5. Create a table STUDENT which has different fields like name, roll no, class, div, branch , subjects and percentage. Write a visual basic project for student data base to ADD, EDIT, MODIFY & DELETE the records in STUDENT table.

Also perform the following opereations:

· Display record of particular student.

· Display list of student percentagewise.


6. Create a visual basic project for Bank transation. Create required table first. Perform the ADD, EDIT, MODIFY & DELETE operations.

Also perform the following opereations:

  • Deposit an amount.
  • Display the balance.
  • Withdraw an amount.
  • Find the name of customer whose balance is NULL.


7. Create a visual basic project for income tax calculation. Create necessary table. Perform the ADD, EDIT, MODIFY & DELETE operations.

Also perform the following opereations:

· Calculate the income tax.

· Display the list of people who didn’t pays the tax yet.

8. Write a visual basic program that will rearrange a list of names into alphabetical order. To do so, enter the names into a one-dimensional string array, with each element represent one complete name. The list of names can then be alphabetized in the same manner that a list of numbers is rearranged from smallest to largest.

&

h) To select all rows from dept table.

i) To list dept number from emp table

j) To list distinct value from emp table.

k) To list all employees working in dept 10 from emp table.

l) To list all employees whose salary is greater than or equal to 10000.

m) To list names and salary of all employees whose salary is between 1000 and 15000 including 10000 and 15000.

n) To list all the employees hired during the year 2005

o) To get all employees from dept 10 and 20.


9. Create a table EMP which has the following fields Empno, Ename, deptno, job, hiredate. Write a visual basic project for employee Database to ADD, EDIT, MODIFY & DELETE the records in EMP table.

Also perform the following opereations:

· List all employee of dept. no 10.

· List all manager.

· Display the record of a given empno.


10.

Q-1> Write a query in sql to create a table employee and department.

EmployeeIT(empno,ename,deptno,job,hiredate)

DeptIT(deptno,dname,loc)

Include the following constraints on column of emp table.

a) to make the empno as primary key of the table and

b) to ensure that the ename column does not contain NULL values and

c) the job column to have only UPPERCASE entries and

d) to put the current date as default date in hire date column in case data is not supplied for the column.

Include the following constraints on column of dept table.

a) to make deptno as primary key.

b) to ensure dname,loc coloumns does not contain NULL values

Also enforce REFERENTIAL INTEGRITY, declare deptno field of dept table as primary key and deptno field of emp table as foreign key.

Q-2> Modify the above table to add three more columns salary,mgr,comm to the emp table. add salary column with constraint greater than zero and modify the width of sal column.

Q-3> Insert following values in employee table.

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO

7369 SMITH CLERK 7902 17-DEC-80 800 20

7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30

7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30

7566 JONES MANAGER 839 02-APR-81 2975 20

7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30

7698 BLAKE MANAGER 7839 01-MAY-81 2850 30

7782 CLARK MANAGER 7839 09-JUN-81 2450 10

7788 SCOTT ANALYST 7566 19-APR-87 3000 20

7839 KING PRESIDENT 17-NOV-81 5000 10

7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30

7876 ADAMS CLERK 7788 23-MAY-87 1100 20

7900 JAMES CLERK 7698 03-DEC-81 950 30

7902 FORD ANALYST 7566 03-DEC-81 3000 20

7934 MILLER CLERK 7782 23-JAN-82 1300 10

Q-4> Edit the commission of JONES to 1000.

Q-5> Retrieve all rows of employee table.

Q-6> Delete row from employee table where deptno is 10.

Q-7> Delete all rows from employee table then Drop the emp table.

11.

Q-1> Create a table client master with the following fields client_no, name, address1, address2, city, state, pin_code, remarks, balance due and add the constraints?

  • Create a primary key constraint on the column client_no.?
  • create the following check constraints

àData values being inserted into the column client_no must start with ‘c’.

à Data values being inserted into the column name should be allowed in upper case only?

Q-2> Insert five rows in the table client master?

Q-3> Show all rows of client master?

Q-4> Add a new column in your table : AGE ?

Q-5> Update the table client master ?

Q-6> Delete a row from client master where age is greater then 60?

Q.7> Create table supplymaster (supplierno,suplliername,address1,address2,city,state,

pincode,remarks,baldue) by using clientmaster.

Q.8> Insert values in table supplymaster by using clientmaster.

Q-9> Drop table client master?

Lecture PPTs of MIS , Module 4 to Module 6

 Module 4 Social Computing (SC): Web 3.0 , SC in business-shopping, Marketing, Operational and Analytic CRM, E-business and E-commerce B2B B...