INFO 340 - Entity Relationships Notes By: Egaas, Fortier, Prins Introduction to Entity Relationship Modeling: Modeling allows you to break apart your problem domain Design leads to a model: Sketching Prototyping Specification > Attributes are listed beneath entity > {PK} means primary key > Composite attributes (indented) Degree of Relationship: Binary > The number of entities that participate in a relationship > Binary - "Branch has Staff" Degree of Relationship: Unary > Unary (recursive) - "Staff supervises staff" > Other examples? Database Implementation > Part(id: integer; parent: integer, pname:string) > Primary Key - id > Foreign Key - parent What Does this Do? > SELECT * FROM Part WHERE parent_id = 0; - It would get the 1st level of the hierarchy from the previous slide Degree of Relationship > Ternary - "Staff registers a client at a branch" > Quaternary - "A solicitor arranges a bid on behalf of a buyer supported by a financial institution." Attribute Types > Attributes are listed beneath each entity > {PK} mean primary key > /derived attribute value (global variable per se) > Composite attributes (indented) > Multi-Valued attributes [1..3] Weak: Exists in the presence of another entity (strong) Strong: Can stand on its own