G061 - Entity Relationship Diagrams
Learning Objectives: By the end of this topic you should be able to: describe, interpret and create Entity Relationship Diagrams for a given scenario
Entity Relationship Diagrams an ERD represents the structure of data in a system relationships are the links between entities in a relational database an ERD shows the entities & the relationships between them
Library Database Members of a library are loaned books Entities: MEMBERS(MembersID, Forename, Surname, …..) BOOKS(BookID, ISBN, Title, Author, ….) LOANS(LoanID, MembersID, BookID, DateOut, …)
Library Database MEMBERS
Library Database MEMBERS LOANS
Library Database MEMBERS LOANS
Library Database MEMBERS LOANS BOOKS
Library Database MEMBERS LOANS BOOKS
Library Database MEMBERS MemberID LOANS LoanID BOOKS BookID
Library Database MEMBERS MemberID LOANS LoanID MemberID BOOKS BookID
Library Database MEMBERS LOANS BOOKS MemberID LoanID MemberID BookID
Library Database MEMBERS LOANS BOOKS MemberID Forename Surname PostCode LOANS LoanID MemberID BookID DateOut BOOKS BookID Title Author ISBN
Library Database MEMBERS LOANS BOOKS MemberID Forename Surname PostCode LOANS LoanID MemberID BookID DateOut BOOKS BookID Title Author ISBN MEMBERS(MemberID, Forename, Surname, PostCode) BOOKS(BookID, Title, Author, ISBN) LOANS(LoanID, MemberID, BookID, DateOut)