0% found this document useful (0 votes)
79 views16 pages

Axxess Questions

The document contains 6 questions about creating databases in MS Access. Question 1 involves creating a Student database with various fields and constraints. Question 2 involves creating an Employee database with referential integrity. Question 3 involves creating a Student-Course database. Question 4 involves creating a Patient-Test database. Question 5 involves creating an Employee-Pay database. Question 6 involves creating an Employee-Leave database. For each question, requirements include creating the relevant tables, entering sample data, and writing queries to retrieve or analyze the data.

Uploaded by

Anushka Gehlot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views16 pages

Axxess Questions

The document contains 6 questions about creating databases in MS Access. Question 1 involves creating a Student database with various fields and constraints. Question 2 involves creating an Employee database with referential integrity. Question 3 involves creating a Student-Course database. Question 4 involves creating a Patient-Test database. Question 5 involves creating an Employee-Pay database. Question 6 involves creating an Employee-Leave database. For each question, requirements include creating the relevant tables, entering sample data, and writing queries to retrieve or analyze the data.

Uploaded by

Anushka Gehlot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

MS Access Questions

Ques 1:
Create a student database with the following constraints established:
Student:
Field name Data Type Field Size
Student _ID Text 4
Student_Name Text 50
Address Memo
City Text 20
Phone No Number

 Save the table as “Student”


 For Student _Name, use the Caption as “Student Name”.
 For City, use property “Default” value as “New Delhi”
 For Phone No. Use “Input Mask” as “+91-”0000000000. Select the suitable
field size.
 Gender- Apply Lookup Wizard.
 DOB: Set Format as long date, Validation rule- “should be born after 05 jan
1990”, Validation Text- "Not eligible because of over age"
 Male- Yes/No
Insert following fields-
 Marks In 5 Subjects - Use the “Validation rule”-marks should not be greater
than 100. This field should be “Required”; Decimal places- 2, Validation Text
“marks should not be greater than 100”.
 Total marks of the student.
 Percentage of the student.
Create a query to find all the female employees
Create a query to find out Male students.

1
Ques 2 :
M/s Alpha Ltd. maintains database of its employees. The details of two tables given
below

Employees
Description
Identity of Employee(pk)
Name of Employee
Date of Birth
Address
Basic salary
Department Identification(fk)
Category (A/B/C)
Department
Description
Identity of Department(pk)
Name of Department

Required:
 Create a database named as Payroll that contains above tables with
referential integrity constraints.
 Ensure that the date of birth of employee is not after 1-Apr-1986. Give a
suitable message if this condition/constraint is violated.
 Incorporate a constraint to specify that the basic salary is between 10000
and 50000 per month. And make it a required property.
 Insert a new field- HRA in employee table. Data Type – Calculated. For
employees of
 Category “A”, HRA is 1600

 Category “B”, HRA is 1200

 Category “C”, HRA is 1000

Create and execute queries that retrieves


1. Employee names
2. Employee names in ascending order
3. Employee names in descending order
4. Employees whose names starts with A.
5. Employees whose name ends with A
6. Employees whose name starts with A and ends with T
7. Employees whose name starts with AM
8. Employees whose name starts with A or R.
2
9. Employees whose name starts with A or ends with A.
10.Employees whose name ends with T or A
11. Employee names with address.
12. Employees from New Delhi
13. Employees from Goa or Punjab.
14. Employees whose name starts with A and ends with T and
belongs to New Delhi
15. Employee whose name starts with R or who belong to New
Delhi
16. Employee names with date of birth
17. Employees who are born aft er 03-jan-1970
18. Employees whose basic salary is greater than 20000
19. Employees in human resource department.
20. Employees whose name starts with A and are in human
resource department.
21. Employees whose name starts with A or are in marketi ng
department
22. Employees whose basic salary is greater than 10000 and
belongs to marketi ng department.
23. Employees whose basic salary is greater than 20000 or who
belongs to fi nance department.
24. Employees whose names starts with R, basic salary is less
than 10000 or employees belonging to New Delhi.
25. Calculate provident fund of employee @ 10% of basic salary.
26. Identi fi cati on of Employee, their names, the date of birth and
the department that he belongs to.

3
Ques 3.
A database is maintained to store various data items using the following
two tables:
Students
Description
Identity of Student (Primary Key)
Name of Students
Identity of Course (Foreign Key)
Courses
Description
Identity of Course (Primary Key)
Name of Course
Course fees
Required:
 Create a database that contains above tables with referential
integrity constraints established.
 Enter records of three courses and four students, each of whom belongs to
one of these courses
 While entering the data in course table, it must be ensured that the course
fee does not exceed Rs.10000.
 Create a query to find out the student id, their names and the course in
which they are studying.
 Prepare a Form that is used for entering the data pertaining to students in
appropriate table.

