Sunteți pe pagina 1din 4

MIS Course 2012

MS-Access Hands-on

Hands-On MS-Access Please logon to your Windows account and open MS-Access under MS-Office. Open a New blank database. Save it in your folder in MANDARA with the database name as EMP_DB. PART-A Create the following tables based on the structure given. The fields that are primary keys in the respective tables are indicated. Accordingly make them the primary keys in the tables. EMP TABLE EMPNO ENAME JOB MGR HIREDATE SALARY COMMISSION DEPTNO DEPT TABLE DEPTNO DNAME PROJ TABLE PROJNO PNAME BUDGET LOC NUMBER TEXT CURRENCY TEXT PRIMARY KEY (IN MILLIONS) NUMBER TEXT PRIMARY KEY NUMBER TEXT TEXT NUMBER DATE CURRENCY CURRENCY NUMBER PRIMARY KEY

Enter the following records given in the next page as per the tables indicated

MIS Course 2012

MS-Access Hands-on

EMPLOYEE TABLE EMPNO ENAME 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 Manohar Arya Raashi Sharma Shabana Parveen

JOB

MGR

HIRE DATE*

SALARY 88000 21760 26780 21970 68000 56000 23450 31800 47000 32800 78000 24500 38000 32000 31000 34560 22450 23450 34560

COMM 99000 0 17600

DEPTNO 110 120 130 110 120 120 110 110 120 120 130 120 110 120 130 130 110 120 130 110

PROJ-MGR DEVELOPER SR. DEVELOPER Indrani S TEST Sudhir Prasad PROJ-MGR Bhaskar Rao ARCHITECT Srikanta M S TEST Satish Naik LEAD TEST Meera Raghavan PROJ.LEAD Vijaya C K SR. DEVELOPER Dipesh Mehta PROJ-MGR Arun Chawla TEST Piyush Patel PROJ.LEAD G Rajashekhar LEAD TEST Ganesh D ARCHITECT Amir Ali LEAD TEST Naveen Paul TEST Sonali Mohanty DEVELOPER Mohd. Shariff SR. DEVELOPER Shubhangi Bose LEAD TEST * Please enter the HIREDATE less than DEPT DEPTNO 110 120 130 140 PROJ PROJNO 1 2 3 4 5

1115 1121 1111 1115 1111 1111 1115 1115

22000 12000 0 15000 34000 23980 46890 0 22000 19750 18770 0 0 17000 0

1115 1111 1115 1121 1121 1111 1115 1121

1111 29000 todays date for all employees.

DNAME APPL-ENGG REQUIREMENTS-DESIGN TESTING-IMPL GLOBAL-DELIVERY

PNAME ABN-AMRO CITIBANK HSBC ANZ TELSTAR

BUDGET 80.5 110.10 150.5 72.5 100.00

LOCATION MYSORE BANGALORE MYSORE BANGALORE CHENNAI

MIS Course 2012

MS-Access Hands-on

PART-B 1. Use the Relationship option Database Tools to create relationship between the three tables as appropriate. 2. Now use the Query Option to get the following output(s). Store each query in your database. List all employee names, numbers and departments. List the names and departments of all the employees who are managers. List the columns DNAME and DEPTNO from the table DEPT List all the jobs in the table EMP List all the unique jobs in the table EMPS List information about employees in Department 130. List the names, numbers and departments of all TEST. Find all department names with department numbers greater than 120. Find all employees whose commission exceeds their salary. Find all employees in department 130 whose salary is greater than or equal to 25000. Find all employees who are either managers or have a salary greater than 30000. List information about employees in department 110 who are not managers or test. Find employees who are earning between 22000 and 30000 inclusive of both. List names and department numbers of employees who are test, architects or developers. List jobs and departments of employees whose names begin with M or S. List employees and jobs in department 110 and 120 in order of their salary. Set the salaries of all developers equal to 1:1 times the average salary of developers. Assign Naveen Paul to TESTING-IMPL staff and give him 10% raise in salary. Give 15% raise to all architects in department 120. Delete the record of INDRANI S from the BONUS table. Add a new PROJNO column to EMP table. Assign the projects to the employees as below: EMPNO 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 PROJNO 1 2 3 1 2 2 1 1 2 2 3

MIS Course 2012

MS-Access Hands-on

1121 1122 1123 1124 1125 1126 1127 1128 1129 1130

5 2 1 2 5 4 1 2 4 5

3. List employees with either the same job as SHUBHANGI, or as salary greater than or equal to VIJAYA C Ks in order by job and salary. 4. List employees in dept.110 with the same job as anyone in the TESTING dept. 5. Find all the employees who earn more than the average salary of employees in their own departments, and list them, in department order. 6. Display information about employees who have at least one other employee reporting to them. 7. List each EMPLOYEE and the PROJECT and LOCATION where they work. 8. List developers in descending order of their commission divide by their salary. 9. Count the number of different jobs held by employees in department 130. 10. Count the number of employees not belonging to department 130. 11. List the name and year of hire for each project member. 12. List the locations where the budget for the projects exceeds 75 million. 13. List the employees who are working for the TELSTAR project. 14. List the names of employees who work in locations in the Chennai region.

S-ar putea să vă placă și