0% found this document useful (0 votes)
14 views13 pages

Module 05

The document outlines tasks related to creating and maintaining databases for an institute, including creating tables for personal details, course details, payments, and results. It also includes instructions for modifying tables, creating forms, generating queries, and generating reports. Additionally, it covers linking databases with external documents and exporting data in various formats.

Uploaded by

amndarshika
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)
14 views13 pages

Module 05

The document outlines tasks related to creating and maintaining databases for an institute, including creating tables for personal details, course details, payments, and results. It also includes instructions for modifying tables, creating forms, generating queries, and generating reports. Additionally, it covers linking databases with external documents and exporting data in various formats.

Uploaded by

amndarshika
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/ 13

Module -05 (Maintain Databases)

Task – E1 (Create tables) /E2 (Create table relationship)


1. Create the below database in your computer as ABC_Institute.(use proper data type)

Personal _Details
StNo Name Address TelNo JoinedDate
S86 Chandima Weuda (0094) -71-3256858 12/5/2011
S84 Harshi Dunukewatte (0094) -77-5665563 2/4/2012
S115 Thilini Arampola (0094) -72-6655852 3/5/2012
S92 Mahesh Meethenwala (0094) -75-6658585 3/5/2012
S113 Lahiru Meethenwala (0094) -71-6585223 4/8/2013
S114 Rashmi Arampola (0094) -72-3658554 4/18/2013
Mawathagam
S111 Helan a (0094) -77-8569885 5/16/2013
Course_Details
Course_ID CourseName Fee Duration
C_100 CAA Rs.5,000.00 6 months
E_400 English Rs.4,000.00 6 months
G_200 Graphic Designing Rs.7,000.00 6 months
T_300 Tamil Rs.4,000.00 4 months
Payments
Bill_No StNo Course_ID Installment Date
10 S86 C_100 Rs.2,000.00 07-Dec-11
100 S114 C_100 Rs.3,000.00 19-Apr-13
110 S114 G_200 Rs.4,500.00 19-Apr-13
120 S111 C_100 Rs.3,200.00 10-May-13
130 S86 C_100 Rs.3,000.00 17-Jan-12
140 S84 E_400 Rs.1,000.00 17-May-13
150 S92 E_400 Rs.2,000.00 18-May-13
160 S113 T_300 Rs.1,500.00 19-May-13
170 S114 C_100 Rs.1,500.00 20-May-13
180 S114 C_100 Rs.500.00 25-May-13
190 S114 G_200 Rs.2,500.00 25-May-13
20 S84 C_100 Rs.3,000.00 05-Feb-12
200 S111 C_100 Rs.1,500.00 28-May-13
30 S84 E_400 Rs.2,500.00 05-Feb-12
40 S115 T_300 Rs.3,000.00 05-Mar-12
50 S92 C_100 Rs.5,000.00 06-Mar-13
60 S92 E_400 Rs.2,000.00 06-Mar-13
70 S92 T_300 Rs.1,500.00 18-Mar-13
80 S113 C_100 Rs.5,000.00 08-Apr-13
90 S113 T_300 Rs.2,000.00 10-Apr-13

1
Results
StNo Course_ID Marks
S111 C_100 87
S113 C_100 72
S113 T_300 50
S114 C_100 57
S114 G_200 27
S115 T_300 42
S84 C_100 82
S84 E_400 57
S86 C_100 76
S92 C_100 37
S92 E_400 66
S92 T_300 85

2. Keep proper field size for each fields