4
Ques 4:
A clinic operates a laboratory that conducts various types of pathological
tests on patients visiting the clinic. The database consists of two tables that have
been described below:
Patients
Description
Identification of Patient (primary key)
First Name of Patient
Middle Name of Patient
Last Name of Patient
Date of Birth
Test Results
Description
Identity of Patient (foreign key)
Identity of Test (foreign key)
Date of Test
Result of Test
(Identity of patient , identity of test and date of test together constitute the composite
key for test results table)
Test types
Description
Identity of Test (primary key)
Name of Test
Test charges
Required:
 Create database for a clinic that has a pathological laboratory.
 Establish and implement referential integrity between fields of tables.
 Enter 4 records in all the tables.
 Incorporate a constraint to specify that laboratory does not charge more
than Rs.250 for any test that conducted in the laboratory
 Generate a Form that is capable of entering data of patients test
results in Test Results table
 Write and execute SQL statement that retrieve date of test, name of test
and charges paid by a particular patient.
 Create a query that retrieves date of test, name of the test, patient name
and the charges paid by the patients, 20% of fee as Tax and Net amount
which is amount received – Tax.

5
 Prepare a report which shows identification of Patient, First Name of
Patient, Identification of Test, Name of test, fee and its result. Groupings
should be based on Name of Test.

Ques 5.
M/s Alpha Ltd. maintains database of its employees the details of two tables of
which is given below:

Employees
Description
Identity of Employee ( primary key)
Name of Employee
Date of Birth

PayDetails
Description
Identity of Employee (foreign key)
Basic Pay for Month
Numeric value of month (foreign key)

Months
Description
Numeric value of month (Primary Key)
Name of month
(Identity of employee and numeric value of month together constitute the
composite key for pay details table)

Required:
 Create a database named as Payroll that contains above tables with
referential integrity constraints.
 Ensure that the date of birth of employee is not after 1-Apr-1986. Give a
suitable message if this condition/constraint is violated.
 Enter six record of month, three records of employees with their pay
details for two different months.
 Create and execute a query that retrieves Identification of Employee,
their names, the date of birth and the basic pay for the month of April.

6
Ques 6:
M/s HLK Ltd. stores the data as to the leave taken by its employees in the
database consisting of two tables with following:

Employee
Description
Identity of Employee (primary key)
Name of Employee
Date of Joining the Firm

Leave Record
Description
Identity of Employee (foreign key)
Date of Leave
Type of Leave: (1=Casual,2=Earned, 3=Medical)
Number of Days
(Identity of employee and date of leave together constitute the composite key
for leave record table)

Required:
 Create a database named as that contains above tables with
referential integrity constraints.
 Ensure that the date of joining the firm for an employee is not
after 1-Apr-1986. Give a suitable message if this condition/constraint is
violated.
 Enter six records for leave, three records of employees for the three
different type of leave.
 Create and execute a query that prepares a list of employees with
their names, the days of leave and the expected date of joining after
expiry of leave.

7
Ques 7.
M/s Alpha Ltd. maintains database of its employees the details of two tables of
which is given below:

Accounts
Description
Identity of Account (Primary Key)
Name of Account

Vouchers
Description
Identity of Voucher (Primary Key)
Account Debited (foreign key )
Account Credited (foreign key )
Amount
Narration
Date of Transaction

Required:
 Create a database named as Accounts that contains above tables with
referential integrity constraints.
 Ensure that the date of transaction falls within the financial year 2004-
05. Give a suitable message if this condition/constraint is violated.
 Enter six records for Accounts and four records of vouchers for simple
accounting transactions.
 Set look up property to ensure that the records entered in vouchers table
are entered using list box created through accounts table.
 Create and execute SQL statement that retrieves a set of account that have
been debited with their account name and amount of transaction.
 Design a form that is capable of entering transactions into vouchers table.
 Create report to display : name of account, account debited, account
credited and amount of transaction .

8
Ques 8.
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 info
Field Data Type Description
ECode Text (Width: 4) Identity of employee (Foreign Key)
Date of leave Date/Time (Identity
No. of days of leave Number of
Employee,
year of salary paid and month of salary paid of Salary Info. together constitute the
composite key for Salary Info.)
(ECode and Date of Leave together constitute the composite key for the leave info table.)
Required:
 Create database named Alpha Ltd.
 Establish and implement referential integrity between fields of tables
 Employees date of birth must be between 01/01/1985 and 31/12/1994
 Incorporate a constraint to specify that the basic salary is not below Rs.12000 per month.

9
 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 report of the employees for
their salary

Ques 9.
A health center provides health services to outdoor patients visiting the clinic. The
database consists of two tables that have been described below:
Patient’s 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

