Axxess Questions
Axxess 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
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
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
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.
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.
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
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