61
CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

Embed Size (px)

Citation preview

Page 1: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 1

Lecture No. 2Lecture No. 2

Project Planning / ManagementDatabase Design

Entities, Relationships, Modelling

Page 2: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 2

Important DatesImportant Dates

Wednesday 16th March :

Semester 1 ‘Enrolment Statement’ issued to all students

Page 3: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 3

Data Base PrinciplesData Base Principles

This Lecture’s Objectives:

1. To briefly look at some Project Planning activities

2. To further develop aspects of Database Design

3. To introduce you to Entities and Entity relationships

4. To work through some examples of E-R modelling

Page 4: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 4

Project PlanningProject Planning

• Planning• Scheduling• Cost Tracking• Resource Management• Reporting

Software FunctionsReal time interactive operationAdd / Delete itemsChange logic dependencies

Adjust calendar and calendar dependenciesChange resource and availability levels and datesMouse driven : Multiple platforms

(Microsoft, MacIntosh)

Page 5: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 5

Project PlanningProject Planning

1. Project Manager’s Controls - Schedule

- Costs

- Technical

- Resources

2. Goals, Objectives, Targets, Disciplines

3. Development of Project Definition / Scope

4. Performance Assessment Criteria

5. Level of Detail in Planning

6. Feed back and Controls

7. Replanning and Rescheduling

8. Budgeting

Page 6: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 6

Project PlanningProject Planning

Task / Week 1 2 3 4 5 6 7Analysis

Design

Review

Programming

Implementation

- Plan

- Manuals

System Testing

Review

Acceptance Test

Review Results

Handover

Page 7: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 7

PERT DiagramPERT Diagram

start

Get Mix Pour intoingredients Ingredients cake pan

Preheatoven

Place Bake Removecake in cake cake fromoven oven

Page 8: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 8

Your ProjectYour Project

Why did we divert into Project Planning ?

