Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Information Modelling and the logical data structure.

Similar presentations


Presentation on theme: "Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Information Modelling and the logical data structure."— Presentation transcript:

1 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Information Modelling and the logical data structure

2 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Information Modelling l What is an entity? l What do we mean by relationship ? l Why model the data in a system? l What is a logical data structure? l LDS notation

3 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing What is an entity? An entity is a ‘thing’ which can be distinctly identified some distinct identifiable thing for which the system must store data in order to perform its fundamental activities

4 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Attributes of an entity An entity (or object) will have certain features that can take different values. These features are called attributes. An attribute is an elementary data element that describes an object or a fact about an object

5 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Entity examples Entities can be described by: customer = customer number + customer name + customer address person = name + addr + NI# + occupation + DOB + height etc... Or customer (customer number, customer name, customer address)

6 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Entity guidelines l Entity names should be a noun or noun phrase l Names should represent the role or classification of the thing l Uniquely identifiable occurrences l Entities must have attributes l Should be of interest to the business

7 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Identifying entity occurrences (1) A means to identifiy one entity occurrence from another is needed. A candidate key is an attribute, or set of attributes, of an entity which uniquely identifies a single occurrence from all others

8 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Identifying entity occurrences (2) A primary key is A alternate key is the particular candidate key chosen to identify a single entry a candidate key not chosen to be the primary key

9 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing What do we mean by relationship? A relationship l represents a set of connections between objects l represents an association between objects in the real world l is an association between two (or more) entities

10 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Relationship guidelines l Occurrences of a relationship created when events occur l Regard as a sentence with place holders works in l Use active rather than passive names reports to rather than is reported to

11 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Why model data in a system? l The information model describes the information required to support the system l It helps to organise information and define what it means Examples attendee name public course and course full course

12 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing The information model (1) Carefully organised and defined info l helps info to be understood l avoids redundancy l ensures correctness, validity and completeness

13 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing The information model (2) The information model concerns: l entities - categories of things that information describes l relationships - associations between entities l attributes - qualities or properties of entities

14 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Information example Given the following statement of purpose of a system determine the entities, relationships between them and the attributes required. Trent College requires a new student record system to be set up. It must be able to show who is on which course and in which department it is run. It should hold student information for mail shots etc.

15 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing What is a logical data structure (LDS)? An LDS is a graphical representation which It is a semantic modelling tool which helps to clarify concept highlights important categories of information (entities) and relevant associations between them (relationships)

16 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing The LDS Used to identify and organise information used by the system (not just stored) AB C X Y

17 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing LDS notation (1) l The entity l The relationship LecturerCourse teaches taught by

18 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing LDS notation (2) l Connecting entities via relatioships LecturerCourse teaches taught by ProjectPart uses used by Supplier Supplies Supplied by

19 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Cardinality of a relationship l 1:1 l 1:N l M:N LecturerCourse teaches taught by LecturerCourse teaches taught by LecturerCourse teaches taught by

20 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Participation in a relationship OfficeEmployee occupied by occupies OfficeEmployee occupied by occupies OfficeEmployee occupied by occupies OfficeEmployee occupied by occupies

21 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Recursive relationships A relationship from one entity type to itself Eg, Employees may be managers too May also be 1:1, or M:N Employee managed by manages

22 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Sub-types/Supertypes Treatment In Patient Patient Out Patient Doctor Out-patient Treatment Out-patient Department Bed provides provided by given to given given to given given by gives occupies occupied by

23 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing LDS construction guidelines l Define the area for analysis l Determine entities and attributes l Determine key attributes of entities l Add remaining attributes to entities l Determine the relationships between the entities l Examine events and operations of system to ensure that the model supports them

24 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Data dictionary entries Entities l Definition of its role l Attributes that describe it Relationships l Reference to entities involved l Cardinality/Optionality

25 Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Summary l Entities l Attributes l Relationships l Logical data structure l Cardinality of relationships l Participation of relationships l Data dictionary


Download ppt "Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Information Modelling and the logical data structure."

Similar presentations


Ads by Google