Library Management System ER diagram and database schema
The Library Management System database schema is a DB Planner template with 24 tables, 164 columns and 45 relationships, free to use. Core tables include authors, book_contributors, book_subjects, books. It can be opened as an interactive ER diagram or exported as PostgreSQL, MySQL, or SQL Server DDL.
- Tables
- 24
- Columns
- 164
- Relationships
- 45
- Category
- Education
- Exports
- DBML, SQL, C#
- Price
- Free
What this schema models
A complete library management system database design, modeled on how real integrated library systems work rather than how textbook diagrams draw them. 24 tables, 13 enums and 45 relationships covering the catalog (books, authors, subjects, series), physical holdings across branches, members and borrowing rules, circulation (loans, renewals, holds and transfers), fines and payments, and acquisitions. THE FOUR DESIGN RULES 1. A BOOK is not a COPY. books is the bibliographic record, one row per title and edition; copies are the physical items with barcodes. Holds are placed on the book, so any copy can fill them; loans are made on a copy. 2. Loans are history, not state. A loan row is never deleted. An open loan is simply returned_at IS NULL, and a partial unique index allows only one open loan per copy. 3. Rules are snapshotted. A loan copies the fine rate and due date it was made under, so changing a member type never rewrites past loans. 4. Fines are a ledger. Charges, payments and the allocations between them are separate rows, so partial payments and waivers are exact and auditable. Money is stored in integer cents. DETAILS WORTH STEALING - The hold queue is ordered by placed_at, with no stored position column to keep renumbering. - copies.status is a cached convenience for the public catalog; the authoritative answer to "is it out?" is an open row in loans. - Every renewal is its own row, so "why is this due on the 14th?" always has an answer. - book_contributors carries a role, so translators, editors and narrators are credited correctly. - Transfers track copies travelling between branches to fill holds. - Notifications record what was actually sent, for the member who says nobody told them. WHAT YOU GET Clean DBML that imports directly into DB Planner, and a laid-out board with zones color-coded and framed: catalog, titles and acquisitions, holdings, circulation, members, and fines, payments and staff. Every table carries a note. Postgres-flavoured types that port cleanly to MySQL or SQL Server. Useful for developers building an ILS or library app, students who need a realistic library management system ER diagram for a DBMS project, and anyone looking for a reference model of circulation and holds. This is a schema design reference, not a certified library system.
Tables (24)
| Table | Columns |
|---|---|
| authors | 5 |
| book_contributors | 4 |
| book_subjects | 2 |
| books | 15 |
| branches | 7 |
| copies | 10 |
| fines | 9 |
| holds | 11 |
| loan_renewals | 6 |
| loans | 12 |
| member_types | 8 |
| members | 15 |
| notifications | 7 |
| payment_allocations | 3 |
| payments | 7 |
| publishers | 4 |
| purchase_order_lines | 6 |
| purchase_orders | 6 |
| series | 2 |
| shelf_locations | 4 |
| staff | 7 |
| subjects | 3 |
| transfers | 7 |
| vendors | 4 |
Relationships (45)
book_contributors.author_id references authors.idmany to onebook_contributors.book_id references books.idmany to onebook_subjects.book_id references books.idmany to onebook_subjects.subject_id references subjects.idmany to onebooks.publisher_id references publishers.idmany to onebooks.series_id references series.idmany to onecopies.book_id references books.idmany to onecopies.branch_id references branches.idmany to onecopies.shelf_location_id references shelf_locations.idmany to onefines.loan_id references loans.idmany to onefines.member_id references members.idmany to onefines.waived_by references staff.idmany to oneholds.book_id references books.idmany to oneholds.fulfilled_loan_id references loans.idmany to oneholds.member_id references members.idmany to oneholds.pickup_branch_id references branches.idmany to oneholds.ready_copy_id references copies.idmany to oneloan_renewals.loan_id references loans.idmany to oneloans.checked_in_by references staff.idmany to oneloans.checked_out_by references staff.idmany to oneloans.checkout_branch_id references branches.idmany to oneloans.copy_id references copies.idmany to oneloans.member_id references members.idmany to oneloans.return_branch_id references branches.idmany to onemembers.home_branch_id references branches.idmany to onemembers.member_type_id references member_types.idmany to onenotifications.hold_id references holds.idmany to onenotifications.loan_id references loans.idmany to onenotifications.member_id references members.idmany to onepayment_allocations.fine_id references fines.idmany to onepayment_allocations.payment_id references payments.idmany to onepayments.member_id references members.idmany to onepayments.received_by references staff.idmany to onepurchase_order_lines.book_id references books.idmany to onepurchase_order_lines.purchase_order_id references purchase_orders.idmany to onepurchase_orders.branch_id references branches.idmany to onepurchase_orders.ordered_by references staff.idmany to onepurchase_orders.vendor_id references vendors.idmany to oneshelf_locations.branch_id references branches.idmany to onestaff.branch_id references branches.idmany to onesubjects.parent_id references subjects.idmany to onetransfers.copy_id references copies.idmany to onetransfers.from_branch_id references branches.idmany to onetransfers.hold_id references holds.idmany to onetransfers.to_branch_id references branches.idmany to one
How to use this template
- Open the ER diagram to see the tables and how they relate.
- Copy it into your workspace. You get your own editable copy, in DBML.
- Export it as PostgreSQL, MySQL, or SQL Server DDL, or as C# models.
The copy opens in DB Planner’s ER diagram tool, with the schema as text in the DBML editor beside it. Have a database already? Turn its SQL into an ER diagram instead.
Frequently asked questions
- What is in the Library Management System database schema?
- 24 tables and 45 relationships, across 164 columns. The table names and the full relationship list are shown on this page.
- Can I export it to PostgreSQL or MySQL?
- Yes. Every DB Planner template exports as DBML, as PostgreSQL, MySQL, or SQL Server DDL, and as C# models.
- Is this template free?
- Yes. You can open it in the browser without an account, and copy it into your own workspace with a free DB Planner account.
- Can I change it after copying it?
- Yes. A copy is yours: you can rename tables, add columns, and export it. Changes the author makes later do not affect your copy.