Entities and their fields are the heart of any ERD. In Schemity a table is called an entity; the columns are fields. This page explains every property so the editor holds no surprises.
How do I add an entity (table)?
Add an entity from the control bar and give it a name (typically a plural noun like users or orders). At the entity level you can also set:
- Name - the table name.
- Description - optional notes.
- Color - a custom color for the entity header.
- Charset and Collation - shown for MySQL only.
What can I set on a field?
Each field exposes these properties in the field editor:
- Field name - the column name, for example
emailorcreated_at. - Data type - the column type, with Length, Precision, and Scale where the type supports them. The available types match the connection’s engine (PostgreSQL, MySQL, SQL Server, or SQLite), shown as “Frequently used” and “All types”.
- Default value - a default chosen from type-specific options, or
CUSTOMto enter your own expression. - Description - optional notes on the field.
- PK - marks the field as part of the primary key. Mark more than one field to form a composite primary key.
- Unique - enforces a single-column unique constraint. For multi-column rules, see Check Constraints & Composite Unique.
- Nullable - whether the column allows
NULL. Clear it to make the columnNOT NULL. - Charset and Collation - shown for MySQL only.
Surrogate keys are expressed through the field’s data type and default (for example a serial/identity type with its engine-appropriate default), chosen from the type and default-value options above.
How do I make a field a foreign key?
A field becomes a foreign key when you draw a relationship from its entity to another entity’s key. Schemity adds and keeps the foreign key field in sync with the relationship.
How do I copy and paste entities and fields?
Copy entities or fields with Ctrl/Cmd + C and paste with Ctrl/Cmd + V to duplicate them.
Across diagrams, paste is merge-aware. If the target diagram already has an entity with the same name, pasting transfers only its visual attributes - position, size, and color, with the color carrying to the entity’s relationships - and leaves the schema untouched. If the entity does not exist in the target, it is pasted in full. This makes an arrangement portable: select a group of entities in one tab, paste them in another, and every matching entity snaps to the copied layout. Relationship shapes and waypoints are not transferred, since the other end of a line may sit somewhere different in the target diagram. Matching is by name, which is safe even across database schemas - Schemity opens PostgreSQL and SQL Server diagrams per schema, so names cannot collide.
On a live-connected diagram, a pasted entity the database does not have yet appears as a draft with a dashed border - see Keep Your ERD in Sync with the Database.
Good habits
- Give every entity a primary key.
- Use consistent naming - Schemity’s Naming setting (
snake_caseorcamelCase) keeps generated names uniform. - Set nullability deliberately; defaulting everything to nullable hides real constraints.
Next
Give every new entity the same starting fields with Templates.