In a relational database, a weak entity is an entity that cannot be uniquely identified by its attributes alone; therefore, it must use a foreign key in conjunction with its attributes to create a primary key. The foreign key is typically a primary key of an entity it is related to.
In entity relationship diagrams a weak entity set is indicated by a bold (or double-lined) rectangle (the entity) connected by a bold (or double-lined) type arrow to a bold (or double-lined) diamond (the relationship). This type of relationship is called an identifying relationship and in IDEF1X notation it is represented by an oval entity rather than a square entity for base tables. An identifying relationship is one where the primary key is populated to the child weak entity as a primary key in that entity.
In general (though not necessarily) a weak entity does not have any items in its primary key other than its inherited primary key and a sequence number. There are two types of weak entities: associative entities and subtype entities. The latter represents a crucial type of normalization, where the super-type entity inherits its attributes to subtype entities based on the value of the discriminator.
In IDEF1X, a government standard for capturing requirements, possible sub-type relationships are:
- Complete subtype relationship, when all categories are known.
- Incomplete subtype relationship, when all categories may not be known.
A classic example of a weak entity without a sub-type relationship would be the "header/detail' records in many real world situations such as claims, orders and invoices, where the header captures information common across all forms and the detail captures information specific to individual items.
The standard example of a complete subtype relationship is the party entity. Given the discriminator PARTY TYPE (which could be individual, partnership, C Corporation, Sub Chapter S Association, Association, Governmental Unit, Quasi-governmental agency) the two subtype entities are PERSON, which contains individual-specific information such as first and last name and date of birth, and ORGANIZATION, which would contain such attributes as the legal name, and organizational hierarchies such as cost centers.
When sub-type relationships are rendered in a database, the super-type becomes what is referred to as a base table. The sub-types are considered derived tables, which correspond to weak entities. Referential Integrity is enforced via cascading updates and deletes.
Read more about Weak Entity: Example
Famous quotes containing the words weak and/or entity:
“His misfortune was that he loved youthhe was weak to it, it kindled him. If there was one eager eye, one doubting, critical mind, one lively curiosity in a whole lecture-room full of commonplace boys and girls, he was its servant. That ardour could command him. It hadnt worn out with years, this responsiveness, any more than the magnetic currents wear out; it had nothing to do with Time.”
—Willa Cather (18731947)
“What is this world of ours? A complex entity subject to sudden changes which all indicate a tendency to destruction; a swift succession of beings which follow one another, assert themselves and disappear; a fleeting symmetry; a momentary order.”
—Denis Diderot (17131784)