Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into...

54
Database Application Lifecycle Lecture 7

Transcript of Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into...

Page 1: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

Database Application Lifecycle

Lecture 7

Page 2: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

22

Lecture’s Objectives

• Put all the previous lectures into context (Conceptual and Logical Design, Normalisation and SQL).

• Learn the main stages of database application development.

• Use these stages as guidelines for your MSc project (if you choose to undertake a project which involves developing a Database System).

Page 3: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

3

Software Depression

• Last few decades have seen proliferation of software applications, many requiring constant maintenance involving:– correcting faults,– implementing new user requirements,– modifying software to run on new or upgraded

platforms.

• Effort spent on maintenance began to absorb resources at an alarming rate.

Page 4: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

4

Software Depression

• As a result, many major software projects were– late,– over budget,– unreliable,– difficult to maintain,– performed poorly.

• This led to ‘software crisis’, now referred to as the ‘software depression’.

Page 5: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

5

Software Depression

• Major reasons for failure of software projects includes:

- lack of a complete requirements specification;- lack of appropriate development methodology;- poor decomposition of design into manageable components.

• Structured approach to development was proposed called information systems lifecycle.

Page 6: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

6

Information System

Resources that enable collection, management, control, and dissemination of information throughout an organization.

• Database is fundamental component of I.S., and its development/usage should be viewed from perspective of the wider requirements of the organization.

Page 7: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

7

Database Application Lifecycle

• Database planning• System definition• Requirements collection and analysis• Database design• DBMS selection• Application design• Prototyping • Implementation• Data conversion and loading• Testing• Operational maintenance.

Page 8: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

8

Database Application Lifecycle

Page 9: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

9

Database Planning

Management activities that allow stages of database application lifecycle to be realised as efficiently and effectively as possible.

• Must be integrated with overall IS strategy of the organization.

Page 10: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

10

Database Planning – Mission Statement

• Mission statement for the database project defines major aims of database application.

• Those driving database project normally define the mission statement.

• Mission statement helps clarify purpose of the database project and provides clearer path towards the efficient and effective creation of required database application.

Page 11: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

11

Database Planning – Mission Objectives

• Once mission statement is defined, mission objectives are defined.

• Each objective should identify a particular task that the database must support.

• May be accompanied by some additional information that specifies the work to be done, the resources with which to do it, and the money to pay for it all.

Page 12: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

12

Database Planning

• Database planning should also include development of standards that govern:– how data will be collected, – how the format should be specified, – what necessary documentation will

be needed

Page 13: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

13

System Definition

Describes scope and boundaries of database application and the major user views.

• User view defines what is required of a database application from perspective of:– a particular job role (such as Manager or

Supervisor) or – enterprise application area (such as

marketing, personnel, or stock control).

Page 14: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

14

Representation of a Database Application with Multiple User

Views

Page 15: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

15

Requirements Collection and Analysis

Process of collecting and analyzing information about the part of organization to be supported by the database application, and using this information to identify users’ requirements of new system.

Page 16: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

16

Requirements Collection and Analysis

• Information is gathered for each major user view including:– a description of data used or generated;– details of how data is to be

used/generated;

Page 17: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

17

Requirements Collection and Analysis

• Data model representing single user view is called a local data model, composed of diagrams and documentation describing requirements of a particular user view of database.

• Local data models are then merged to produce a global data model, which represents all user views for the database.

Page 18: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

18

Database Design

Process of creating a design for a database that will support the enterprise’s operations and objectives.

Page 19: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

19

Database Design

• Major aims:– Represent data and relationships

between data required by all major application areas and user groups.

– Provide data model that supports any transactions required on the data.

– Specify a minimal design that is appropriately structured to achieve stated performance requirements for the system (such as response times).

Page 20: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

20

Database Design

• Three phases of database design:

– Conceptual database design– Logical database design– Physical database design.

Page 21: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

21

Conceptual Database Design

Process of constructing a model of the information used in an enterprise, independent of all physical considerations.

• Data model is built using the information in users’ requirements specification.

• Source of information for logical design phase.

• Use of ER Diagrams / UML Diagrams…

Page 22: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

22

Logical Database Design

Process of constructing a model of the information used in an enterprise based on a specific data model (e.g. relational), but independent of a particular DBMS and other physical considerations.

