1 / 25

Constraints

Constraints. Overview. Unique Identifiers Arcs Domains Various other constraints. Rembrandt. Identification and Representation. G. Papini, please?. EMPLOYEES. Name PAPINI HIDE PAPINI BAKER. Initials G. T.M. G. S.J.T. Birthdate 02-FEB-1954 11-JUN-1961 02-FEB-1945 24-SEP-1958. JOB

Télécharger la présentation

Constraints

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Constraints

  2. Overview • Unique Identifiers • Arcs • Domains • Various other constraints

  3. Rembrandt

  4. Identification and Representation G. Papini, please? EMPLOYEES Name PAPINI HIDEPAPINI BAKER Initials G.T.M.G.S.J.T. Birthdate 02-FEB-195411-JUN-196102-FEB-194524-SEP-1958

  5. JOB COMPUTER IN NETWORK TELEPHONE EMPLOYEE MAIL LIST Unique Identifier Examples Name IP Address Country code, Area code, Telephone number Employee number Name, Initials, Birth Date Name, Owner or

  6. Unique Identifier Indicates Unique Identifier CUSTOMER# Family Nameo Initials# Addresso Telephone ORDER# Date by responsible for Indicates Unique Identifier

  7. Unique Identifiers USER# Name owner of part of owned by contains MAIL LIST# Name ROOM# No FLOOR# No HOTEL# Name

  8. Multiple Relationship UID USER# Name USER# Name owner of owner of isreferred to part of owned by contains owned by LIST# Name LIST# Name contains referring to contained in LIST ITEM

  9. Z# Z1o Z2o Z3# Z4 Well-defined Unique Identifiers Q# Q1 P# P1 Y# Y1# Y2 K L # L1 X# X1 M# M1 R# R1 XY T# T1 S

  10. G# G1 L# L1 F# F1 K# K1 R# R1 P# P1 KL To # T1 Q# Q1 G# G1 H Incorrect Unique Identifiers

  11. 54.0.093.81 Information-Bearing Codes Product GroupIn Production?FactorySequence Number PRODUCT GROUP# Code PRODUCT # Code* In Production?* Sequence No FACTORY# Id

  12. Contract Conditions Std? 123456 Arcs “A contract consists of contract components; these are standard conditions or customized conditions” CONTRACT STANDARDCONDITION basis for based on consists of in CUSTOMIZEDCONDITION Arc in Indicates relationship in arc part of referring to referring to CONTRACT COMPONENT

  13. Exclusive Arc USER ownerof owned by LIST container of is referred to is referred to contained in referring to referring to LIST ITEM

  14. Possible Arc Constructs

  15. The arc “belongs” to one entity • Relationships in the arc must be of the same optionality • Arcs must contain at least two relationships An arc may be correct, but is quite difficult to implement ... Some Incorrect Arc Constructs

  16. Arc or Subtype ADDRESS USER ownerof ownerof USER owned by owned by LIST LIST is referred to contains is referred to contains is referred to referring to referring to in in referring to LIST ITEM LIST ITEM

  17. A C A B C A B C B 3 4 5 R R Q Q P P P Q Arc and Subtypes A A 1 2 R Q Q P P

  18. Every A is either a B or a C Every B is an A Every C is an A Subtypes Hide Relationships in Arc • Every A mustbe a B orbe a C • Every B must be an A • Every C must be an A A A is B B is is C C is

  19. Value sets CODE TYPE# Id* Name* Max Length of Description A YESNO# Code* Description B GENDER# Code* Description CODE# Code* Description WEEKDAY# Code* Description

  20. Other Constraints: Range Check EMPLOYEE* Name* Address JOB* Title* Minimum Salary* Maximum Salary between with of for referring to EMPLOYMENT* Start Dateo End Date* Salary

  21. Other Constraints: State Value Transition SinMarWidDivDP Possible Marital Status Transitions to EMPLOYEE* Name* Address* Current Marital Status from SingleMarriedWidowedDivorcedDomestic Partnership

  22. Conditional Relationship CONTRACT# Id* Standard Indicator STANDARDCONDITION basis for based on consists of in CUSTOMIZEDCONDITION in part of referring to referring to CONTRACT COMPONENT

  23. Boundaries EXTERNAL # Id* Description* Value unrelated entity and possible implementation EXTERNALS Id 1234 Description Value added tax %Maximum available Space per Mail User in MbyteMaximum level of Nested Mail FoldersMaximum level of Nested Mail Lists Value 15500316

  24. Summary • Identification • Can be a real problem in the real world • Models cannot overcome this • Entities must have at least one Unique Identifier • Unique Identifiers consist of attributes or relationships or both • Arcs • Many types of constraint are not represented in ER model

  25. Practices • Identification Please • Identification • Moonlight UID • Tables • Modeling Constraints

More Related