Loading....
Coupon Accepted Successfully!

 

Methods of Creating a Table


It must be borne in mind that data tables are always created within the database. It means that, for creating tables, the database must be open. The database screen, when opened, appears as given below. We will check on the tab 'Create table in Design view'. It will give us the options to create tables as follows:

  1. Using Datasheet View: A Datasheet view is a row- and - column arrangement in which you can enter the required data. When you save the Datasheet, Access automatically assigns appropriate data types and formats for each field in your table. The steps for creating a table in the datasheet are:
  • Click Tables tab
  • Click new on the database window toolbar. It will open New Table dialog box.
  • Select Datasheet view and press ok. New table window will open.
  • In the new table window, double - click a field name and rename it as you desire.
  • Thereafter, click close button. MS Access will raise a query - whether the changes are to be saved. Click Yes to save the changes.
  • Specify the table name and click OK.

  1. Using the Table Wizard: This method enables you to create a table based on a set of sample tables provided by Access. The steps for creating a table in Table Wizard are:
  • Click Tables tab
  • Click New on the database window toolbar. It will open New Table dialog box.
  • Choose Table Wizard and click OK.
  • Now, a display 'Business or Personal' will appear on the screen. Click according to your choice.
  • On the same screen, a list of sample tables will also appear. Click on the selected table and double - click a field in the sample fields. It will be added to the field in the table.
  • Continue adding the required fields. When the required fields are added, click next.
  • On the screen that follows, you will get the option to choose Primary Key. Primary key may also be selected by MS Access system itself.
  • On the screen that follows, the option to specify the type of relationship appears. Having made the choice, click Next.
  • The last screen will give the option to modify the design, enter data directly, or by using the form that the wizard has created. Thereafter, click Finish.

  1. Using the Design View: This method enables you to create a table from scratch, wherein you can specify the name, data type and properties of each field in the table. The steps for creating a Design view are:
  • Click Tables tab
  • Click New on the database window toolbar. It will open New Table dialog box.
  • Select Design View and click OK.
  • Enter the field names and select data type for each field.

Implementing the Domain Integrity in Access


Domain Integrity is implemented in Access by setting the following properties of fields in your table.

Field Size - This property is used to set the maximum size for data, having Text, Number, or AutoNumber data type, stored in a field.

Format - This property is used to customize the way Number, Date/Time, and Text data types are displayed and printed. For example, you can set the Format property of a field called Unit Price to Currency so that a dollar ($) sign is displayed in the field.

Caption - This property is used to specify a label for the field.

Default Value - This property is used to specify a value that is automatically entered in a field when a new row is added in a table.

Validation Rule - This property is used to implement rules for entering data in a field.

Validation Text - This property is used to display a message to the user when the user enters data in a field that violates the validation rule.

Required - This property is used to specify whether data has to be entered in the field. For example, setting the required field property of the Product Name field with a click on Yes ensures that data is always entered in this field.

Allows Zero Length - This property is used to specify whether a zero length string is a valid entry in the field. This property works with the required field property.

Methods of Entering Data in a Table


Access provides the following two methods of entering data in a table:
  1. Using the Datasheet View - This method enables you to enter data in a row - and - column format, as given in the following diagram.

  1. Using Forms - This method enables you to create a form to enter data in a table. A form is a user - friendly method of entering data in a table.

Types of Relationships


There are three types of relationships between tables. These are:
  1. One to One - This type of relationship describes a situation in which one complete row in a table is related to just one row in the second table. This type of relationship is not common.
  2. One to Many - This type of relationship describes a situation in which one row of data in a table is related to many rows of data in the second table. However, a row of data in the second table has only one related row of data in the first table. For example, consider students and a class table. A student can belong to only one class but a class can have many students.
  3. Many to Many - This type of relationship describes a situation in which many rows of data of one table are related to many rows of data in the second table. For example, consider a Customers and Products table. A customer can order many products and a product can be ordered by many customers.




Test Your Skills Now!
Take a Quiz now
Reviewer Name