3. Add Input Mask for TelNo in Personal _Details table (!”(0094)- "00\-0000000;;_"")
4. Add a validation rule for Marks in "Results" (Number between 0-100)
5. Enter given data.
6. Create proper relationships among the tables

Time : 3.30 min

2
Module -05 (Maintain Databases)
Task – E3 (Modify tables) E4 (Create Forms)

Part –A/B

1. Create the below form design


2. Use the form header as above

3
1. Create the below form structure
2. Add proper header and footer and modify the form as you want
3. Insert "Add New", Delete", "Last Record" and "Close " buttons to operate you form

Time : 4 hrs

4
Module -05 (Maintain Databases)
Task – E5 (Create queries)

1. Find the students details who are followed the course of CAA
2. Find the student details who are followed the courses of English and Tamil
3. Find the students who are joined in year 2012
4. Find the students who are joined after year in 2011.
5. Find the all of students who have their marks >=75 for all subjects.
6. Find the grade of students according to the following basis.

"A" - >=75
"B" - >=65
"C" - >=55
"S" - >=35
"F" - <35

7. Find the StNo, Name and Course Name of students who should pay for each course.
(With their payments)
8. Find the total course fee for each student.
9. Find the course fees that are already paid.
10. Find the outstanding fee for each student.

Task – E5 (Create queries) -B

1. Create a database as “bookshop”


2. Create below tables with suitable data types with primary key.

Stock1
Item_code Description Qty Price_peritem
P001 Pen(Atlas) 5 Rs.20.00
PC02 Pencil(Natraj) 10 Rs.12.00
R005 Ruler(Atlas 6") 20 Rs.10.00

5
Stock2

Item_code Description Qty Price_peritem


CF06 ClearFile(Atlas) 14 Rs.85.00
E006 Eraser(Pilot) 25 Rs.10.00
H007 HighlighterPen(Spencer) 12 Rs.60.00
P002 Pen(Rotomac) 20 Rs.15.00
PB04 PencilBox(Disney) 10 Rs.135.00

Sales
Date BillNo Item_code Qty
11/10/2015 B001 PC02 3
11/10/2015 B002 R005 1
11/10/2015 B003 CF06 1
11/12/2015 B004 CF06 1
11/13/2015 B005 PB04 1
11/13/2015 B006 PC02 3
11/14/2015 B007 P001 2
11/15/2015 B008 P001 4
11/15/2015 B009 R005 1
11/15/2015 B010 E006 4
11/15/2015 B011 P001 3

3. Create a proper relationship among the tables.


(Don’t use “Enforce Referential Integrity” at this time.)
4. Use an “Append” query to join Stock1 and Stock2 tables.
5. Create a select query to find out daily sales for each sales Qty.
(Hint: Get the Date, BillNo, Item_code, Description, Qty(in sales table)- Buildup expression
to find the TotalPrice. )Save the query as DailySales.
6. Use a “Make Table” query to create a new table as DailySales. (Use the above created
query (DailySales)
7. Use an “Update” query to update “Pen(Atlas)” as “Pen(Atlas Chooty)” in the DailySales
table. (Hint : Use quotation out of the parentheses.)
8. Use an “Update” query to update TotalPrice according to the following basis.
(Basis = If the TotPrice is greater than or equal 50, add 10% discount for those items.
Otherwise No)
9. Use a “Delete” query to delete the records of Eraser from the DailySales table.

6
10. Use a “Crosstab” query to find out the daily sales amount of each item description.

Date Description1 Description 2 Description 3 Description 4


Date1 XX XX
Date2 XXX
Date3 XXX XX XX
Date4 XX
Date5 XXX

Samples view

 Open ms access and create the below table

Date Bill Category Description Qty Price


11/10/2015 B001 Food Chocolate 2 Rs.100.00
11/10/2015 B002 Food Chocolate 3 Rs.150.00
11/10/2015 B003 Food Ice Cream 1 Rs.200.00
11/12/2015 B004 Drink Mixed 2 Rs.60.00
11/12/2015 B005 Food Cake 1 Rs.300.00
11/12/2015 B006 Toy Doll 1 Rs.250.00
11/12/2015 B007 Drink Mixed 1 Rs.30.00

Try to create the below cross tab query by using with the above table

Date Description SumOfQty Drink Food Toy


11/10/2015 Chocolate 5 Rs.250.00
11/10/2015 Ice Cream 1 Rs.200.00
11/12/2015 Cake 1 Rs.300.00
11/12/2015 Doll 1 Rs.250.00
11/12/2015 Mixed 3 Rs.90.00

Time : 2 hrs

7
Module -05 (Maintain Databases)
Task – E6 (Generate reports)
1. Create the following report structure.

1. Add proper header and footer


2. Add current date and time at the top of the report.
3. Create a formula to count the no.of students.
4. Print the report.

8
Time : 45 min

1. Create the following report structure.

9
2. Add proper header and footer
3. Add current date and time at the bottom of the report.
4. Use Course Name for grouping level.
5. Create correct formulas to find subtotal and grand total.
6. Format the report as you wish.
7. Print the report

Time : 45 min

Module -05 (Maintain Databases)


Task – E7 (Modify records)/ E8 (Backup and restore data)

1. Create the following data base (Use proper data types)

Stock

10
ItemNo ItemName Qty Price
A1025 Keyboard 10 Rs.850.00
A5241 Mouse 25 Rs.600.00
A1440 Monitor LED 19" 12 Rs.12000.00
A5265 Monitor LED 15" 15 Rs.10200.00
A4411 HDD (500GB) 18 Rs.7500.00
A4475 DVD Writer 23 Rs.2500.00
A5866 Head phone 30 Rs.780.00

Sales

BillNo ItemNo Qty Price Date


B100 A5241 1 Rs.600.00 3/18/2014
B200 A4475 2 Rs.5000.00 3/18/2014
B300 A5241 2 Rs.1200.00 3/19/2014
B400 A5265 1 Rs.10200.00 3/19/2014
B500 A4475 1 Rs.2500.00 3/19/2014
B600 A5241 3 Rs.1800.00 3/21/2014
B700 A4411 1 Rs.7500.00 3/21/2014
B800 A5866 1 Rs.780.00 3/22/2014

2. Use below validation rules for the "Stock" and "Sales" tables
a. validation rules - Maximum character length is 5 in ItemNo
b. validation text - "Maximum length is only 5 characters"

1. Sort the ItemNo field in ascending order in the "Stock" table


2. Sort the BillNo field in descending order.

3. Create the a query and show the below data

BillNo ItemNo ItemName Date


B100 A5241 Mouse 3/18/2014
B300 A5241 Mouse 3/19/2014
B600 A5241 Mouse 3/21/2014
B400 A5265 Monitor LED 15" 3/19/2014
B700 A4411 HDD (500GB) 3/21/2014
B200 A4475 DVD Writer 3/18/2014
B500 A4475 DVD Writer 3/19/2014
B800 A5866 Head phone 3/22/2014
11
i. Use normal filter and show sales records on 3/19/2014
ii. Use advanced filter to show mouse sales on 3/21/2014
iii. Use advanced filter to show DVD Writer and Mouse sales on 3/19/2014
iv. Backup database in partition D: / of your computer.

Time : 3 hrs.

Module -05 (Maintain Databases)


Task – E9 (Link data base with external document)

1. Export the above Stock table as XML

2. Create above Stock table in an excel work sheet and import it as Stock1.

3. Export the Sales table as a text file

12
4. Create a Stock table as ODBC database.

5. Publish the database as PDF file.

Time : 3 hrs.

13

You might also like