610 likes | 677 Views
Lecture No. 2. Project Planning / Management Database Design Entities, Relationships, Modelling. Important Dates. Wednesday 16th March : Semester 1 ‘Enrolment Statement’ issued to all students. Data Base Principles. This Lecture’s Objectives:
E N D
Lecture No. 2 Project Planning / Management Database Design Entities, Relationships, Modelling
Important Dates Wednesday 16th March : Semester 1 ‘Enrolment Statement’ issued to all students
Data 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
Planning • Scheduling • Cost Tracking • Resource Management • Reporting • Software Functions • Real time interactive operation • Add / Delete items • Change logic dependencies • Adjust calendar and calendar dependencies • Change resource and availability levels and dates • Mouse driven : Multiple platforms • (Microsoft, MacIntosh) Project Planning
Project 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
Project Planning Task / Week 1 2 3 4 5 6 7 Analysis Design Review Programming Implementation - Plan - Manuals System Testing Review Acceptance Test Review Results Handover
PERT Diagram Get Mix Pour into ingredients Ingredients cake pan Place Bake Remove cake in cake cake from oven oven start Preheat oven
Your 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)
Data 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
End 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
Business 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).
Business 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
Business 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.
Business 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)
Critical 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
Design Criteria -data availability - data reliability - data currency - data consistency - data flexibility - data efficiency Verify these criteria are satisfied via technical review
Database Design -the process of developing database structures from user information requirements -a structured methodology Structured Methodology - a number of ordered formal processes with known inputs and expected outputs Objectives 1. derive relationships 2. evolve to meet user requirements 3. user requests are met within reasonable time limits
3 Schema Architecture The Primary Objectives of a DBMS are to provide facilities 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’
3 Schema Architecture EXTERNAL SCHEMAS logical user 1 user 2 user..n Global CONCEPTUAL SCHEMA logical (as seen by database analysts, designers, programmers and the Data Base Administrator) INTERNALSCHEMA (Storage Views) physical (as seen by the Operating System and the Data Base Administrator) SCHEMA: Describes data in the data base - also sub-schema
3 Schema Architecture external 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 user interface logical record interface stored operating system record interface physical record interface
Progression 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’
Progression 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
Database Design Functional Requirements Other matters Domains, Nulls, Derived Data, Encoded Data. Data Base Model Information Level Design Processes Final Information Level Design Physical Constraints Physical Level Design Final Database Structure
Database Design 4th Generation Environment - User Perception user terminal teleprocessing report query electronic monitor writer language mail application programs data dictionary DBMS structured and non-structured data images, graphics, video,voice data base
Data 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 Models Hierarchical Specific organisation and relationships between records held in the database Network Relational Constraints, domains, conditions of update, inserts, deletes, modifications, access
Entities • The designation of a ‘thing’ about which data is to be collected • stored • processed • Typical Entities : person , item , building , stock , vehicle , job , book , library
Entity Relationship Diagrams Used to model relationships 1 to 1 relation 1:1 1 to Many 1:M Many to Many M:N (real world situations) vehicle regn no 1:1 department staff Also :- Optional Mandatory occurrence 1:M supplier item M:N
Entity Relationships Many to One One to One One to Many Many to Many
Logical 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
Logical 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’
Logical 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’
Logical 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’
Logical 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’
Logical 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
Logical 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
Logical 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’
Logical Data Modelling DOMAINS A ‘Domain’ is a set of possible values which an attribute set can adopt e.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’
Logical Data Modelling shiphands sail ships Relationships Representation
Logical Data Modelling Cardinality Course Units Meaning : ONE Meaning : MANY
Logical Data Modelling Mandatory - Optional Relationship (Binary Relationship) Artists Pictures paint Unary Relationship Ternary Relationship customers buy cars dealers
Logical Data Modelling ENTITIES RELATIONSHIPS 1 : 1 1 : N M : N membership class degree cardinality modality mandatory optional recursive binary n-ary ATTRIBUTES domains values
Entity Relationships Each entity may be a ‘one’ or ‘many’ participant part vendor delivers warehouse quantity Quantity is the amount of a particular ‘part’ shipped from a particular ‘vendor’ to a particular ‘warehouse’.
Logical 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
The Monash Gallery Carrier Exhibition Contract Collection Contact Buyer Artist History Artist Item Invoice Gallery Artist Category Payment Exhibition Category Category
Data Modelling Thoughts Entities Nation Stock nation code stock code nation name firm name exchange rate stock price stock qty stock divdnd Attributes A 1:M relationship
Data 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 ?
Data 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
A 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 EmployeeActivityProject empno planned hours project id Daily Work workdate actual hours
A 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