Wednesday, September 22, 2010

Algorithm for creating a database and answering Queries in MS-Access

  1. Start
  2. Click on Start Button à All Programs à MS Office à MS-Access
  3. A new blank database is opened. Use the Database wizard, where Tables, Queries, Forms, Reports, Pages etc., will appear on the left side in the wizard
  4. Click on Tables and create a table in Design view or by using wizard or by using entering data option to create the table structure with the given fields as columns with appropriate field names, data types to each field and click on Edit à Primary key option from menu bar to one appropriate column for two tables.
  5. Save it by entering table names to both the tables
  6. Enter the data properly to Register Number, DOB, Gender, Class appropriately for table1
  7. Enter the data properly to Register Number, M1, M2, M3, M4, M5 marks appropriately for table2
  8. Click on Tools à Relationships option to relate the table1 and table2 by dragging Register Number, which is the Primary key here
  9. Click on Queries and create a Query in Design view or by using wizard to create a query with Register Number, Name, Gender and Total marks by selecting the appropriate fields from each table
  10. Save it by entering a query name and double click to see the rows of the query
  11. Again click on Queries and create a Query in Design view or by using wizard to create a query with Register Number, Name, Gender and Total marks by selecting the appropriate fields from each table and include sort for name in ascending order
  12. Save it by entering a query name and double click to see the rows of the query
  13. Close the database
  14. Stop




No comments:

Post a Comment