Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
14BMIS01C
Business Information Systems
Access Tips
When you create a Database in Access, it is preferable to create the following items with the order as follows:
1.
2.
3.
4.
5.
6.
7.
Tables using Design View: Table for each Entity that includes the needed Attributes or Fields.
Relationships between Tables (Database Tools).
Data Entry in each Table (using Datasheet View).
Queries using Design View.
Reports using Wizard.
Forms using Wizard: Form for each Table and Query, with Buttons in each Form using Design View.
Main Menu Form with required Buttons using Design View.
2. Relationships
(1 M) Relation
Copy the Primary Key (PK) of Table of 1 to Table of M. The copy of PK is called the Foreign Key (FK).
(M M) Relation
Create a new table (Bridge Table) to break (MM) relation into two (1 M). This new table contains 3 attributes:
a copy of each PK of the 2 tables that have (M-M) relation (i.e. 2 FK), and
any new attribute as a PK (for this new table) with Autonumber as its data type.
N.B.: Both the PK and FK must have both the same data types and the same values in Data Entry.
Dont use Auto-number data type for a PK attribute, to avoid problems when creating the relationships.
Do the following steps, after creating the Relationships in Access, to generate a Report for the
Relationship and also to save it as a PDF file:
Database Tools Relationships Relationship Report Page Setup: Portrait, PDF.
3. Data Entry
Some attributes in different Tables may contain the same values due to the relationship between
these tables. For example, the Specialization attribute in Doctor Table, and Complaint attribute in Patient
Table, and Dept-Name in Department Table; all these 3 attributes contain the same values that are: Eye,
Children, Bone, and Brain.
In case of (1 M) relation, you must start entering data in Table of 1 and after filling all its records,
you can then start entering data in Table of M. For example, you must enter all needed data in
Department Table (1 Table) first and then Doctor Table (M Table), as relation between Department
Doctor is (1 M).
N.B.: In Datasheet View, you can click on the + sign at the left hand side of each record; to view the related
record(s) in the other table (that has a relationship with that table).
Page 1 of 3
14BMIS01C
Business Information Systems
4. Queries
A Query is used to select specific records according to a certain given criteria, from one or more Tables.
Query is simply a small table with some data included from the original Table(s).
5. Reports
A Report could be generated from 1 or more: Tables or Queries. A Report includes some attributes of
the original Table(s) or Query(s). A Report is used to group data according to a certain attribute(s).
A Report may use functions such as: sum, count, etc. using Layout View Design Totals.
6. Forms
Make a Form for each Table and Query.
A Form should include all the attributes of the original Table or Query.
For each Form, do the following steps:
For example, the Doctor Form of Doctor Table,
Page 2 of 3
14BMIS01C
Business Information Systems
N.B.: You could refer to the solved database example Hospital Complete Access file (taken in the Lab
Exercises) uploaded on the e-learning for more details.
Page 3 of 3