MS AccessHandsOn2012 2

Embed Size (px)

Citation preview

  • 7/28/2019 MS AccessHandsOn2012 2

    1/4

    MIS Course 2012 MS-Access Hands-on

    1

    Hands-On MS-Access

    Please logon to your Windows account and open MS-Access under MS-Office. Open aNew 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 primarykeys in the respective tables are indicated. Accordingly make them the primary keys

    in the tables.

    EMP TABLE

    EMPNO NUMBER PRIMARY KEYENAME TEXT

    JOB TEXT

    MGR NUMBER

    HIREDATE DATESALARY CURRENCY

    COMMISSION CURRENCYDEPTNO NUMBER

    DEPT TABLE

    DEPTNO NUMBER PRIMARY KEYDNAME TEXT

    PROJ TABLE

    PROJNO NUMBER PRIMARY KEYPNAME TEXTBUDGET CURRENCY (IN MILLIONS)LOC TEXT

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

  • 7/28/2019 MS AccessHandsOn2012 2

    2/4

    MIS Course 2012 MS-Access Hands-on

    2

    EMPLOYEE TABLE

    EMPNO ENAME JOB MGR HIRE

    DATE*

    SALARY COMM DEPTNO

    1111 Manohar Arya PROJ-MGR 88000 99000 110

    1112 Raashi Sharma DEVELOPER 1115 21760 0 120

    1113 Shabana Parveen SR.DEVELOPER

    1121 26780 17600 130

    1114 Indrani S TEST 1111 21970 110

    1115 Sudhir Prasad PROJ-MGR 68000 22000 120

    1116 Bhaskar Rao ARCHITECT 1115 56000 12000 120

    1117 Srikanta M S TEST 1111 23450 0 110

    1118 Satish Naik LEAD TEST 1111 31800 15000 110

    1119 Meera Raghavan PROJ.LEAD 1115 47000 34000 120

    1120 Vijaya C K SR.

    DEVELOPER

    1115 32800 23980 120

    1121 Dipesh Mehta PROJ-MGR 78000 46890 130

    1122 Arun Chawla TEST 1115 24500 0 120

    1123 Piyush Patel PROJ.LEAD 1111 38000 22000 1101124 G Rajashekhar LEAD TEST 1115 32000 19750 120

    1125 Ganesh D ARCHITECT 1121 31000 130

    1126 Amir Ali LEAD TEST 1121 34560 18770 130

    1127 Naveen Paul TEST 1111 22450 0 110

    1128 Sonali Mohanty DEVELOPER 1115 23450 0 120

    1129 Mohd. Shariff SR.DEVELOPER

    1121 34560 17000 130

    1130 Shubhangi Bose LEAD TEST 1111 29000 0 110

    * Please enter the HIREDATE less than todays date for all employees.

    DEPT

    DEPTNO DNAME

    110 APPL-ENGG

    120 REQUIREMENTS-DESIGN

    130 TESTING-IMPL

    140 GLOBAL-DELIVERY

    PROJ

    PROJNO PNAME BUDGET LOCATION

    1 ABN-AMRO 80.5 MYSORE

    2 CITIBANK 110.10 BANGALORE

    3 HSBC 150.5 MYSORE

    4 ANZ 72.5 BANGALORE

    5 TELSTAR 100.00 CHENNAI

  • 7/28/2019 MS AccessHandsOn2012 2

    3/4

    MIS Course 2012 MS-Access Hands-on

    3

    PART-B

    1. Use the Relationship option Database Tools to create relationship between thethree tables as appropriate.

    2. Now use the Query Option to get the following output(s). Store each query inyour 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 inclusiveof 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 orS.

    List employees and jobs in department 110 and 120 in order of theirsalary.

    Set the salaries of all developers equal to 1:1 times the average salaryof developers.

    Assign Naveen Paul to TESTING-IMPL staff and give him 10% raise insalary.

    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 PROJNO

    1111 1

    1112 2

    1113 3

    1114 1

    1115 2

    1116 2

    1117 1

    1118 1

    1119 2

    1120 2

  • 7/28/2019 MS AccessHandsOn2012 2

    4/4

    MIS Course 2012 MS-Access Hands-on

    4

    1121 5

    1122 2

    1123 1

    1124 2

    1125 5

    1126 4

    1127 11128 2

    1129 4

    1130 5

    3. List employees with either the same job as SHUBHANGI, or as salary greaterthan 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.