CS4: Assignment 2 on Databases

Attempt All questions

PRACTICAL QUESTION ONE

(a) Using a database package create a database file ‘COMPANY’.  Design a table with the following fields; use appropriate data types and appropriate primary key. The field EmpNo should be automatically increase by 1. Enter the following records in a table, save the table as EMPLOYEES.   

  1. Using all the fields in your table, create a query that will return the Gross Salary of each employee. Save the query as Gross Salary.
  2. From the query Gross Salary, create a query that displays all employees who were employed before February 2012 and earn a basic salary of more than UGX 800,000. Save the query as ROYALS.
  3. Create a query for those employees whose names end with letter “a” and working in the department of marketing. Save it as Dept Mar.
  4. Produce a report grouped according to department that extracts the following information from the query in (b) above: EmpNo, Dept, Surname, Basic Salary and Basic Salary. Save it as Gross Report.
  5. Create an input form that can be used to enter data in the table. On the form, add a company logo (use any image from computer or picture from clipart) and save the form as Data Entry Form. Include your name and personal number as page footer.
  6. All employees whose Gross Salary is less than 1,200,000/= are categorized as “Form” while others are categorized as “Substance”. Use a simple if function to determine the category to which each of employee. On your form add a new field Emp Category to work out this.
  7. Create another query to show years spent by employees in this company. Save it as Employee Years.

PRACTICAL QUESTION TWO

2. The table below shows filtered data for KIM INVESTMENTS employees for the year 2019. Using any database management software capture the data and save it as Kim- your name e.g.(KIMLODWAR)

STAFF NO NAME D O B SALARY DURATION COUNTRY HIV STATUS
  Eseza 15.09.1987 250,000 4 Uganda Yes
  Deo 09.04.1999 456,000 6 Burundi No
  Juliet 01.01.2000 342,000 2 Rwanda No
  Mike 30.03.1991 900,000 10 Uganda No
  Nadit 25.12.1996 643,000 5 Rwanda Yes
  Lokwang 06.02.1992 176,900 3 Burundi No
  Saum 19.10.1998 780,000 4 Kenya Yes
  Edgar 14.06.1990 864,000 6 Uganda No
  Santana 12.08.1986 324,500 6 Burundi Yes
  Jemaah 01.03.1997 754,000 7 Kenya No
  Steve 31.07.2001 125,250 15 Uganda No
  Alison 27.01.1998 786,000 5 Rwanda Yes
  1. a) Design a table using the above data and name it “KIM STAFF
  2. b) Set the STAFF NO: field as a primary key with a format of “KIM-000” using the auto number data type.
  • In the above table count the number of records and total salary
  • Format salary field with a UGX currency symbol

c)Design a form from the above table returning all fields, with additional field names of Age, Gross Salary (Salary*Duration), Tax (25% of Gross Salary) and use formula for each and lock your form, name the form as “KIM FORM”

  1. d) Insert a footer as your name with form colour light green to the above form, a title as KIM INVESTMENTS FORM.
  2. e) Design a query to return all fields as in c above and perform the necessary mathematical expressions to return the actual values. Name it KIM QUERY.
  3. f) Create another query from e above and return only the following fields: Staff No, Name, Date of Birth, Salary and Tax to filter out employees who were born before 1995 and name it Before 1995.
  4. g) Using the query in e, create a filtered query for employees from BURUNDI and name it as Foreigners.
  5. h) Design a query called Rich for all employees whose tax rate is above 500,000 using the main query you created.
  6. i) Design a report from the Foreigners query and Name it Transferred
  7. j) Create a query to return names containing 5 characters. Using fields: Staff No, Name, Date of Birth, Salary, Age and Gross Salary. Save it as Five-Char.

PRACTICAL QUESTION THREE

Create a database for Jinja Bridal Car Hire Ltd saved as bridal and carry out the following tasks.

Employee_Name Sex Date_of_Birth Car_Type Employee_ID Remarks
Kalambe Daphine F 1980, 11 – 18 Premio JBCH-200 Good work
Sanjay Hussein M 1978, 02 – 27 Benz JBCH-010  
Kapalaga Michael M 1984, 10 – 30 Premio JBCH-001 Experienced
Nabukera Joan F 1991, 11 – 30 Premio JBCH-019 Time keeper
Sentongo Philip M 1962, 01 – 10 Wish JBCH-180  
Muwanguzi Vivian F 1973, 04 – 01 Premio JBCH-150 Co-opertive
Kato William M 1950, 06 – 02 Wish JBCH-090 Experienced
Walugembe Alex M 1992, 06 – 14 Benz JBCH-060 Time keeper
Okello Stephen M 1982, 01 – 31 Wish JBCH-065 Eratic

Instructions:

(a).   Design a table saved as drivers to hold the above data.

(b).  Using appropriate field, assign a primary key.

(c).  Design a form having a sky-blue background colour, footer of your name you will     use to populate the table. Save the form as Data Entry.

(d).   Design three queries that will return workers who:

(i). have no remarks against their records. Save the query as Not Appraised.

(ii).   drive Car_Type that is not a Wish. Save the query as Not Wish.

(iii). celebrate birth day in the month of January. Save the query as Born Jan.

(e). Create a report to return drivers who drive a premio Car_Type. Save the report as Premio.

(f) Create a report having all the records on one sheet. Save the report as All. The report should have the following details:

(i). A good red line boarder.

(ii). Count of the records it holds                                                                          

(iii). Group and sort your records in order of car_type

(iv). Add a title: MOTO VEHICLES INFORMATION REPORT size 24

(g) Add Header as Your Name and Your Gender as Footer on the report

(h) Add an image on your report to serve as a  logo

(h) Print your queries and report only.

KAKURU BENARD

Kakuru Benard is a distinguished specialist in Digital Learning and teaching. A consultant trainer and researcher in ICTs, computer science and geography, Kakuru has also published books with the Uganda National Curriculum Development Centre, undertaken Interactive and Adaptive Digital Content Creation with Yaaka Digital Network (www.yaaka.cc), digital content creation and optimization for online learning, and digital classrooms in order to help learners and teachers improve at all levels. Since 2015 Kakuru Benard has taught ICT, trained teachers, tutors and lecturers in ICT Integration, multimedia and digital communications and digital pedagogy, helping them to learn and teach better in organizations and schools including Equatorial College School, St Joseph of Nazareth High School, Yaaka Digital Network, as well as Multimedia and 21st Century Skills trainings with Makerere University Department of Journalism and Communication, Brac Uganda, Uganda Christian University, Ultimate Multimedia Consult, Uganda Martyrs University, UNICEF, US Mission and FAWE Uganda. Kakuru Benard is a graduate from Uganda Martyrs University.

Leave a Comment
Share
Published by
KAKURU BENARD

Recent Posts

QUESTION 4

4(a) what are your roles as citizen of Uganda?   (b) Each and every  individual in…

5 months ago

QUESTION 3

3(a) why do we political Eduction in the New Uganda curriculum?    (b) Explain the roles…

5 months ago

QUESTION 2

2(a) Describe the creation story in relation to the origin of man.    (b) Explain why…

5 months ago