0% found this document useful (0 votes)
6 views

List of Practical Databases

The document outlines a series of practical exercises for creating and managing databases in MS-Access, covering topics such as table design, relationships, queries, and forms. Each practical task includes specific requirements for creating tables, entering records, and applying various properties and constraints. The exercises span a range of applications including student information, vehicle databases, bank accounts, hospital records, and payroll systems.

Uploaded by

nnaziashehzad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

List of Practical Databases

The document outlines a series of practical exercises for creating and managing databases in MS-Access, covering topics such as table design, relationships, queries, and forms. Each practical task includes specific requirements for creating tables, entering records, and applying various properties and constraints. The exercises span a range of applications including student information, vehicle databases, bank accounts, hospital records, and payroll systems.

Uploaded by

nnaziashehzad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

XI AKUEB Computer Science Practicals

Practical 1 (Table Design, Data Types and Field Properties)

Create a database in MS-Access of Student Information


➢ Create table STUDENT, the fields are as follows;
SID, Name, Class, Address, CNIC, City, Email, DOB and set the following properties
• Set SID as primary Key and set caption property for ‘SID as ‘Student Identity’.
• Set field size of name up to 50 characters and set it as ‘not null’.
• Produce a list of available values using look up wizard in the field class.
• Give CNIC short text data type and apply input mask as 00000-0000000-0
• Give default value in the city as ‘Karachi’.
• Apply no duplication on Email.
• Apply ‘medium date’ format to DOB.
➢ Enter 5 Records in the table.

Practical 2 (From Wizard)

Create a database in MS-Access for a Vehicle database

➢ Create table Vehicle (RegNo, BrandName, Model, Color)


➢ Create a from using wizard with tabular layout.
➢ Enter 15 Records in the table using form.

Practical 3 (One to One Relationship)

Create a database in MS-Access of Bank Accounts.

➢ Create 1st table ACCOUNT(AccNo, Acc_Title, Acc_Address, Acc_Phone, Acc_Email)


➢ Create 2nd table STATUS(StatusID, AccNo, Acc_Status, Balance) with suitable data types.
➢ Create one to one relationship between the tables.
➢ Enter 5 Records from parent table to child table.

Practical 4 (One to Many Relationship)

Create a database in MS-Access for school.


➢ Create 1st table student (SID, Name, Class, CellNo, Email)
➢ Create 2nd table Attendance (AID, SID, Month Name, Year, Working Days, Present Days)
➢ Create one to many relationship between the tables.
➢ Enter 5 Records in the table student and related 2 records for each parent record in
attendance table.
Practical 5 (Query Design View)

Create a database in MS Access for Hospital


➢ Create table Patient (Patient_ID, Patient Name, Gender, DOB, Diagnosis, Prescpription,
Doctor Name, DOT) with appropriate data types and suitable primary key & enter 10
records.
➢ Create queries in design view the following names and purposes:
• TB Patients: Displays the records of male patients who have TB diagnosed.
• Started by M: Display the name and gender of male patients whose names are
started by ‘M’.
• Fever Patients: Display the records of patients who are having Dengue, Malaria
or Typhoid.
• 2022 to 2024 Patients: Display the records of patients who were treated during
1/01/2022 to 1/01/2024.
• 55 Years Old Females: Display the record of females who are older than 55
years on 12/31/2023.
• Without Prescription: Display the records of all the patients who have not
prescribed any medicine.
• Other than Dr. Ahmed: Display the list of patients who are not treated by Dr.
Ahmed.

Practical 6 (Query Wizards, Sorting and Applying Criteria using Design View)

Create a database of Library


➢ Create table books (Book_Id, Title, Publisher Name, Author Name, Issued) with
suitable datatypes.
➢ Create a suitable primary key and input 5 different records.
➢ Sort records in ascending order by author name.
➢ Create a query in design view for the following;
• Display a list of books sorted by Title in ascending order.
• Display a list of books, published by other than Dogar Brothers/Majeed Sons.
• Display a list of books where there is no Author Name.
• Display a list of books where Authors’ name starts with ‘M’ and issued is ‘Yes’.

