Question: Perform the following database tasks in MS-Access 2007 software. [4 marks]
a. Create 'Marks' table with following in fields in the 'Result' database.
Marks: Marks ID, StudentName, Class, Eng, Nep, Math, Sci
b) Create a form to enter marks in the "Marks" table. It should be displaying Total, Percentage, Result and Division at the bottom that updates when you enter marks for different subjects. [2]
c) Create a query to display Student Name, Total Marks and Division. [1]
Solution:-
a) To create a database 'Result' and make a 'marks' table.
Step 1:- Start Ms Access app.
Step 2:- Rename the database as 'Result'. Click Create to finish naming the database.
Step 3:- To add more fields to a table in Datasheet view, double-click the Add New Field header.
Step 4:- Next, we've added the fields Marks ID, Student Name, Class, Eng, Nep, Math and Sci to the table.
Step 5:- Next, select Save table from the menu. The Save As dialog box will appear to let you save the table name 'marks'.
Step 6:- Insert suitable 5 records in the marks table and save table.
b) To create a required query
Step 1:- Select the Create tab. Then click on the Query Design button under the Other group.
Step 2:- Next, highlight the salary table and clicked on the Add button. When you are done selecting the tables, click on the Close button.
Step 3:- Add the fields to the query. You can do this by double-clicking on the field name. In this example, we've added the Product Name and Product Amount.
Step 4:- Then click on the Save button at the top left of the window.
Step 5:- The Save As window should appear. Enter the name 'Accountsalary' and click on the OK button.
Step 6:- Click on Total button under Show/Hide Group in Design Tab.
Step 7:- In the Criteria of dept field, type = 'account' and in the Criteria of salary field type >'10000'.
Step 8:- That's all the steps for displaying employees of 'Account' department whose salary is greater than 10000.
No comments:
Post a Comment