Free ER Diagram Maker in Crow's Foot and Chen Notation
Draws crow's foot ERDs with primary and foreign keys and exact cardinalities, and Chen diagrams with weak entities, multivalued attributes and total participation, from typed tables or a pasted CREATE TABLE script. Made for database courses, schema reviews and thesis appendices.
One entity per line as Name: column type PK, then one relationship per line as A 1 -- 0..* B : label. The end beside each entity says how many of it relate to one of the other. Paste CREATE TABLE SQL or a Mermaid erDiagram and the ER diagram maker reads that instead.
Reading ER text.
6 entities, 5 relationships: 5 one-to-many. BookAuthor is a junction table between Book and Author.
The ER diagram maker draws your schema here in the browser, with no account and no upload; free files show a small scientificfigure.com mark in one corner.
| Table | Primary key | Foreign keys | Other columns |
|---|---|---|---|
| Member | member_id | — | name, email (unique), joined_on |
| Loan | loan_id | member_id → Member, copy_id → Copy | due_on, returned_on (nullable) |
| Copy | copy_id | book_id → Book | barcode (unique), shelf |
| Book | book_id | — | isbn (unique), title, year |
| Author | author_id | — | name |
| BookAuthor | book_id, author_id | book_id → Book, author_id → Author | — |
ER diagram styles
Four finishes from the AI ER diagram generator, each on its own schema: a library in Chen notation as a report figure, a SaaS billing schema as a design doc, ride-hailing trips on a dark slide and a school library with an icon on every entity.
ER diagram examples
Eight ER diagram examples rendered by the ER diagram maker's AI generator: hospital, online shop, university and social app schemas, then four finishes. Each card loads the schema prompt behind its render.
A DBMS course classic from the ER diagram maker.
Paste your own CREATE TABLE script into the ER diagram maker.
Swap in your own courses; the ER diagram maker keeps every end.
Follow joins User to User, an ER diagram maker pattern.
For course reports and thesis appendices, from the ER diagram maker.
For READMEs and design docs; the ER diagram maker keeps the types.
For dark talk slides, straight from the ER diagram maker.
For teaching slides and posters made with the ER diagram maker.
What is an ER diagram?
An ER diagram (entity relationship diagram, ERD) is a drawing of a database's structure: the entities it stores, the attributes of each, and the relationships between them, with how many of each side can take part. Peter Chen introduced the entity–relationship model in 1976 and drew entity sets as rectangles and relationship sets as diamonds; textbooks add ovals for attributes. Most schema documents now draw the same model in crow's foot notation, where every entity is a table card and the ends of each line carry the cardinality. The ER model is the idea, and the ER diagram is its picture; an ER diagram maker, also called an ERD maker or entity relationship diagram maker, turns the model typed as text into that picture.
What the ER diagram maker does
- The ER diagram maker reads one entity per line (Member: member_id int PK, email varchar UK) and one relationship per line (Member 1 -- 0..* Loan : borrows), a pasted CREATE TABLE script or a Mermaid erDiagram, and says which of the three it is reading.
- Crow's foot output of the ER diagram maker: a table card per entity with PK, FK and UK badges and column types, a line from the key row to the foreign key row, and the minimum and maximum marks at both ends. No arrowheads.
- Chen output of the ER diagram maker: rectangles, double rectangles for weak entities, diamonds, double diamonds for identifying relationships, ovals for attributes, 1, M or N on each line and a double line for total participation.
- Up to eight tables, the ER diagram maker places the cards on a grid of shared rows and columns. A layout with a line through a card is laid out again wider, and refused as crowded if it still fails, so no figure comes out tangled.
- Under the figure the ER diagram maker lists the relational schema table by table. From a Chen diagram it is mapped with the textbook steps, and one button redraws it in crow's foot.
- Files from the ER diagram maker come as PNG, SVG or PDF, colour or black and white, drawn in the browser with no account. The AI ER diagram generator draws the same model as a report figure, a design doc, a dark slide or an illustrated ERD.
ER diagram symbols in crow's foot and Chen notation
Crow's foot notation shows cardinality with two marks at each end of a line; Chen notation shows it with shapes, 1, M or N written on the lines, and single or double lines. The two tables list every ER diagram symbol the ER diagram maker draws, and the figure under each was drawn by the maker from one of its examples.
| Symbol | Name | What it means |
|---|---|---|
| Entity (table card) | The entity's name in the header band, then one row per attribute. A ? after a column name marks it nullable. | |
| Exactly one | Two bars (||). The inner bar is the maximum, one; the outer bar is the minimum, one. The ER diagram maker draws it for an end typed 1. | |
| Zero or one | A circle and a bar (o|): optional, at most one. In SQL read by the ER diagram maker, a nullable foreign key puts this end at the parent. | |
| One or many | A bar and a crow's foot (|{): at least one, no upper limit. The crow's foot touches the entity being counted; in the ER diagram maker it is 1..*. | |
| Zero or many | A circle and a crow's foot (o{): the usual child end of a one-to-many relationship, typed 0..* in the ER diagram maker. | |
| Primary key | PK marks the column or columns that identify a row. Two PK columns that are both foreign keys mark a junction table. | |
| Foreign key | FK marks a column holding another table's key. The ER diagram maker starts the relationship line at that row. | |
| Unique | UK marks a unique column such as an email or an ISBN. A foreign key that is also unique makes the relationship one-to-one. | |
| Non-identifying relationship | A dashed line: the foreign key is not part of the child's primary key. A solid line is identifying. In ER text, two dots (A 1 .. 0..* B) draw it dashed. |
| Symbol | Name | What it means |
|---|---|---|
| Entity | A rectangle: an entity type with a key of its own, such as Member or Book. | |
| Weak entity | A double rectangle: an entity with no key of its own, identified through its owner, as a Copy is through its Book. Write weak before the name in the ER diagram maker. | |
| Relationship | A diamond with the relationship's name, joined by lines to the entities it relates. | |
| Identifying relationship | A double diamond: the relationship that links a weak entity to its owner, Has between Book and Copy. | |
| Attribute | An oval joined to its entity, or to a diamond for a relationship attribute such as due_on on Borrows. | |
| Key attribute | The name underlined: its value is different for every entity, as member_id or isbn. | |
| Partial key | A dashed underline on a weak entity's attribute: it tells apart the weak entities of one owner, as copy_no does among the copies of one book. The ER diagram maker marks it with partial after the name. | |
| Multivalued attribute | A double oval: several values per entity, such as phone numbers, written {phone} in the ER diagram maker. The relational schema gives it a table of its own. | |
| Derived attribute | A dashed oval: worked out from other data, such as active_loans, so it is not stored as a column. Type /active_loans in the ER diagram maker. | |
| Composite attribute | An oval with its component ovals attached: name made of first and last, typed name(first, last) in the ER diagram maker. Tables keep the components. | |
| Total participation | A double line: every entity of that type takes part in the relationship, as every Copy belongs to a Book. The ER diagram maker draws it when the other end's minimum is 1. | |
| Partial participation | A single line: taking part is optional. The 1, M or N beside the line is the cardinality ratio. |
Cardinality in an ER diagram
Cardinality is how many instances of one entity can relate to one instance of the other, given as a minimum and a maximum at each end of the line. Crow's foot is read across the line: Customer ||--o{ Order says that one customer places zero or many orders, and that each order is placed by exactly one customer. The ER diagram maker draws the same relationship in Chen notation as 1 and N, with a double line where the minimum makes participation total.
- Read each end from the far side. The marks touching Order answer "how many orders for one customer?", the marks touching Customer "how many customers for one order?". The ER diagram maker reads typed ends the same way.
- The inner mark is the maximum (a bar is one, a crow's foot is many) and the outer mark the minimum (a bar is one, a circle is zero). Neither notation uses arrowheads.
- Chen writes only the maximum, as 1, M or N. The minimum shows as participation: a double line when it is at least one (total), a single line when it is zero (partial). The ER diagram maker works both out from the same two ends.
- One-to-one has a maximum of one at both ends, as Person and Passport. One-to-many has one at the parent and many at the child, as Customer and Order.
- Many-to-many has many at both ends, as Student and Course. Neither table can hold it as a foreign key, so a database stores it as a junction table, which the ER diagram maker adds with one button.
- In the ER diagram maker an end is typed as 1, 0..1, 1..* or 0..*, as words such as zero or many, or as a Mermaid marker like ||--o{. The shorthand A 1:N B reads both minimums as zero.
ER diagram from SQL
Paste CREATE TABLE statements into the ER diagram maker and every table becomes a card and every foreign key a line, with both ends read from the constraints. The script below is the online shop example and the figure beside it is what the maker drew from it; the table under them lists the rules for primary keys, foreign keys and the marks they produce. A statement the reader cannot handle is listed by line number, never guessed.
CREATE TABLE customers (id INT PRIMARY KEY, email VARCHAR(120) UNIQUE NOT NULL, name VARCHAR(80)); CREATE TABLE orders (id INT PRIMARY KEY, customer_id INT NOT NULL REFERENCES customers(id), placed_at TIMESTAMP); CREATE TABLE products (id INT PRIMARY KEY, sku VARCHAR(32) UNIQUE, price DECIMAL(10,2)); CREATE TABLE order_items (order_id INT REFERENCES orders(id), product_id INT REFERENCES products(id), qty INT NOT NULL, PRIMARY KEY (order_id, product_id));
| In the SQL | In the ER diagram maker |
|---|---|
| PRIMARY KEY, inline or as a table constraint | PK badge on the column; a composite key puts PK on each of its columns |
| UNIQUE | UK badge on the column |
| A column without NOT NULL | A ? after its name |
| REFERENCES t(c), FOREIGN KEY (…) REFERENCES …, or ALTER TABLE … ADD FOREIGN KEY | FK badge, and one line from the parent's key row to that column |
| Foreign key columns NOT NULL or inside the primary key | Exactly one (two bars) at the parent end |
| A nullable foreign key column | Zero or one (a circle and a bar) at the parent end |
| Foreign key also UNIQUE, or the whole primary key | Zero or one at the child end: a one-to-one relationship |
| Any other foreign key | Zero or many at the child end |
| Foreign key inside the child's primary key | A solid line (identifying); otherwise dashed (non-identifying) |
| Primary key made of two foreign keys | Named in the status line as a junction table between the two parents |
| Whether every parent must have a child | Not expressible in DDL, so a child end never shows a minimum of one. Edit as ER text to set it |
ER diagram to relational schema
Mapping an ER diagram to a relational schema turns each entity into a table and each relationship into a foreign key or a table of its own, in a fixed order of steps. The ER diagram maker applies them to any Chen diagram, lists the tables under the card, and Draw this schema in crow's foot loads them into the other tab. The university example has a weak entity, a composite, a multivalued and a derived attribute, two one-to-many relationships and one many-to-many, and maps to seven tables.
| Table | Primary key | Foreign keys | Other columns |
|---|---|---|---|
| Student | student_id | — | first, last |
| Student_email | student_id, email | student_id → Student | — |
| Course | course_id | instructor_id → Instructor | title, credits |
| Instructor | instructor_id | dept_code → Department | name |
| Department | dept_code | — | name |
| Dependent | instructor_id, dep_name | instructor_id → Instructor | birth_date |
| Enrolls | student_id, course_id | student_id → Student, course_id → Course | grade |
The mapping steps the ER diagram maker follows
- Each strong entity becomes a table with its simple attributes. A composite attribute keeps only its components (first, last) and a derived attribute is left out.
- Each weak entity becomes a table with its owner's key as a foreign key, and its primary key is the owner's key plus the partial key (Dependent: instructor_id, dep_name). The ER diagram maker takes the owner from the identifying relationship.
- A one-to-one relationship puts the other entity's key as a foreign key on the side with total participation, which the ER diagram maker reads from the double line.
- A one-to-many relationship puts the key of the one side as a foreign key on the many side (Course.instructor_id, Instructor.dept_code).
- A many-to-many relationship becomes a table whose primary key combines both keys, plus the relationship's own attributes (Enrolls: student_id, course_id, grade).
- A multivalued attribute becomes a table of the owner's key and the value, which the ER diagram maker names Owner_attribute (Student_email).
- A relationship of three or more entities becomes a table with a foreign key to each (Supplies, in the ternary example).
One-to-one, one-to-many and many-to-many relationships
The three cardinality ratios, then the two cases a database course asks about next: the weak entity, and relationships among three entities or between an entity and itself. Each card opens its example in the ER diagram maker.
Many-to-many relationship and the junction table
A many-to-many relationship, such as students enrolling in courses, cannot be stored as a foreign key in either table, so the relational design adds a junction table, also called an associative entity, with one row per pairing. Enrollment's primary key is student_id plus course_id, both foreign keys, and it carries what belongs to the pairing itself, the grade. In the ER diagram maker, type Student 0..* -- 0..* Course : enrolls in, then press Add junction table: the many-to-many line becomes a StudentCourse table keyed by both ids, with a one-to-many line from each side, ready to rename Enrollment.
One-to-one relationship
Each person holds at most one passport and each passport belongs to exactly one person. The foreign key sits on one side and is declared UNIQUE: Passport.person_id is FK and UK, so the end at Passport is zero or one. Drop the UNIQUE and the same column allows many passports per person, which is how the ER diagram maker reads such a CREATE TABLE script.
One-to-many relationship
One customer places zero or many orders; each order belongs to exactly one customer. The foreign key goes on the many side, Order.customer_id, never on the one side. The one-to-many relationship ER diagram from the ER diagram maker shows two bars at Customer and a circle with a crow's foot at Order.
Weak entity ER diagram
A weak entity has no key of its own and is identified through its owner. A Dependent is known by name only among one employee's dependents, so dep_name is a partial key with a dashed underline. Dependent is a double rectangle, Supports a double diamond, and Dependent's line is double because every dependent has an employee. In the ER diagram maker's relational schema, its table's key is ssn plus dep_name.
Ternary and recursive relationships
A ternary relationship joins three entities through one diamond: a supplier supplies a part to a project, with the quantity on the diamond. It maps to one table keyed by all three; crow's foot joins two tables per line, so there it becomes an entity of its own. A recursive relationship joins an entity to itself, as Employee manages Employee in the ER diagram maker's Company example, through a nullable manager_id.
Conceptual, logical and physical data models
The three data models describe one database at three levels of detail, and each has its usual ER diagram. A conceptual ERD is agreed with the people who know the business, a logical ERD fixes every key and relationship, and a physical ERD is the schema as one database system will create it. The ER diagram maker draws all three; the last row says how.
| Conceptual data model | Logical data model | Physical data model | |
|---|---|---|---|
| Purpose | Agree on what the system stores and how things relate | Design tables, keys and relationships, independent of a product | Create the schema in one database system |
| Shows | Entities, relationships, key and main attributes | Every attribute, primary and foreign keys | Table and column names as created, types, constraints |
| Many-to-many | Drawn as it is | Resolved into a junction table | The junction table with its composite key |
| Data types | None | None, or generic ones | Exact types such as VARCHAR(120) or DECIMAL(10,2) |
| Usual notation | Chen, or crow's foot with names only | Crow's foot | Crow's foot with types |
| In the ER diagram maker | Chen tab | Crow's foot tab, Names only | Crow's foot tab with Show types, or pasted CREATE TABLE SQL |
How to make an ER diagram
- 1
List the entities and their keys
Write down the things the database keeps facts about, usually the nouns of the requirements: Member, Book, Loan. Give each one a key that picks out a single instance, and decide which attributes belong to which entity before you open the ER diagram maker.
- 2
Type them into the ER diagram maker
One entity per line as Name: column type PK, or paste the CREATE TABLE script if the tables exist already. Pick crow's foot for a table design, Chen for a conceptual model in a course.
- 3
Add the relationships with both ends
One line per relationship, A 1 -- 0..* B : label, the end beside each entity saying how many of it relate to one of the other. Ask the question in both directions before writing the line; the ER diagram maker redraws as you type.
- 4
Check the schema table, then download
The ER diagram maker lists the tables under the figure, so a many-to-many line without its junction table or a missing foreign key shows up there. Download the ER diagram as PNG, SVG or PDF.
ER diagram maker FAQ
What is the difference between an ER model and an ER diagram?
The ER model is the set of entities, attributes and relationships with their constraints; an ER diagram is one drawing of it. Chen introduced the entity relationship model in 1976 as a way to describe data apart from how it is stored. The same model can be drawn in Chen notation or in crow's foot notation. The ER diagram maker draws either, and turns a Chen diagram into crow's foot tables with one button.
What do the crow's foot symbols mean?
Each end of a crow's foot line carries two marks: the one touching the entity is the maximum, the outer one the minimum. A bar means one, a circle zero and the three-pronged crow's foot many, so the four ends are exactly one (||), zero or one (o|), one or many (|{) and zero or many (o{). The ER diagram maker draws them from the ends you type and never adds arrowheads, which crow's foot notation does not use.
Should I use Chen or crow's foot notation for a database class?
Use the notation of your course textbook, which for conceptual design is usually Chen. Elmasri and Navathe teach Chen's rectangles, diamonds and ovals for the conceptual model, with weak entities and total participation, and then map it to tables. Crow's foot is the usual notation for logical and physical designs and in database tools. The ER diagram maker draws both, so you can hand in the Chen diagram and check its tables in crow's foot.
Can the ER diagram maker make an ER diagram from SQL?
Yes, the ER diagram maker reads pasted CREATE TABLE statements and ALTER TABLE … ADD FOREIGN KEY, with MySQL backticks, SQL Server brackets and double quotes stripped. Primary keys, UNIQUE, NOT NULL and every foreign key come from the script, and each foreign key becomes one line whose ends follow its constraints. A statement it cannot read is listed by line number, and a foreign key to a table missing from the script is reported and not drawn.
Can I paste a Mermaid erDiagram?
Yes, the ER diagram maker reads Mermaid erDiagram text: relationship markers such as ||--o{, solid -- and dashed .. lines, labels, and attribute blocks with PK, FK and UK. It lays the cards out on its own grid, lists the relational schema under the figure and exports PNG, SVG or PDF. Use the From Mermaid example to see the format.
How is a weak entity drawn in an ER diagram?
In Chen notation a weak entity is a double rectangle joined to its owner through a double diamond, the identifying relationship, by a double line for its total participation. Its partial key, the attribute that tells apart the weak entities of one owner, has a dashed underline. In the ER diagram maker write weak Dependent: dep_name partial, birth_date, and relate it to the owner with 1 on the owner's end. Crow's foot has no special symbol: the child's primary key includes the parent's key and the line is solid.
How do you show a many-to-many relationship in a database?
With a junction table, whose primary key is two foreign keys, one to each side, so that each row records one pairing. Students and courses become Enrollment(student_id, course_id, grade). A conceptual ER diagram may draw the many-to-many line directly, as Chen does with M and N, but a crow's foot design for a database shows the junction table. The ER diagram maker notes every many-to-many line and adds its junction table with one button.
What is an EER diagram?
An EER (enhanced entity relationship) diagram adds specialization and generalization to the ER model: subclasses such as Student and Employee under Person, with a constraint saying whether they are disjoint or overlapping and whether every Person must belong to one. Elmasri and Navathe draw it with a circle marked d or o, and other books with an ISA triangle. The free ER diagram maker does not draw specialization; the AI ER diagram generator does, from a prompt that names the superclass, the subclasses and the constraints.
Is there a free ER diagram maker with no sign-up?
This ER diagram maker is a free ERD maker that needs no account: the layout runs in your browser tab and nothing you type is uploaded. PNG, SVG and PDF downloads and Print work without signing in; without an account, the ER diagram's corner shows a small scientificfigure.com mark. Only the AI ER diagram generator asks you to sign in.
Sources
- Peter Pin-Shan Chen, The Entity-Relationship Model: Toward a Unified View of Data, ACM Transactions on Database Systems 1(1), 9–36 (1976) — ACM
- Ramez Elmasri and Shamkant B. Navathe, Fundamentals of Database Systems, 7th edition, chapters 3 (the ER model), 4 (the EER model) and 9 (ER- and EER-to-relational mapping) — Pearson
Keep exploring
Our other diagram tools, and the guides behind them.
Tools
Draw your schema in the ER diagram maker
Type the tables or paste the SQL, check every cardinality and download the ERD. A free ERD tool that runs in your browser.
Open the ER diagram maker