Practical 7 (Create, Alter, Drop Table Using SQL)

Create a database in MS-Access for Citizens.


• Create table Citizens (CNIC, Name, DOB, Address, Phone, Email) taking suitable data
types using CREATE statement.
• Set CNIC as Primary Key and Name as Not Null.
• Insert 4 records in the table using insert statement.
• Change the structure of the table using ALTER statement and add field of city and
country.
• Open the table in data sheet view and enter cities and countries.
• Remove the field of country using DROP statement.
• Enter two more records in the table using datasheet view.
• Write SQL statement to delete the table.

Practical 8 (SQL DML Select and Delete)

Create a database in MS Access of Employee Information


➢ Create table Employee (EID, Name, Gender, DOB, Department, Designation,
JoiningDate, and Email) with appropriate data types and suitable primary key.
➢ Create queries in SQL view the following names and purposes:
o Marketing Supervisors: Displays the records of ‘marketing’ department where
designation is ‘Supervisor’
o Started by M: Display the name of male employees whose names are started by ‘M’.
o Clerks and Salesman: Display the records of employees who are Clerk/ Salesman
o 2019 to 2022 Employees: Display the records of employees who joined during
1/01/2019 to 1/01/2022.
o Age 25 Years: Display the record of female employees who are older than 25 years on
2/28/2025.
o Without Emails: Display the records of all the employees who have no email address.
o Other than Finance: Display the list of employees who do not belong to ‘Finance’
department.
o Delete record from table whose employee ID is E-006.

Practical 9 (SQL DML Insert and Update)

Create a database in MS Access for Cricket


➢ Create table SCORE (Player_Id, Player_Name, Runs, Balls) with suitable data types
and primary key.
➢ Enter at least five records using insert statement.
➢ Run SQL query to update the runs and ball of the player whose Player_Id is 57.
➢ Run SQL query to update the name of the player from Abdullah Shafiq to Shaheen Shah
Afridi.

Practical 10 (Calculated Fields using SQL)

Create a payroll database.

• Create 1st table Employee (Emp_ID, Name, Address)


• Create 2nd table Salary (SID, Emp_ID, Month, Year, Basic Pay)
• Create Relationship one to many between the tables and enter five records.
• Create Query Salary Detail (Emp_ID, Name, Month, Basic Pay, Medical
Allowance, Convince Allowance, House Rent Allowance, Tax, Gross Pay, Net Pay)
as given below:

Medical Allowance=10% of Basic Pay, House Rent Allowance=15% of Basic Pay, Gross Pay=
Basic Pay + Medical Allowance + House Rent Allowance, Tax=3% of Gross Pay, Net
Pay=Gross Pay-Tax

Practical 11 (Forms in Design View)

Create a database in MS Access for Student Result


➢ Create table Marks (SID, Name, Maths, Computer, Physics, English,
Urdu)
➢ Set a suitable primary key and enter five records.
➢ Create form Students’ Marks in design view.
• Apply a caption in it “Student Results” in Red Color.
• Write “Prince Aly Higher Secondary School” as sub heading.
• Change the label colors of all fields as “sea green” and label text color as
“white”.
• Apply line thickness of text boxes by 4 points with black color.
➢ Save the changes and enter three more records using form.

Practical 12 (Reports Using Wizard)

Create a Database Expenditure


➢ Create table Expense (Family No, Conveyance, Foods, Clothing, Rent, Education)
➢ Create a query having all above fields as well Total Expense using following formula:
Total Expense = Conveyance + Foods + Clothing + Rent + Education
➢ Enter at least ten records in the table.
➢ Create report using wizards with columnar layout and portrait orientation.
➢ Print report.

You might also like