Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Microsoft Access is one of two primary database offering from Microsoft.  Access is a network/desktop-based database.  Advantage: It is easy to use.

Similar presentations


Presentation on theme: " Microsoft Access is one of two primary database offering from Microsoft.  Access is a network/desktop-based database.  Advantage: It is easy to use."— Presentation transcript:

1  Microsoft Access is one of two primary database offering from Microsoft.  Access is a network/desktop-based database.  Advantage: It is easy to use.  Although feature rich, Access is limited by both the amount of data it can store and the number of users it can service simultaneously. Introduction

2  Start When first start Access, choose to open a blank database in the first window that is displayed on start-up. Start Access

3  Start window Access 2000 after start-up: This is the main window from which you will reach all the objects that we create within Access. First, creat a table Start window

4  A mini world ER-diagram Mini World

5  Tables In very short words, we have students that participate in courses that are held by institutions. We need to implement the following tables (primary keys underlined, foreign keys in italics): Mini World

6  Using design view In design view, you enter column names, types, and other properties as textual data in a sheet as shown in Figure 4 Create the tables

7  Choose InstID as field name with data type AutoNumber.  Right-click on InstID and choose Primary key from the background menu.  Choose InstAbbr as next field name with data type Text. In the General-tab,  adjust Field Size to a suitable value,  set Format to > for converting all input characters to capital characters (pressing F1 when the cursor is positioned in the Format-field will give you the full syntax for Format),  set Caption to a string that you want to display as heading for this column,  make the field a required field by setting Required to Yes  Choose InstName as next field name with data type Text, adjust settings in the General-tab if desired.  Save the table (e.g. with Ctrl-S) and give it the name Institution. Creating the institution table in design view, step by step

8

9  From the design view, you can view extended properties for a field Data TypeDescription Maximum Size ------------------------------------------------------------------------------- TextCharacter data255 bytes MemoCharacter data64k NumberNumeric data8 bytes Date/TimeDate and time data8 bytes CurrencyMonetary data8 bytes AutonumberAutoincrementing 4 bytes numeric data Yes/NoTrue/False logical 1 bit data Standard Data Types Supported by Access

10  For more field attributes Description: The Description property enables you to provide descriptive information about the field. A description can be up to 255 characters long Field Size: The Field Size property enables you to specify the maximum size of data stored in the field. Format: The Format property controls how data appears when displayed. This property enables you to customize how numbers, currence, text, and date-time data appear. Input Mask: The Input Mask property provides a mechanism for making data entry easier. Caption: The Caption property specifies the contents of the descriptive label that is used on a form or report in which the field is used. The Caption property also specifyies the contents of the column header for a field in the Datalist View. Field Attributes

11 Default Value: The Default Value property specifies the value that is automatically entered into the field when a new record is created. Validation Rule: The Validation Rule property specifies a condition that an entered value must satisfy. Validation Text: The Validation Text property specifies the message text displayed to the user when the validation rule fails. The Maximum size of a validation text property is 255 characters. Required: The Required property specifies whether a data value is required for the field. Allow Zero Length: The Allow Zero Length property specifies whether a zero-length string is a valid entry. Indexed: The Indexed property specifies whether an index is created for the field. Field Attributes, cont.

12  Open the table in datasheet view and enter a few records (cf. Figure 6).  Closing the window will automatically save the table data. Close the window. Creating the institution table in design view, step by step

13  Choose CourseID as a field name with data type AutoNumber.  Make it the primary key (right-click and set).  For the other fields, follow the table and figures below. Creating the course table in design view, step by step

14  Choose StudentID as a field name with data type AutoNumber.  Make it the primary key (right-click and set).  For the other fields, follow the entries of Figure 7.  The birthdate (cf. Figure 7) should have a format and input mask. Experiment with validation rules. In this example, birth dates that are in the future are not allowed. Creating the student table in design view, step by step

15

16  The student admission date should default to the current date and be a required field (cf. Figure 8).

17  Choose PartStudentID as a field name with data type Lookup Wizard and point out the column StudentID of table Student as the reference.  Choose PartCourseID as a field name with data type Lookup Wizard and point out the column CourseID of table Course as the reference.  Make both PartStudentID and PartCourseID the primary key (mark both, right-click and set).  Add the column PartYear, which denotes the year in which the student first registered for the course, make it a Number field and set a reasonable default (cf. Figure 9). Creating the participate table in design view, step by step

18

19  Choose from the menu, Tools Relationships…That will display a window as shown in Figure 10: Creating referential integrity constraints  Double-click on each of the connecting black lines between foreign keys and primary keys. After a double- click, an Edit Relationships-window appears (cf. Figure 11).  Enforce referential integrity by checking the check boxes as shown below. Now, when an institution is deleted, all depending courses will be deleted.

20 Creating referential integrity constraints  Make equivalent changes for the other two connections.


Download ppt " Microsoft Access is one of two primary database offering from Microsoft.  Access is a network/desktop-based database.  Advantage: It is easy to use."

Similar presentations


Ads by Google