encyclopegia.org

Associative entity

An associative entity is a term used in relational and entity–relationship theory.[src] A relational database requires the implementation of a base relation (or base table) to resolve many-to-many relationships.[src] A base relation representing this kind of entity is called, informally, an associative table.[src] notation) As mentioned above, associative entities are implemented in a database structure using associative tables, which are tables that can contain references to columns from the same or different database tables within the same database.[src] An associative (or junction) table maps two or more tables together by referencing the primary keys (PK) of each data table.[src] In effect, it contains a number of foreign keys (FK), each in a many-to-one relationship from the junction table to the individual data tables.[src] The PK of the associative table is typically composed of the FK columns themselves.[src] Associative tables are colloquially known under many names, including association table, bridge table, cross-reference table, crosswalk, intermediary table, intersection table, join table, junction table, link table, linking table, many-to-many resolver, map table, mapping table, pairing table, pivot table (as used in Laravel—not to be confused with the use of pivot table in spreadsheets), or transition table.[src]

An associative entity is a term used in relational and entity–relationship theory.[src] A relational database requires the implementation of a base relation (or base table) to resolve many-to-many relationships.[src] A base relation representing this kind of entity is called, informally, an associative table.[src] notation)]] As mentioned above, associative entities are implemented in a database structure using associative tables, which are tables that can contain references to columns from the same or different database tables within the same database.[src] An associative (or junction) table maps two or more tables together by referencing the primary keys (PK) of each data table.[src] In effect, it contains a number of foreign keys (FK), each in a many-to-one relationship from the junction table to the individual data tables.[src] The PK of the associative table is typically composed of the FK columns themselves.[src] Associative tables are colloquially known under many names, including association table, bridge table, cross-reference table, crosswalk, intermediary table, intersection table, join table, junction table, link table, linking table, many-to-many resolver, map table, mapping table, pairing table, pivot table (as used in Laravel—not to be confused with the use of pivot table in spreadsheets), or transition table.[src] ==Using associative tables== An example of the practical use of an associative table would be to assign permissions to users.[src] There can be multiple users, and each user can be assigned zero or more permissions.[src] Individual permissions may be granted to one or more users.[src] CREATE TABLE Users ( UserLogin varchar(50) PRIMARY KEY, UserPassword varchar(50) NOT NULL, UserName varchar(50) NOT NULL ); CREATE TABLE Permissions ( PermissionKey varchar(50) PRIMARY KEY, PermissionDescription varchar(500) NOT NULL ); -- This is the junction table.[src] CREATE TABLE UserPermissions ( UserLogin varchar(50) REFERENCES Users (UserLogin), PermissionKey varchar(50) REFERENCES Permissions (PermissionKey), PRIMARY KEY (UserLogin, PermissionKey) ); A SELECT-statement on a junction table usually involves joining the main table with the junction table: SELECT * FROM Users JOIN UserPermissions USING (UserLogin); This will return a list of all users and their permissions.[src] Inserting into a junction table involves multiple steps: first inserting into the main table(s), then updating the junction table.[src] -- Creating a new User INSERT INTO Users (UserLogin, UserPassword, UserName) VALUES ('SomeUser', 'SecretPassword', 'UserName'); -- Creating a new Permission INSERT INTO Permissions (PermissionKey, PermissionDescription) VALUES ('TheKey', 'A key used for several permissions'); -- Finally, updating the junction INSERT INTO UserPermissions (UserLogin, PermissionKey) VALUES ('SomeUser', 'TheKey'); Using foreign keys, the database will automatically dereference the values of the UserPermissions table to their own tables.[src] ==See also== Many-to-many (data model) Relational database Unique key ==References==[src]

24 sentences · 24 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Associative entity." encyclopegia.org, 2025, https://encyclopegia.org/wiki/associative-entity. Accessed 01 December 2026.

Chicago

"Associative entity." encyclopegia.org. Accessed December 1, 2026. https://encyclopegia.org/wiki/associative-entity.

APA

encyclopegia.org. (2025). Associative entity. Retrieved December 1, 2026, from https://encyclopegia.org/wiki/associative-entity

Accessed December 1, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Legal Entity of Public Law

stub · references available

NUTS 1 statistical territorial entity

stub · references available

Entity Framework

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1267893326 · 0.5 · snapshot enwiki-001267893326

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.