• Conceptual data model is refined and mapped on to a logical data model.

• For example, design of Tables if relational model is used.

Page 23: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

23

Physical Database Design

Process of producing a description of the database implementation on secondary storage.

• Describes storage structures and access methods used to achieve efficient access to data (Files, indexes…).

• Tailored to a specific DBMS.

Page 24: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

24

DBMS Selection

Selection of an appropriate DBMS to support the database application.

• Undertaken at any time prior to logical design provided sufficient information is available regarding system requirements.

• Main steps to selecting a DBMS:– define Terms of Reference of study;– shortlist two or three products;– evaluate products;– recommend selection and produce report.

Page 25: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

25

DBMS Evaluation Features

Page 26: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

26

DBMS Evaluation Features

Page 27: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

27

Application Design

Design of user interface and application programs that use and process the database.

• Database and application design are parallel activities.

• Includes two important activities:– transaction design (e.g., Queries);– user interface design (e.g., Forms).

Page 28: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

28

Application Design - Transactions

• Important characteristics of transactions:– data to be used by the transaction;– functional characteristics of the transaction;– output of the transaction;– importance to the users;– expected rate of usage.

• Three main types of transactions: retrieval, update, and mixed.

Page 29: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

29

Application Design – User Interface

• Guidelines for form/report design:

– Meaningful title– Comprehensible instructions– Logical grouping and sequencing fields– Visually appealing layout of the form/report– Familiar field labels– Consistent use of colour– Visible space and boundaries for data-entry fields– Convenient cursor movement– Error messages for unacceptable values– Optional fields marked clearly– Explanatory messages for fields– Completion signal

Page 30: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

30

Prototyping

Building working model of a database application.

• Purpose– to identify features of a system that work

well, or are inadequate;– to suggest improvements or even new

features;– to clarify the users’ requirements;– to evaluate feasibility of a particular system

design.

Page 31: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

31

Data Conversion and Loading

Transferring any existing data into new database and converting any existing applications to run on new database.

• Only required when new database system is replacing an old system. – DBMS normally has utility that loads

existing files into new database. • May be possible to convert and use

application programs from old system for use by new system.

Page 32: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

32

Testing

Process of executing application programs with intent of finding errors.

• Use carefully planned test strategies and realistic data.

• Testing cannot show absence of faults; it can only demonstrate that database and application programs appear to be working according to requirements.

Page 33: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

33

Operational Maintenance

Process of monitoring and maintaining system following installation.

• Monitoring performance of system. – if performance falls, may require tuning or

reorganization of the database.• Maintaining and upgrading database

application (when required). • Incorporating new requirements into

database application.

Page 34: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

34

Data Administration and Database Administration

• Data Administration: Management of data resource including:– database planning, – development and maintenance of standards, policies

and procedures, and conceptual and logical database design.

• Database Administration: Management of physical realisation of a database application including:– physical database design and implementation, – setting security and integrity controls,– monitoring system performance, and reorganising

the database.

Page 35: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

35

Fact-Finding Techniques

Page 36: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

36

Fact-Finding Techniques

• Formal process of using techniques such as interviews and questionnaires to collect facts about systems, requirements, and preferences.

Page 37: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

37

Fact-Finding Techniques

• Database developer normally uses several fact-finding techniques during a single database project including: – examining documentation,– interviewing,– observing organisation in operation,– research,– questionnaires.

Page 38: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

38

Examining Documentation

• Can be useful: – to gain some insight as to how the

need for a database arose;– to identify the part of the

organisation associated with the problem;

– to understand the current system.

Page 39: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

39

Interviewing • Most commonly used, and normally most

useful fact-finding technique.

• Objectives include finding out facts, verifying facts, clarifying facts, generating enthusiasm, getting end-user involved, identifying requirements, and gathering ideas and opinions. – Open-ended questions allow interviewee to

respond in any way that seems appropriate.– Closed-ended questions restrict answers to either

specific choices or short, direct responses.

Page 40: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

40

Observing the Organisation in Operation

• Effective technique for understanding system.

• Possible to participate in, or watch, a person perform activities to learn about system.

• Useful when validity of data collected is in question or when complexity of certain aspects of system prevents clear explanation by end-users.

Page 41: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

41

Research

