% Better to use explicit relationship diamond for clarity \endtikzpicture \endfigure \noindent Alternative clear diagram: \beginfigure[H] \centering \begintikzpicture \node[rectangle, draw] (dept) DEPARTMENT; \node[rectangle, draw, below=2cm of dept] (emp) EMPLOYEE; \node[diamond, draw, left=1cm of dept] (works) WORKS\_IN; \node[diamond, draw, right=1cm of dept] (manages) MANAGES;
\newpage
\textbfTask: Draw a ternary relationship ERD. entity-relationship diagram exercises and answers pdf
\titleEntity-Relationship Diagram (ERD) Exercises \\ with Answers \authorDatabase Design Workbook \date\today
\draw (member) -- (borrows) node[midway, left] M; \draw (book) -- (borrows) node[midway, right] M; \endtikzpicture \captionLibrary ERD \endfigure \noindent Cardinality: Many-to-Many between MEMBER and BOOK via BORROWS. % Better to use explicit relationship diamond for
\textbfTask: Draw the ERD showing a weak entity (Line Item) and its identifying relationship.
\begindocument
\newpage
% Optional: show as associative entity? For clarity, many-to-many with attribute. \endtikzpicture \captionERD for University Enrollment (Many-to-Many with attribute) \endfigure \noindent\textitNote: In physical design, ENROLLS becomes a bridge table containing student\_ID, course\_code, and enrollment\_date. draw] (dept) DEPARTMENT
\section*Appendix: Quick ERD Notation Reference \begintcolorbox \begintabular \hline \textbfSymbol & \textbfMeaning \\ \hline Rectangle & Entity \\ Oval & Attribute (sometimes omitted, listed inside entity) \\ Diamond & Relationship \\ Underline & Primary Key \\ Double Rectangle & Weak Entity \\ Double Diamond & Identifying Relationship \\ 1 at line end & One cardinality \\ M or * at line end & Many cardinality \\ Circle (O) & Optional participation \\ \hline \endtabular \endtcolorbox