Your assignment is a project, and the resources (you skills, your time, computer time and the preparation of the various deliverables need to be carefully managed.

One of the team will need to take the role of Co-ordinator, and one (not necessarily the same person) will need to take the role of Quality Controller and Reviewer - i.e. to critically review what the team have done or are intending to do.

One person will be the minute taker of your meetings, and there will probably be the recognition of individual skills

(e.g. screen design)

Page 9: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 9

Data Base DesignData Base Design

Page 10: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 10

Data Base DesignData Base Design

· Reduce data redundancy.

· Provide stable data structures that can be readily changed with changing user requirements.

· Allow users to make ad hoc requests for data.

· Maintain complex relationships between data elements.

· Support a large variety of decision needs

Page 11: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 11

End Product of Data Base DesignEnd Product of Data Base Design

A database which will:

• Accurately reflect the ‘real world’ data in all required aspects

• Be responsive to Management Information demands

• Reflect Business Rules and Controls

• Be capable of modification to meet changes in Management needs

• Be an asset to the Organisation/Enterprise

Page 12: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 12

Business Functions and ProcessesBusiness Functions and Processes

• Business Functions :

Broad groups of closely related activities and decisions which contribute to a product or service like cycle. (e.g. planning, materials management, production planning, quality assurance).

Page 13: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 13

Business Functions and ProcessesBusiness Functions and Processes

• Business Processes : Decision related activities which occur within a function. They are related to management of people, money, material and information.

• Materials Management (Business Function)could be

subdivided into: requirements planning, purchasing, goods

received, material accounting, stock-keeping

Business Processes should reflect related activity groupings

Page 14: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 14

Business ActivitiesBusiness Activities

Business Activities : Specific operations or transactions

required to carry out a process

Some guidelines:

An activity should produce some clearly defined (identifiable) result - a product, a decision, a plan ......

An activity has clear boundaries - a clear beginning and end. Activities do not overlap.

An activity is carried out as a unit, by a single agent or a team

Once initiated, an activity proceeds independently of and from other activities.

Page 15: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 15

Business EntitiesBusiness Entities

Are persons, objects or events about which Information is, or will be, recorded in the Information Data Base

Many of these Entities can be identified with Business Activities (e.g. supplier , purchase order , customer)

(notice the use of the singular noun - there is no particular standard)

Page 16: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 16

Critical Success FactorsCritical Success Factors

* Key factors which must be performed well to ensure the success of an organisation

* Also known as Critical Performance Items CPI

and Key Performance Indicators KPI

e.g. production failure rate < 0.01% of total production units

production cost increases <= c.p.i. increases

customer service complaints < 1% of all customer transactions

absenteeism < 1% of staff in any 24 hour period

product quality => advertised standards (water, power)

no more than 1% of trains > 3 late at destination

Page 17: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 17

Design CriteriaDesign Criteria

- data availability

- data reliability

- data currency

- data consistency

- data flexibility

- data efficiency

Verify these criteria are satisfied via technical review

Page 18: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 18

Database DesignDatabase Design

- the process of developing database structures from user information requirements

- a structured methodology

Structured Methodology - a number of ordered formalprocesses with known inputs and expected outputs

Objectives

1. derive relationships2. evolve to meet user requirements3. user requests are met within reasonable time limits

Page 19: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 19

3 Schema Architecture3 Schema Architecture

The Primary Objectives of a DBMS are to providefacilities for :

1. Definition of Database Logical Structures

2. Definition of Physical Structures

3. Access to the Database

4. Definition of Storage Structures to store user data

These components are known as the ‘database architecture’

Page 20: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 20

3 Schema Architecture3 Schema Architecture

EXTERNALSCHEMAS

CONCEPTUALSCHEMA

INTERNALSCHEMA(Storage Views)

user 1 user 2 user..nlogical

logical

physical

(as seen by database analysts, designers, programmers and the Data Base Administrator)

(as seen by the Operating System and the Data Base Administrator)

SCHEMA: Describes data in the data base - also sub-schema

Global

Page 21: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 21

3 Schema Architecture3 Schema Architectureexternal external external external view A view B view C view X Cobol C Assembler External+ DML + DML DML + DML Schemas

dbms Conceptual Model Conceptual Schema

Internal Model Internal Schema

Physical Level

userinterface

logicalrecord

interface

storedrecord

interface

physicalrecord

interface

operatingsystem

Page 22: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 22

Progression StagesProgression Stages

The previous overhead gave the foundation for the stages of design

Stage 1: The Conceptual Design (External Schemas) - the recognition and understanding of user requirements.

The purpose of this stage, which is independent of any / all physical considerations, is to construct a model of the information used in an organisation or business

Data flow diagrams, data structure diagrams are the ‘tools’

Page 23: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 23

Progression StagesProgression Stages

Stage 2 : Logical Database Design

This is the stage where a model is constructed of the information used in an organisation

The model is a specific model (E-R Diagram, UML, O-O model) but is independent of any DBMS

Stage 3 : Physical Database Design

This describes the base relations, file organisations, indexes, integrity constraints and security. It is tailored to a specific DBMS

Page 24: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 24

Database DesignDatabase Design

FunctionalRequirements

Information LevelDesign Processes

Final InformationLevel Design

PhysicalConstraints

PhysicalLevel Design

Final DatabaseStructure

Other mattersDomains, Nulls, Derived Data,Encoded Data.

Data Base Model

Page 25: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 25

Database DesignDatabase Design

4th Generation Environment - User Perception

user terminal

teleprocessing report query electronicmonitor writer language mail

applicationprograms

data dictionaryDBMS

database

structured and non-structured dataimages, graphics, video,voice

Page 26: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 26

Data ModellingData Modelling

Data Modelling is about - Structuring and Organising Data

Leads to the emergence of Records Attributes Data Types Constraints Semantics e.g. age relates to ? person ? building ? isotope ? galaxy ?

Commercial Data Base ModelsHierarchical Specific organisation and relationships between records held in the databaseNetwork Relational Constraints, domains, conditions of update, inserts, deletes, modifications, access

Page 27: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 27

EntitiesEntities

• The designation of a ‘thing’ about which data is to be collected

stored

processed

• Typical Entities : person , item , building , stock ,

vehicle , job , book , library

Page 28: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 28

Entity Relationship DiagramsEntity Relationship Diagrams

Used to model relationships

1 to 1 relation 1:11 to Many 1:MMany to Many M:N (real world situations)

vehicle regn no

department staff

supplier item

1:1

1:M

M:N

Also :-OptionalMandatoryoccurrence

Page 29: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 29

Entity RelationshipsEntity Relationships

One to One

One to Many

Many to One

Many to Many

Page 30: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 30

Logical Data ModellingLogical Data Modelling

• 3 types of data objects:– Entities– Attributes– Relationships

• Entities: Are persons, places, or things about which data is to be, or is, gathered

• Attributes : Are the properties of entities

Examples are Names, Tax Numbers, Age, Status• Relationships : Describe how entities relate to each other

e.g. Customers BUY Products

Persons WORK ON Jobs

Page 31: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 31

Logical Data ModellingLogical Data Modelling

Entity-Type : An entity type represents the class of Objects which share some common aspect -

such as Jobs, Persons, Materials, Houses

Entity-Occurrence : Also called ‘entity instance’

Example : “3 bedroom, brick veneer, 10 years old” are some of the actual values of an

entity instance of the Entity Type ‘House’

Page 32: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 32

Logical Data ModellingLogical Data Modelling

CARDINALITY

Premise: If an entity ‘A’ relates to another entity ‘B’, then the conditions of occurrences of ‘A’ and ‘B’ need to be known.

Cardinality : The specification of the number of occurrences of 1 entity type which can be related to the

number of occurrences of another entity type

Cardinality is expressed as ‘one’ or ‘many’

Page 33: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 33

Logical Data ModellingLogical Data Modelling

2 entities can be related as :

One to One : (1 : 1)

The interpretation of this is that an occurrence of an entity ‘A’ can relate to ONE and ONLY ONE occurrence of entity ‘B’, and an occurrence of entity ‘B’ can relate to ONE and ONLY ONE occurrence of entity ‘A’

One to Many : (1: M) or (1 : N)

The interpretation is that ONE occurrence of entity ‘A’ can relate to ONE or MORE occurrences of entity ‘B’, but an occurrence of entity ‘B’ can relate to ONE ONLY occurrence of entity ‘A’

Page 34: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 34

Logical Data ModellingLogical Data Modelling

Many to Many (M : N) - a common business relationship

The interpretation is that ONE or MORE occurrences of entity ‘A’ can relate to ONE or MORE occurrences of entity ‘B’ and ONE or MORE occurrences of entity ‘B’ can relate to ONE or MORE occurrences of entity ‘A’

Page 35: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 35

Logical Data ModellingLogical Data Modelling

MODALITY

An extension of relationship

Indicates whether an occurrence MUST PARTICIPATE in a relationship

Cardinality indicates the maximum number of entity occurrences which can participate in a relationship

Modality indicates the minimum number of occurrences

Modality = 0 if an occurrence is not needed or is optional

Modality = 1 if an entity occurrence is required or mandatory

Page 36: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 36

Logical Data ModellingLogical Data Modelling

DEGREE

Relates to the number of entity types associated in a relationship

UNARY - The entity type is related only to itself (also called recursive)

BINARY - Two entity types are related (most common case)

TERNARY - A relationship involving more than two entity types

Page 37: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 37

Logical Data ModellingLogical Data Modelling

ATTRIBUTE TYPES and ATTRIBUTE VALUES

An attribute type is an occurrence of a named set of values

e.g. ‘size’, ‘name’, ‘mass’, ‘person_id’

An attribute value is an occurrence (or instance) of an attribute type

An attribute value is a characteristic of, or a fact about an entity occurrence

e.g. Attribute ‘size’ Attribute value ‘25.4mm’

Entities/Attributes are often referred to as ‘meta-data’, that is ‘data about data values’

Page 38: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 38

Logical Data ModellingLogical Data Modelling

DOMAINSA ‘Domain’ is a set of possible values which an attribute set can

adopte.g. dates, integers, person name constructions, post codes

3 Main Types of Domains:Data Type : Numeric, Text, Integer, Date .....Ranges : Values between sets

‘Employee IDs must be between 10156 and 10987’

Acceptable Values : Specific Post Codes, Area Codes, Names of Prominent People, Building

Names They indicate the only values an attribute can have. All of these features contribute to ‘Database Integrity’

Page 39: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 39

Logical Data Modelling Logical Data Modelling

shiphands shipssail

Relationships Representation

Page 40: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 40

Logical Data ModellingLogical Data Modelling

Cardinality

Meaning : ONE Meaning : MANY

Course Units

Page 41: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 41

Logical Data ModellingLogical Data Modelling

Mandatory - Optional Relationship

Artists paint Pictures

Unary Relationship

(BinaryRelationship)

Ternary Relationship

customers cars

dealers

buy

Page 42: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 42

Logical Data ModellingLogical Data Modelling

ENTITIES

RELATIONSHIPS

ATTRIBUTES

membership class

degree

domains

values

cardinality

modality

recursive

binary

n-ary

1 : 11 : NM : N

mandatory

optional

Page 43: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 43

Entity RelationshipsEntity Relationships

part

vendorwarehouse

quantity

delivers

Quantity is the amount of a particular ‘part’ shipped from a particular‘vendor’ to a particular ‘warehouse’.

Each entity may be a ‘one’ or‘many’ participant

Page 44: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 44

Logical Data ModellingLogical Data Modelling

• Modelling symbols - McFadden, Hoffer, Prescott

Mandatory One

Mandatory Many - at least One

Optional One - No less than One

Optional Many - May be none

There is NO standard notation for E-R Modelling

Page 45: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 45

The Monash GalleryThe Monash Gallery

Exhibition Carrier

Contact

ArtistHistory

Gallery

ExhibitionCategory

Contract CollectionBuyer

Invoice

Payment

ItemArtist

ArtistCategory

Category

Page 46: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 46

Data Modelling ThoughtsData Modelling Thoughts

Nation Stock

nation code stock codenation name firm nameexchange rate stock price stock qty

stock divdnd

A 1:M relationship

Entities

Attributes

Page 47: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 47

Data Modelling ThoughtsData Modelling Thoughts

Nation State City

Name Statename Cityname Population Statepop Citypop Area State area City Area

Questions : Is the Nation ‘Population’ necessary ? Is the State ‘Population’ necessary ?

Page 48: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 48

Data Modelling ThoughtsData Modelling Thoughts

Library Book Borrower

libname callno borrower ID ISBN booktitle duedate

Library Book Copy Borrower

libname callno bookno borrowerID ISBN due date title

Physical Objects

Page 49: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 49

A Project Management Data ModelA Project Management Data Model

Project Management involves Planned and Actual data

A Project is normally divided into a number of Activities which require Resources

Planning requires an estimation of consumable resources

Employee Activity Project

empno planned hours project id

Daily Work

workdate

actual hours

Page 50: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 50

A Project Management Data ModelA Project Management Data Model

Planned Hours is an attribute of Activity

Actual Hours is an attribute of Daily Work

The time(hours) spent on an Activity would be the sum of actual hours in the Daily Work entity

This is probably workable, if planning is done at the Activity level and employees submit daily worksheets (or details are captured by electronic means)

Planning could be more detailed if Planners were able to indicate how many hours of each day each employee should spend on a project

Page 51: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 51

A Project Management Data ModelA Project Management Data Model

This model shows planned hours and actual hours asattributes of Daily Work

Employee

empno

Activity Project

project id

Daily Workworkdateplanned hoursactual hours

Page 52: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 52

Data Modelling ThoughtsData Modelling Thoughts

An interesting data model can be constructed which deals with aircraft leasing;

An aircraft broker will ‘own’ many aircraft which will be leased to a variety and number of airline companies (including of course Ansett and Qantas)

When a lease expires, the broker leases the plane to another airline company, which explains why there are some aircraft still flying which are 20 to 30 years old.

.

Page 53: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 53

Data Modelling ThoughtsData Modelling Thoughts

In this scenario, an aircraft can be leased many times, and an airline company can lease many aircraft.

Normally there is an agent handling each such deal. An agent can lease many aircraft and deal with many airlines. A transaction occurs when a deal is reached with an airline to lease an aircraft or a number of aircraft

Page 54: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 54

Modelling the Aircraft ScenarioModelling the Aircraft Scenario

Aircraft Aircraft- Agent Agent

aircraft code Agent ID

Airline- Airline Airline-Aircraft Agent

airlinename

An Aircraft - Airline - Agent data model

Page 55: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 55

Modelling the Aircraft ScenarioModelling the Aircraft Scenario

There is a bit of a problem here.

Where is the data relevant to the lease to be stored ( and how many times, and therefore how many versions ? - and which of these is the correct current value ?)

It could be in Airline-Aircraft.

If so, the agent responsible for the deal is ignored. Should it be in Agent-Airline ?

What is the problem here ?

Page 56: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 56

Modelling the Aircraft ScenarioModelling the Aircraft Scenario

A solution:

Aircraft Lease Agent

aircraftcode start date agentid

Airline

Airlinename

Page 57: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 57

A PuzzleA Puzzle

How can these dots be joined by 4 straight lines without lifting a pencil (or pen) from the surface ?

Page 58: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 58

A PuzzleA Puzzle

No, that’s 5 lines

1

2

3

4

5

Page 59: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 59

A PuzzleA Puzzle

That’s worse - it’s6 lines

1

2

3

45

6

Page 60: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 60

A PuzzleA Puzzle

How about this ?

1

Page 61: CSE3180 Semester 1 2005 week 2 / 1 Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling

CSE3180 Semester 1 2005 week 2 / 61

TimetableTimetable

• The lecture will be held in B2.15 from 10.00am to midday on Thursdays

• Tutorials will be held

in Laboratory K 1.07 midday to 2.00pm

There are 16 terminals in the room