Presentation is loading. Please wait.

Presentation is loading. Please wait.

Entity-Relationship Diagrams Elements, Syntax Guidelines Dictionary.

Similar presentations


Presentation on theme: "Entity-Relationship Diagrams Elements, Syntax Guidelines Dictionary."— Presentation transcript:

1 Entity-Relationship Diagrams Elements, Syntax Guidelines Dictionary

2 Aim of part III zThe subject domain of a software system is the part of the world talked about by the messages that cross the system interface.

3 TIS

4 Juice Factory

5 E-tickets

6 Entity type zRepresented by a rectangle. zExtension yAll possible instances of entity type. z Extent yAll existing instances of entity type. zIntension yAll properties shared by all possible instances. zDefining intension yProperties used to define the entity type. This is an abstraction of the full, informal meaning.

7 Attributes zProperties of entities. zCan be listed in a compartment directly below the type name compartment.

8 Relationships zA set of tuples of entities. zArity is the number of related entities. Binary, ternary, etc. zWe only describe a relationship if we want to express relative cardinality properties: How many entities of one type can exist for each entity of another type.

9 Elevator system To find a cardinality property, imagine looking at an arbitrary state of the domain and ask how many instances of some entity type can exist in that state.

10 Inconsistent cardinality properties Path expressions

11 Association entities

12 Generalization Instance of a subtype is instance of a supertype

13 Dynamic vs. Static specialization d: disjoint subtypes c: covers supertype

14 ERD Modeling Guidelines zERDs can be used to declare any set of entity types and their cardinality properties. zWe use ERDs only to represent the structure of the subject domain. zGuidelines to determine the boundary of the subject domain are relevant for this kind of use of ERDs only. zAll the other guidelines are relevant for all possible uses of ERDs.

15 Subject domain boundary zFinding entities and events in the subject domain: yRough approximation: What entities and events do the service descriptions refer to? yBetter approximation: What are the messages entering and leaving the system about? xPhysical bodies, Devices, (Parts of) organizations, Conceptual entities, Lexical items xEvents involving these entities yEntities and events should be identifiable by the SuD

16 Elevator system

17 Entities vs. attributes zEntities are the things that the system talks about. zAttributes are the things said about entities. ySo if you want to store information about it, it is an entity. zIf information about it can change, it is an entity zEntities have non-derivable properties yRequire real-world observations zAttributes have derivable properties

18 Entity or attribute???

19 Specialization attributes

20 Static or dynamic specialization?

21 Classification and identification zA type definition should provide a recognition criterion and an identification criterion. y“Is this a car?” - recognition y“How many cars do we have here?” - identification

22 Subtypes or roles?

23 Validation zFour suggestions: yConsistency yElementary Sentences ySnapshots yIdentification

24 Consistency of cardinality properties

25

26 Elementary Sentences zAt each moment: yA batch of juice has exactly one recipe. yA recipe may be applicable to any number of batches. yAt any point in time, a heating tank has at most one batch allocated to it. yAt any point in time, a batch is allocated to either 1 or 2 heating tanks. yEach heating tank has exactly one heater.

27 Snapshots

28 Identification zMessages entering and leaving the system. zService descriptions

29 History

30 Event

31 Dictionary zA dictionary should contain: yWords used in service descriptions yWords used in messages that cross the external interface yDomain-specific jargon zThe subject domain ERD is a visual supplement to the dictionary

32 Domain ontology zDomain is part of the world treated as a whole. zOntology is a meta classification.

33 Syntactic categories zIdentifier -- Unique proper name. z Predicate name. yEntity type name. yRelationship name. yState predicate name. Boolean property. z Attribute name. z Event name.

34 An elevator control specification zPlanned direction (c: Elevator cage). Attribute. The preferred direction in which c will depart after closing its doors. If there are requests to be served higher and lower than the current floor of the elevator cage, then it will depart in the planned direction. zRound trip time. The time in seconds for a single car trip around a building from the time the cage doors open at the main terminal until the doors reopen when the cage has returned to the main terminal floor after its trip. zAt_floor(b: Request button, c: Elevator cage). Predicate. yc.current floor = b.floor. z continue (c: Elevator cage). Action. Term is applicable only if yc.planned direction <> none. yIf c.planned direction = up then start up (c.motor). yIf c.planned direction = down then start down (c.motor). zThe motor of c is started in the planned direction of c.

35 Defining Concepts zExtensional definitions list a few instances of the concept. yEasy to give. But do not define an intension. zIntentional definition lists the defining properties shared by all instance of the concept. yDifficult zAdvice: yGive a few examples, a sketch of the intent, and indicate the procedure that determines whether an instances falls under the concept.

36 Define a term zTo clarify a term. zTo indicate that the term is open-textured. zTo indicate that we attach little meaning to it. zThe term is absolutely obvious to all stakeholders -- but they attach different meanings to it.

37 Do not define a term zTo raise a cloud of obscurity. yBad idea, but frequent practice. zDefinitions can also be found in technical documentation of devices. yDon't repeat these. zThe term is absolutely obvious to all stakeholders yThey understand the same by it.

38 Genus and difference Identificationrecognition

39 Operational definitions zExample - Heating tank: yEntity type. A tank with a heater and thermometer attached. The heater can be recognized by red, blue and black wires leading up to it, and the thermometer by its rectangular shape

40 Abbreviations versus correspondence rules zAbbreviation: yTo determine whether an individual is an instance of the defined concept, you do not need new observations but simply look up words in the dictionary. zCorrespondence rules: yTo determine whether an individual is an instance of the defined concept, you must make observations.


Download ppt "Entity-Relationship Diagrams Elements, Syntax Guidelines Dictionary."

Similar presentations


Ads by Google