Key attribute
A key attribute: the property that identifies each record uniquely, such as an order’s ID number. On a Chen-style ER diagram its name is underlined inside the oval.
Easily confused with
How to read it
A key is unique to each record, so knowing it picks out exactly one. An entity can have more than one key, and each is underlined: an employee might be identified either by a company ID or by a national identification number. Underlining two separate ovals means two separate keys. A key made of several parts together is drawn as a composite attribute, with the composite underlined and its parts not.
A dashed underline is a different mark: the partial key of a Weak entity, which identifies a record only together with its owner’s key.
Also searched as: key attribute symbol, primary key er diagram, underlined attribute.
Look-alikes
A plain Attribute has no underline. A dashed underline is a weak entity’s partial key, and a dashed oval is a Derived attribute.
Differences by notation
Elmasri and Navathe point out that their ER diagrams underline every key, unlike a relational schema, where only the one chosen primary key is underlined. Silberschatz, Korth and Sudarshan underline the primary key in the list of attributes inside the entity rectangle. Crow’s foot diagrams mark keys in various ways: bold and underlined text, or the letters PK. Richard Barker’s notation puts a hash mark (#) before each attribute that is part of the unique identifier.
Read next
- Next in ER diagram symbolsMultivalued attributeA multivalued attribute: a property that can hold several values for one record, such as a person’s phone numbers. On a Chen-style ER diagram it is an oval with a double outline.
- The same shape in AI labels and iconsAI iconAI-generated or AI-changed content. A badge with the letters AI, often in a circle or beside a word such as generated or modified, labels an image, video, sound or text as made or altered with artificial intelligence. The European Union publishes an official set of these icons.
More ER diagram symbols
The same shape elsewhere
Browse symbols drawn with circles or letters and numbers.
Sources
- A Practical Introduction to Databases: 2.2 Entity-relationship diagrams, Christopher Painter-Wakefield, 2022, Runestone Academy, 2.2.1.3 Keys
- Data Modeling Using the Entity-Relationship (ER) Model (chapter 3 slides), Ramez Elmasri and Shamkant B. Navathe, Fundamentals of Database Systems, 2016, Pearson, course CS 448, Purdue University, Slide 3-15, Entity Types and Key Attributes
- Entity-Relationship Diagram (CMSC 461 lecture notes), Spring 1999, University of Maryland, Baltimore County, Computer Science and Electrical Engineering, Ellipses
- Database System Concepts, 7th edition, chapter 6 slides: Database Design Using the E-R Model, Abraham Silberschatz, Henry F. Korth and S. Sudarshan, db-book.com, Slides 6.12 and 6.33
- A Practical Introduction to Databases: 2.4 ERD alternatives and variations, Christopher Painter-Wakefield, 2022, Runestone Academy, 2.4.2.2 Attributes
- Richard Barker (data modeling notations), David C. Hay, 1999, Essential Strategies, Inc., Entities and attributes
Researched, edited and approved by Rory Hansen before publishing. Last reviewed October 9, 2026. How we research
Added .