Entity-relationship Diagram Exercises And Answers Pdf • Extended & Ultimate
\textbfTask: Draw the ERD. Identify primary keys, entity attributes, and relationship cardinality.
\begindocument
\textbfNotation: We use \textbfCrow's Foot notation. \beginitemize \item Entities: Rectangles \item Primary Key: Underlined attribute \item Relationships: Diamonds (or labeled lines) with crow's foot for many side. \item Cardinalities: 1 (one), M (many), (0,1) optional one, etc. \enditemize entity-relationship diagram exercises and answers pdf
% Relationship \node[diamond, draw, aspect=2, minimum width=2cm, minimum height=1cm, below=1.2cm of $(student.south)!0.5!(course.south)$] (enroll) ENROLLS; \node[below=0.2cm of enroll, align=center] \tiny enrollment\_date; \textbfTask: Draw the ERD
\documentclass[12pt,a4paper]article \usepackage[utf8]inputenc \usepackagegeometry \geometrymargin=1in \usepackagegraphicx \usepackagetikz \usetikzlibraryshapes,arrows,positioning,fit \usepackagefloat \usepackagehyperref \usepackageenumitem \usepackagetcolorbox 1) optional one
\draw (dept) -- (manages) node[midway, above] 1; \draw (emp) -- (manages) node[midway, below] 1; \endtikzpicture \captionCompany ERD \endfigure
% Course Entity \node[rectangle, draw, minimum width=2.5cm, minimum height=1cm, right=of student] (course) COURSE; \node[above=0.2cm of course] \textbfCourse; \node[below=0.1cm of course, align=center] \tiny course\_code (PK)\\ title\\ credits;