• Useful to research application and problem.

• Use computer trade journals, reference books, and Internet (including user groups and bulletin boards).

• Provide information on how others have solved similar problems, plus whether or not software packages exist to solve, or even partially solve, the problem.

Page 42: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

42

Questionnaires

• Conduct surveys through questionnaires – special-purpose documents that allow facts to be gathered from a large number of people while maintaining some control over their responses.

• Two types of questions, namely free-format and fixed-format.

Page 43: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

43

Database Application Lifecycle:

A Case Study

Page 44: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

44

Overview of the Case Study

• DreamHome is a company that specialises in property renting, by taking an intermediate role between property owners and clients who require to rent a property.

• DreamHome operates several branches throughout the UK. Each branch has a number of staff including a Manager, Supervisors, and Assistants. Each branch offers a range of properties for rent.

• The Director of the company feels that a database could help in avoiding the many mistakes occurring in the current paper-based operations of the company.

Page 45: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

45

DreamHome – Database Planning - Defining the mission statement for the

database system

• Typical questions we might ask the Director:– “What is the purpose of your company?”– “Why do you feel that you need a database?”

• Example of a mission statement: “The purpose of the database system is to maintain the data that is used and generated to support the property rentals business for our clients and property owners and to facilitate the cooperation and sharing of information between branches”.

Page 46: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

46

DreamHome – Database Planning - Identifying the objectives for the

database system

• Typical questions to various members of staff include:– “What is your job description?”– “What kinds of tasks do you perform in a typical day?”– “What kinds of data/reports do you use?”

• Examples of objectives: – To maintain (enter, update, and delete) data on

branches– To perform searches on branches– To report on branches– …

Page 47: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

47

DreamHome – System Definition – Defining the system’s boundary

PropertyAdvertising

PropertyRentals

CustomerServices

StaffHuman

Resources

PayrollMarketing

PropertySales

System’s Boundary

Page 48: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

48

DreamHome – System Definition - Identifying the major user views

Data Access Type

Director Manager Supervisor

Assistant

All Branches

Maintain

Query X X

Report X X

Single Branch

Maintain X

Query X

Report X

All Staff Maintain

Query X X

Report X X

Branch Staff

Maintain X

Query X X

Report X X

… etc

Page 49: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

49

DreamHome – Requirements Collection & Analysis – Users’ Requirements Specification

• Data Requirements:– Branches: The data held on each

branch office includes a unique branch number, address (street, city, and postcode)…

– Staff: The data stored on each member of staff includes staff number, name…

– …

Page 50: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

50

DreamHome – Requirements Collection & Analysis – Users’ Requirements Specification

• Transaction Requirements:– Data entry:

• Enter the details of a new branch…

– Data update/deletion:• Update/delete the details of a member of

staff at a branch…

– Data queries:• List the names of staff supervised by a

named supervisor…

Page 51: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

51

DreamHome – Requirements Collection & Analysis – System’s

Specification

• The types of features described in the system’s specification include:– Initial database size– Database rate of growth– The types and average number of record

searches– Networking and shared access requirements– Performance– Security– Backup and recovery– Legal issues

Page 52: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

52

DreamHome – Requirements Collection & Analysis – System’s

Specification• Initial database size:

There are approximately 2000 members of staff at 100 branches. There is an average of 20 and a maximum of 40 members at each branch…

• Database rate of growth: Approximately 500 new properties and 200 new owners

are added to the database each month…

• Types and average number of record search: Searching for the details of a branch – approximately 10

per day…

• Networking and shared access requirements: All branches should be networked to a centralised

database at the main office. The system should allow for at least three people concurrently accessing the system for each branch…

Page 53: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

53

DreamHome – Requirements Collection & Analysis – System’s

Specification

• Performance: During non-peak periods expect less than 1

second response time for all single record searches…

• Security: The database should be password protected…

• Backup and Recovery: The database should be backed up daily at 12

midnight.• Legal issues:

Implement UK’s law on the computerised storage of personal data (staff, clients and owners).

Page 54: Database Application Lifecycle Lecture 7. 2 2 Lectures Objectives Put all the previous lectures into context (Conceptual and Logical Design, Normalisation.

54

Further Reading

• See “Database Systems”, Connolly & Begg, for full case study, including conceptual and logical design.