(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
 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 form with sub form to enter values in the respective tables.

10
Ques 10.

A library maintains a database of students as follows:


Book Info.
Field Data Type Description
BCode Text (Width:4) Identification of Book (Primary Key)
BName Text (Width:18) Name of the book
Subject Text (width:12) Subject Name

Student Info
Field Data Type Description
SCode Text (Width:2) Identity of student (Primary key)
SName Text:(width:15) Name of the student
Class Look up property (Commerce, Science, Arts)

Issue Info.
Field Data Type Description
BCode Text (Width:4) Identification of book (Foreign Key)
SCode Text (Width:2) Identity of student (Foreign Key)
Dateofissue Date/time Date of issue of book
noofdays Number(byte) No of days of isssue
(All the four fields of Issue info table constitute composite Key)

11
Required:
 Create database named “D followed by your roll no”.
 Establish and implement referential integrity between fields of tables
 Put a validation rule so that the book is not issued for more than 10 days.
 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.
 Create a query that retrieves names of the students, name of the books, date of issue,
and the date of returning the book of those students whose name starts with “a and
contains only 4 characters.
 Create a query that retrieves roll numbers, names of the students, name of the books, date
of issue, and the date of returning the book of those students who have the borrowed the book
for more than 7 days.
 Create a form with linked form using “Student info” table and “Issue Info” table.
 Publish a report which gives the details of the students, books, date of issue, and the date of
returning the book grouped by the Ids of the students.

Ques 11.
D maintains a database to store p a y d e t a i l s o f i t s e m p l o y e e s 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 Look up 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)
Basicpay Currency Basic pay for the month

(Empcode and Basicpay together constitute the composite key for pay details
table)

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

12
Up to 5 years 20% of basic
Above that 40% of basic

 Prepare a report which gives details about name of the employee, his department and
amount of bonus.

Ques 12.
Punjab National Bank maintains database of its customers. the details of two tables
of which is given below:
Accounts

Field Description
CID(Primary Key) Customer ID
AccNumber Account number
Taccount Type of account
LoanFacility List(four types of loan)
NaccHolder Name of account holder

Transaction
Field Description
CID (foreign key) Customer ID (foreign key)
AmountDeposited Amount deposited
DateofTransaction Date of transaction
Interestcredited Interest credited on amount deposited
LoanAmount Loan given to account holder

13
(Customer ID and date of transaction together constitute the composite key
for transaction table)

Required:
 Create a database named as “D followed by your roll no” that contains above
tables with referential integrity constraints.
 Design input mask for entering 8 characters long account number.
 Ensure that the date of transaction is not before 1/1/2008. Give a suitable
message if this condition/constraint is violated.
 Enter six records for Accounts and four records of transactions.
 Frame a list of four types of loans to enter detail in loan facility field.
 Design and execute a query which retrieves name of the account holder,
account number, loan amount and finds interest on loan amount @12%.
 Design a form that is capable of entering transactions into Transactions table.

Ques 13.

Create following tables in MS - ACCESS :

Student:
Field name Data type Description
SID number (primary key)
Title Text Enter mr or ms in title
Sname Text ( width 50) Name of the student
Sadd Text ( width 50) Address of the student
Sage Number Age of the student
Marks1 Number
Marks2 Number
Marks3 Number
Marks4 Number Marks in 5 subjects
Marks5 Number

Teachers:
Field name Data type Description

14
TID Text( width 4) (primary key)
Tname Text( width 50) Name of the teacher
Tsubject Text( width 50) Subject of the teacher

Department:
Field name Data type Description
stuid Number ( foreign key )
Teachid Text( width 4) ( foreign key )
Tdeptt Text( width 50) department of the teacher

( stuid and teachid is composite key for department table)


Required:
1) Create all the tables.
2) Apply validation rule on all marks such that marks entered is greater than 35..
3) Insert 5 records in all the tables.
4) Create form to insert the records.
5) Apply lookup wizard in title field and other fields as per your requirements.
6) Establish relationship among the tables such that referential integrity is enforced
properly.
7) Create report to display : Sid, Sname ,Tid ,Tname in any format.
8) Create following queries:
 To display the names of all the students.
 To display all the details of student whose name starts with s and end with s..
 To find the total of marks of each student along with their names.
 To display name of teachers where SID is less than 100.
9) Create query to be merged with word document to type letter to all the students who are
from Delhi. Letter should include address of the student and there marks in all 5 subjects
in tabular form. Instead of Mr. or Ms. You have to use dear sir or mam accordingly.
Ques 14.

A departmental store deals in a variety of products perishable and non-perishable. Create


a database using two tables to store the details for each product.

Product Information
Description
Unique Product Identification (pk)
Description
Category to which it belongs (household, food,
electrical etc.)
Whether or not perishable
Stock of Products
Description
Unique Product Identification (fk)
Date of purchase
Date of expiry
Rate

15
Required:
 Create a database (name as suggested in the instruction set).
 Ensure that the referential integrity constraints are defined on the above tables.
 Ensure that the price of any product is not less than Rs.100.
 Enter five records for Product Information, three records of Stock of Products.
 Set lookup property to ensure that the records entered in Product Id of Stock
of Products table are entered using list box.
 Design and generate a form with sub form that can be used for entering the
records interactively.
 Create and execute a query to list the items that are perishable and whose
expiry date has passed. The query should contain the complete information.
 Print a report of items that are perishable and whose expiry date has passed in
the sorted order (ascending) of Product Id.

16

You might also like