Friday, December 15, 2006

Database - III

Database Objects
Access database is made up of different Objects like tables, queries, forms, reports, data access pages, macros and modules. Each of the above Objects has their own special function different from one another. While working with Access you will include several objects like relationships, command bars, database properties etc.

Tables
Tables are grids that store information in a database similar to the way an Excel worksheet stores information in a workbook. Table is the first object that you add to your database is used to store all the data in the database. Each row of a table contains one record. Records are made up of fields that contain a particular piece of data in the table. Every table in Access 2000 must have a field that uniquely identifies each record in the table. This field is called the primary key. You can recognize the primary key in a table by the ID appended to it. The primary key ensures that you can retrieve data accurately and efficiently when you pull information from the database.

Queries
Queries in Access are Powerful and versatile. Using select queries you can view, summarize and perform calculations on the data of your table (single or multiple). And Action queries lets you add, update and delete data from table. When a select query is run, a datasheet appears, with the specified fields in the query and the records meeting the query’s criteria. When an action query is run, the specified action is run such as appending data to an existing table, deleting data from table or updating data of an existing table. The query created is stored as a separate object and listed in the database window.
The datasheet returned by a query is a dynamic set of data, called dynaset, and can be updated based on the tables data.

Forms
Forms are used to view, enter, edit and print table data in a custom format. Form can be created form the data of a query result also. It provides more structured view of the data as compared to datasheet view and can be used to add, change, delete or view database records, one record at a time. Using Forms, user can navigate through the records, access to certain fields can be restricted, validation rule can also be set and custom dialog box can be created that can be used to display or retrieve information from the users. Forms are comprised of following three sections:
Header - Header may be Page header or Form header. Page Header is displayed when the form is Printed and Form header is displayed when the form is viewed in the form view.
Detail - Detail area contains the entire contents of your form design.
Footer - Footer may be Page footer or Form footer. Page footer is displayed when the form is Printed and Form footer is displayed when the form is viewed in the form view.

Reports
Report is a comprehensive tool of Access that is used to create and maintain report of facts about the data in a clear and concise form. Reporting is one of the primary purposes of a database programme and can contain data from multiple tables. With Access you can create Detail report, Summary report, Cross-tabulation report, Report containing graphics, charts, forms, labels etc. Similar to Forms Reports is also comprised of three sections:
Header - Header may be Page header or Report header. Page Header is displayed at the top of a page when the report is printed and Report header is displayed at the top of a report.
Detail - Detail area contains the entire contents of your report.
Footer - Footer may be Page footer or Report footer. Page footer is displayed at the top of a page when the report is printed and Report footer is displayed at the bottom of a report.

Pages
Pages allow you to view and update the data in your database from within a browser. Although they are stored outside the Access database (.mdb) file, they are created and maintained in a manner similar to that of forms. Although the data access pages are targeted toward browser, they can also be previewed within the Access application environment. Data access Pages can also be viewed and modified in Design View. Design View of a Data access page is similar to that of a form, which makes working with the data access Pages and deployment of your application over an Intranet, very easy.

Macros
Macros in Access differ from the macros of the other languages. They can't be recorded as in Word or Excel and are not saved as VBA code. With Access macros, you can perform most of the task that you perform manually from keyboard, menus and toolbars. Generally VBA (Visual Basic for Applications) code contained in module are used rather than macros to do the task that your application must perform. VBA code gives more flexibility and power than macro.

Modules
Modules are the foundation of any application and let you create libraries of functions that can be used throughout your application. Modules contains the VBA code and you can do the following using it:
· Perform error handling
· Declare and use variables
· Loop through and manipulate record sets
· Call Windows API and other library functions
· Create and modify system objects, like tables and queries
· Perform transaction processing
· Perform many functions not available with macros
· Test and debug complex process
· Create library database

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home