What is an Entity in Microsoft Access?

Techwalla may earn compensation through affiliate links in this story.

An entity in Microsoft Access performs a very important role. Its task is to represent a person, place, object, event or idea that stores and processes data. An entity in a relational database has its own table. Within the entity's table are the attributes, also referred to as a field or column that characterizes the entity.


When creating each entity, it is advisable to specify an assigned key, which is a primary key, to ensure that the table records contain only one unique value. In Microsoft Access, not assigning a primary key prompts Microsoft Access to create an autonumber data type automatically after obtaining your permission. Note that there are certain limitations, to autonumber data types when enforcing referential integrity.

Video of the Day

Entity-Relationship Diagram

During the Microsoft Access database design stage, an entity-relationship, or E-R, diagram is a popular visual representation of a relational database structure that illustrates all the entities, attributes and relationships. This diagram is made before physically entering any information into the database. The E-R diagram represents the entities as rectangles.


The primary key, which is a column or collection of columns that uniquely identifies a given row in a table for each entity, appears above the line in the rectangle for each entity. The other fields that complete the entity appear below the line in the rectangle. A dashed line from one rectangle to another indicates relationships, typically the primary key to the foreign key, which is a field (or collection of fields) in a table whose value is required to match the value of the primary key for a second table.

Entity Integrity

When choosing a field as the primary key, a null value, which is an unknown or inapplicable value, is not acceptable. Entity integrity is the rule that no field that is part of the primary key may accept null values. The rule expresses uniqueness. Each record will have its own identity, and preventing the primary key from having a null value guarantees that one record is distinguishable from another.


Dependent Entity Versus Independent Entity

A dependent entity is a table that requires a relationship with another table for identification. An independent entity is a table that does not require a relationship with another table. In an E-R diagram, the round corners represent the dependent entity and square corners represent the independent entity.

Entity-Relationship Model

The E-R model is suitable approach to represent data in a Microsoft Access database that uses E-R diagrams, similar to the method used by the database design language exclusively as the tool for representing entities, attributes and relationships. In an E-R model, rectangles represent the entities and triangles represent the relationships. To illustrate the relationships shared among the entities, lines are connect the entities and are labeled to indicate the type of relationship. For example, a one-to-many relationship between entities is represented as "1" to "n," while a many-to-many relationship between entities is represented as "m" to "n."


Composite Entity

A composite entity is a valid solution to illustrate an entity that exists to fulfill the many-to-many relationship. Representing this relationship is a diamond within a rectangle.