Sie sind auf Seite 1von 4

MS ACCESS ASSIGNMENT

Q1 A health center provides health services to outdoor patients visiting the clinic. The
database consists of two tables that have been described below:

Patients info.

Field Name Data Type


Identification of Patient (Primary Key) Text ; 5
First Name of Patient Text : 20
Gender(M/F) Text : list
Date of Birth Date/time
Phone no Number: decimal

Consultation info.

Field Name Data Type


Identity of Patient (Foreign key) Text ; 5
Date of Consultation Date/time
Fee Received Currency
Diagnosis(Fever/diabetes/ asthma) Text : list
Enter values before moving to creating relationship

(Identity of Patient and Date of consultation together constitute the composite key for
consultation)
Required:
Create database named as Jeevan Mala for the health center.
Establish and implement referential integrity between fields of tables(2 marks)
Incorporate a constraint to specify that the consultation fee is not more than
Rs.2000 per patient per day.
Use input mask 00000-00000 to enter the phone numbers.
Create a query that retrieves name of the patient ,date of consultation , the
consultation fee paid and the diagnosis of a particular patient
Create a query that retrieves name of the patient Starting with A
Create a form to enter values in patient id, first name, date of consultation,
fees and diagonsis
create a report that retrieves id of patient ,date of birth, diagnosis ,fees

Q2 A library maintains a database of the books and readers contained in three tables as
follows:
Book Info.

Field Description
Book Code Identification of Book (Primary Key)
Book Name Name of the book
Subject Subject Name
Student Info

Field Description
Student Code Identity of student (Primary key)
Student Name Name of the student
Class (Commerce, Science, Arts)
Issue Info.

Field Description
Book Code Identification of book (Foreign Key)
Student Code Identity of student (Foreign Key)
Month of Issue (July to march)
Year of Issue 2002 to 2006
(All the four fields of Issue info table constitute a composite Key)
Required:
Create database named D followed by your university roll no.
Establish and implement referential integrity between fields of tables
Create a query that retrieves names of the students, books, and subjects
and month. Enter a criterion which ensures the records are of July Month only.
Create a report containing the information of book id, book name, student
id, student name, month and year of issue.

Q3 Alpha Ltd. maintains a database of its employees as follows:

Employee Info.

Field Data Type Description


ECode Text (Width:4) Identification of employee (Primary Key)
EName Text (Width:10) First Name of employee
EAddress Memo Address of the employees
EGender Text M=Male, F=Female
EDate of Birth Date/Time Date of Birth of employees
EPhone 10 digit unique number

Salary Info.
Field Data Type Description
ECode Text (Width:4) Identity of employee (Foreign key)
Msal paid Text: List Month of salary paid(from January to December)
Ysal paid Text: List Year of salary paid (2006,2007,2008)
Basic Currency Basic Pay of the employee
HRA 30% of Basic Pay
DA 50% of Basic Pay
Gross Pay
Leave Record
Field Data Type Description
ECode Text (Width:4) Identity of employee (Foreign key)
Date of leave Date/Time
No of days of leave number
(Identity of Employee, year of salary paid and month of salary paid of Salary Info.
together constitute the composite key for Salary Info.)
Required:
Create database named Alpha.
Establish and implement referential integrity between fields of tables
Employees date of birth must be between01/01/1985 and 31/12/1994
Incorporate a constraint to specify that the basic salary is s not below
Rs.12000 per month.
Create a query that retrieves EId, name of the employee, basic ,HRA, DA,
gross pay, PF deduction 10% of basic Pay, Tax deductions 15% of (Gross
PF) and net salary of a particular employee
Create the above query with two constraints that the name should start
with A and the basic pay is more than Rs.20000.
Create a query joining report that retrieves EID, Name, Date of leave and
date of joining. Write salutation words like Sir or Madam against the
employee name.
Create a form to enter values in salary info table
Prepare salary report, and joining report of the employees for their salary.

Q4 Dink Ltd. maintains a database to store pay details of its employees using the following
two tables:
Employee
Field Data Type Description
Empcode Text (Width:4) Identification of employee (Primary Key)
Nemployee Text (Width:20) Name of employee
Department Lookup wizard (finance, marketing, human resource)
Experience Byte Year of experience

Pay Details
Field Data Type Description
Empcode Text (Width:4) Identification of employee (Foreign Key)
Bpay Currency Basic pay for the month

Required:
Create a database named D Ltd.. That contains above tables with
referential integrity constraints established.
Enter records of four employees.
While entering the data in pay details table, it must be ensured that the
basic pay does not exceed Rs.50000.
Design a query to calculate bonus paid to employees on the basis of their
experience as:
Experience Bonus
Up to 5 years 10000( if is used)
Above that 20000
Prepare a Form that is used for entering the data pertaining to employees in
appropriate table.

Das könnte Ihnen auch gefallen