SOFTWARE ENGINEERING MANAGEMENT

profileslw.sh
209cw1.docx

Student Name: Lee Wee Yang Sherwin Student No: 111109759

2013 Student name: Lee Wee Yang Sherwin Student Number: 111109759 CIS 209: DATABASE SYSTEMS

Table of Contents I. A(1): Report on database choice and download and population: 2 II. A(2) User's Manual Summary: 3 III. A(3): Data description: 9 IV. B(1) Essay 22 V. B(2) Answers to questions 23 VI. B(3) 24 VII. B(4) How to minimize entering bad data into our databases: 25 VIII. B(5) How to minimize entering bad data into our databases: II 26 IX. B(6) Using what we know about data 27 X. B(7) 28 XI. B(8) 29 XII. B(9) 30 XIII. B(10) 31 XIV. B(11) 31 XV. B(12) 31 XVI. References 32

A(1): Report on database choice and download and population:

The DBMS I have chosen to download is MySQL.

The software was downloaded from the link, http://dev.mysql.com/downloads/. After clicking on the link, a file of which bears the name of mysql-workbench-version-win32.msi.

1. To install the MySQL workbench, double click on the file and select the run button on the pop-up menu.

2. I choose the complete option on the setup type window.

3. When the installation is successful, the MySQL folder can be found in C:/ProgramFiles/MySQL.

The reason I have chosen MySQL workbench as my main Database Management System for this coursework because MySQL is one of the more common database system sources in the market.

After installing MySQL workbench, I realised that there is a new graphical user interface and with other new functions. Creating a database has become much easier as a lot as the entire software has became much more user-friendly.

A(2) User's Manual Summary:

1. MySQL Workbench Introduction

a. Provides three main areas of functionality : SQL development, Data Modeling, Server administration.

2. MySQL Workbench Editions

a. Community Edition (OOS): versions of the MySQL workbench that are currently available or those that will become available in the future.

b. The Standard Edition: MySQL specific schema validation, model validation, General schema validation, DBDoc.

i. DBDoc provides: Document complex database schemata

ii. Document all SQL Object types

iii. Document output available in different file formats

3. Installing and Launching MySQL Workbench    

a. Hardware Requirements

b. Software Requirements

c. Starting MySQL Workbench

i. Installing MySQL Workbench on Windows

ii. Launching MySQL Workbench on Windows

iii. Uninstalling MySQL Workbench on Windows

iv. Installing MySQL Workbench on Linux

v. Launching MySQL Workbench on Linux

vi. Uninstalling MySQL Workbench on Linux

vii. Installing MySQL Workbench on Mac OS X

viii. Launching MySQL Workbench on Mac OS X

ix. Uninstalling MySQL Workbench on Mac OS X

d. Activation Procedure (Commercial Version)

4. Getting Started Tutorial     

a. Administering a MySQL Server : use MySQL workbench to carry out administrative functions, such as starting and stopping the server.

b. Creating a Model: create new database model, create a table , create EER Diagram of the model, forward engineer the model to the live database server.

c. Adding Data to Your Database : add data to database on live server.

5. The Home Window     

a. Workbench Central

b. Workspace

c. Workbench Application Minimum Window Size

d. Workbench preferences

i. The General Tab

ii. The Administrator Tab

iii. The SQL Editor Tab

iv. The Model Tab

v. The MySQL Tab

vi. The Diagram Tab

vii. The Appearance Tab

6. SQL Development     

a. Open connection to start querying : Connect to Database Wizard.

b. New Connection : Launches Manage DB Connections Wizard.

c. Edit Table Data : Launches the Edit Table Data Wizard.

d. Edit SQL Script : Launches the Edit SQL Script Wizard.

e. Manage Connections : Laucnhes the Manage DB Connections Wizard.

f. Manage DB Connections Dialog : Create or Delete Connections.

i. The Password Storage Vault : secure storage for passwords used to access MySQL Servers.

ii. Standard TCP/IP Connection: enables MySQL Workbench to connect to MySQL Server using TCP/IP

iii. Local Socket/Pipe Connection: enables MySQL Workbench to connect to MySQL Server using a socket file.

iv. Standard TCP/IP over SSH Connection: enables MySQL Workbench to connect to MySQL Server using TCP/IP over an SSH connection

g. SQL Editor

i. Main Menu

ii. Toolbar

iii. SQL Query Panel

iv. Main Tabsheets

v. Sidebar

7. Data Modeling     

a. Open an Existing EER Model

b. Create new EER Modell

c. Create EER Model from Existing database

d. Create EER Model from SQL Script

e. Model Editor

i. Modeling Menus

ii. The Toolbar

iii. EER Diagrams

iv. The Physical Schemata Panel

v. The Schema Privileges Panel

vi. The SQL Scripts Panel

vii. The Model Notes Panels

viii. The History Palette

ix. The Model Navigator Panel

x. The Catalog Tree Palette

xi. The Layers Palette

f. EER Diagram Editor

i. The Vertical Toolbar

g. Working with Models

i. Creating Tables

ii. Creating Foreign Key Relationships

iii. Creating Views

iv. Creating Routines and Routine Groups

v. Creating Layers

vi. Creating Notes

vii. Creating Text Objects

viii. Create Images

ix. Reverse Engineering

x. Forward Engineering

h. Modeling Tutorials

i. Importing a Data Definition SQL script

ii. Using the Default Schema

iii. Basic Modeling

iv. Documenting the ‘sakila’ Database

i. Printing

i. Printing Options

j. MySQL Workbench Schema Validation Plugins (Commercial Version)

i. General Validation

ii. MySQL –Specific Validation

k. The DBDoc Model Reporting Dialog Window(Commercial Version)

l. Customizing DBDoc Model Reporting Templates

i. Supported a Template Markers

ii. Creating a Custom Template

8. Generating code overview     

a. Generating SQL queries

b. Generating PHP code

9. Server Administration     

a. Server administration

b. New Server Instance

c. Manage Data Import/ Export

d. Manage Security

e. Manage Server Instance

f. Creating and Managing Server Instances

i. New Server Instance Wizard

ii. Manage Server Instance Wizard

g. Server Administration and Configuration

i. The Startup Tab

ii. The Configuration Tab

iii. The Accounts Tab

iv. The Connections Tab

v. The Variables Tab

vi. The Data Dump Tab

vii. The Logs Tab

10. Database Migration Wizard     

a. General installation requirements

b. Migration Overview

c. Conceptual DBMS equivalents

d. Microsoft SQL Server migration

e. PostgreSQL migration

f. MySQL migration

g. Using the MySQL Workbench Migration Wizard

h. MySQL Workbench Migration Wizard FAQ

11. Extending Workbench    

a. GRT and Workbench Data Organization: internal system used by Workbench to hold model document data

b. Modules: a list of functions that are exported for use by code in other modules

c. Plugins: special Modules that are exposed to the user through the Workbench GUI

d. Adding a GUI to a plugin Using MForms

e. The Workbench Scripting Shell

i. Exploring the Workbench Scripting Shell: provides a means for entering and executing scripts

ii. The Shell Window: used for running Lua or Python scripts or typing commands in these languages

iii. The Globals, Classes, and Modules Tabs

f. Tutorials: Writing Plugins: extend MySQL Workbench by creating a plugin.

12. Keyboard Shortcuts

13. MySQL Utilities    

a. Introduction: Introductions to MySQL Utilities, Connection Parameters,

Introduction to extending the MySQL Utilities

b. Commands: Search for databases for objects, Search for processors on servers

c. Manual Pages

i. Brief overview of command-line utilities

ii. MySQL Utilities Testing

iii. Compare 2 databases and Identify Differences

iv. Copy Database objects between Servers

v. Export Object Definitions or data from a database

vi. Import Object Definitions or data from a database

vii. Identify Differences among database objects

viii. Show database disk usage

ix. Automatic replication health monitoring and failover

x. Identify potentially redundant table indexes

xi. Search database object definitions

xii. Search server process lists

xiii. Set up and Start replication between two servers

xiv. Administration utility for MySQL replication

xv. Check Replication Prerequisites

xvi. Show Slaves for Master Server

xvii. Clone Existing Server to Create New Server

xviii. Display Common Diagnostic Information from a Server

xix. Command line client for running MySQL Utilities

xx. Clone existing user to create new user

d. Parsers: Parse MySQL Log Files

A. Third Party Licenses     

B. MySQL Workbench FAQ

C. MySQL Workbench and Utilities Change History : MySQL Workbench Change History, MySQL Utilities Change History

A(3): Data description:

tables_in_mondial

Show columns from borders;

Show columns from city;

Select count(*) from city;

Show columns from continent;

Select count(*) from continent;

Show columns from country;

Select count(*) from country;

Show columns from desert;

Select count(*) from desert;

Show columns from economy;

Select count(*) from economy;

Show columns from encompasses

Select count(*) from encompasses;

Show columns from ethnicgroup;

Select count(*) from ethnicgroup;

Show columns from geo_desert

Select count(*) from geo_desert

Show columns from geo_estuary

Select count(*) from geo_estuary

Show columns from geo_island

Select count(*) from geo_island

Show columns from geo_lake

Select count(*) from geo_lake;

Show columns from geo_mountains

Select count(*) from geo_mountain;

Show columns from geo_river

Select count (*) from geo_river

Show columns from geo_sea

Select count(*) from geo_sea;

Show columns from geo_source

Select count(*) from geo_source

Show columns from island

Select count(*) from island;

Show columns from islandin

Select count from islandin

Show columns from ismember

Select count(*) from ismmember;

Show columns from lake

Select count(*) from lake

Show columns from language

Select count(*) from language

Show columns from located

Select count(*) from located

Show columns from mergeswith

Select count(*) from mergeswith

Show columns from mountain

Select count(*) from mountain

Show columns from mountainonisland

Select count(*) from mountainonisland

Show columns from organization

Select count(*) from organization

Show columns from politics

Select count(*) from politics

Show columns from population

Select count(*) from population

Show columns from province

Select count(*) from province

Show columns from religion

Select count(*) from religion

Show columns from river

Select count(*) from river

Show columns from sea

Show count(*) from sea

B(1) Essay

Online information versus databases: What do we mean by the word "database"?

A database is a collection of data, where it is all structurally organized and classified so as to allow better processing of the information, in the future. Database information are organised from records and each record contain fields. Records are the title of what describes the data and fields is the data itself. Data is presented in a way, where, you would just have to look the fields and the information in the record to know what is needed to know.

An online information can be presented in a essay form, however, it cannot be compared a database as the information is presented in a different form. An essay describes the information in a way where you would have to read the entire line of the paragraph or the page in order to know how the information is classified or organized.

Example B: "There are three students enrolled on this course: Chiang, who is 23 years old; Kristina, aged 22; and Patrice, 28."

By looking at example A, you can easily tell the ages of Chiang, Kristina and Patrice by finding their name and looking at their age which matches their name. If you were to search Kristina’s name at random, you would be able to find her age easily. By looking at the database, it is shown that there are only 3 entries. However, in example B, u will have to read that there are only 3 students in the course. If a search were to be done for Kristina’s name in example B, it would have to go through the line and find out Chiang’s age first before moving on to Kristina.

B(2) Answers to questions

(a) [ http://www.en.wikipedia.org/wiki/Data_entry_clerk ] Is the job of "data entry

clerk " a skilled one?

The job of a data entry clerk is considered to be an unskilled job, according to wikipedia. By hiring veterans of the company or other company staff to do data entry helps to reduce entry errors as they would understand the operation of the company. Normally, part-timers or veterans of the comapny is hired/tasked to do the job as there isnt much technical skills or knowledge needed to perform the task.

[ http://www.ama-assn.org/amednews/2005/01/24/prsa0124.htm ] Of the

235,000 medication errors reported in the Unites States in 2003, how many were

caused by errors in computer data entry?

27,111 errors was the total amount caused by computer data entry.

[ http://www.jnd.org/dn.mss/commentary_human_er.html ] Why did the

Soviet Phobos mission to Mars in 1988 fail?

It failed as the operator accidentally omitted a letter in a string of commands that was meant to be sent to Phobos 1. That omitted letter caused the entire meaning of the command to change and thus sent Phobos 1 into the wrong course in space.

[ http://www.cis.upenn.edu/~lee/10cis541/papers/Interface.pdf ] Why might

making data entry operators more skilled not automatically produce a complete

solution to the problem of data entry errors?

As making a data entry operator more skilled, it only enables the operator to be more automated in his/her actions. It thus allows the operator to follow through most of the motion into entering the data, and so he/she may be more oblivious to the errors entered. So, like a factory, generated actions may cause generated errors and such errors that would be left undetected.

(e) [http://www.en.wikipedia.org/wiki/Optical_character_recognition ] What are

‘ballpark figures’ for the accuracy of Optical Character Recognition (before human

intervention)?

It’s between 71% - 98%.

B(3)

Suppose that a database consists of 10 main tables, each with an average of 500,000

rows, with each row having an average of 8 numeric or alphanumeric fields (telephone

numbers, product codes, prices, quantities, etc), with each field having an average

width of eight digits or characters. Assume that all of this data, at some point, was

entered by human beings into a computer system using a keyboard. How many

characters or digits will be entered into this database?

10 x 500,000 x 8 x 8 = 320,000,000 characters

Assuming the very best (lowest) error rate mentioned in the Klemmer [1962] paper for

trained data entry operators, and assuming that there is no computerized method of

trapping erroneous data entry, how many characters or digits will be entered

erroneously? How many will be entered erroneously, assuming the

less-optimistic error rate cited by Baddeley & Longman [1973] for entering mail codes

(after correction)? Show your calculations.

320,000,000 x 0.02 = 64,000 errors will be entered erroneously (Klemmer [1962] paper)

320,000,000 x 0.5% = 1,600,000 errors will be entered erroneously.

B(4) How to minimize entering bad data into our databases:

Use the Luhn algorithm (by hand) to decide which of the following credit card numbers

are valid and which are not:

(1) 4657-4686-6987-0760 (NOT VALID)

(2) 4658-4686-6987-0760 (NOT VALID)

(3) 4659-4998-6988-0760 (NOT VALID)

(1) 4657-4686-6987-0760

4

6

5

7

4

6

8

6

6

9

8

7

0

7

6

0

8

6

10

7

8

6

16

6

12

9

16

7

0

7

12

0

8

6

1+0

7

8

6

1+6

6

1+2

9

1+6

7

0

7

1+2

8+6+1+0+7+8+6+1+6+6+1+2+9+1+6+7+0+7+1+2= 85 + x

(however x = 0, which does not make the sum a multiple of 10, thus the credit card number is not valid .)

(2) 4658-4686-6987-0760

4

6

5

8

4

6

8

6

6

9

8

7

0

7

6

0

8

6

10

8

8

6

16

6

12

9

16

7

0

7

12

0

8

6

1+0

8

8

6

1+6

6

1+2

9

1+6

7

0

7

1+2

8+6+1+0+8+8+6+1+6+6+1+2+9+1+6+7+0+7+1+2= 86 + x

(however x = 0, which does not make the sum a multiple of 10, thus the credit card number is not valid .)

(3) 4659-4998-6988-0760

4

6

5

9

4

9

9

8

6

9

8

8

0

7

6

0

8

6

10

9

8

9

18

8

12

9

16

8

0

7

12

0

8

6

1+0

9

8

9

1+8

8

1+2

9

1+6

8

0

7

1+2

8()+6+(1+0)+9+(8)+9+(1+8)+8+(1+2)+9+(1+6)+8+(0)+7+(1+2) = 95 + x

(however x = 0, which does not make the sum a multiple of 10, thus the credit card number is not valid .)

B(5) How to minimize entering bad data into our databases: II

1. Entity Integrity Constraint states that no primary key can be null (M.Urse 1999)

2. Attribute Integrity Constraint are constraint applied to all value of any attribute / column specified in the table.

CREATE TABLE Country

(Name VARCHAR2(40) NOT NULL UNIQUE,

Code VARCHAR2(4) CONSTRAINT CountryKey PRIMARY KEY,

Capital VARCHAR2(40),

Province VARCHAR2(40),

Area NUMBER CONSTRAINT CountryArea

CHECK (Area >= 0),

Population NUMBER CONSTRAINT CountryPop

CHECK (Population >= 0));

3. Referential Integrity refers to any data shared between tables must remain consistent.

Referential integrity is not enforced in this database.

B(6) Using what we know about data

Data

B(7)

1. The Prancing Ponies stable keeps several dozen horses, and employs several grooms to look after them. Each groom looks after several horses. (But no horse is looked after by more than one groom.) For example, Sarah looks after Max, Jasper, Pongo and Zip. Michael looks after Swifty and Coco.

Groom =>> Horse

Horse =>Groom

2. The Happy Horsies stable also has several grooms, and several horses. In

this stable, each groom is assigned several horses to look after, but grooms can also ‘share’ horses. That is, two or more grooms may look after the same horse. (This allows grooms to have time off.) So, for example, Rosa looks after Lightning, Plod, and Streak. Clara looks after Plod, Streak, and Firewind. Jon looks after Lightning and Firewind.

Groom =>> Horse

Horse =>> Groom

3. The Hayburner’s Heaven Stable operates a different policy. There, it’s only groom to one horse and vice versa. For example, Buffy and only Buffy looks after Foxchaser. She doesn’t look after any other horse. Melanie takes care of Gorgon. BigAlex looks after Bucephalos.

Groom => Horse

Horse => Groom

4. The exculsive Pamper-Your-Pet has the highest fees, and provides a luxury service for your horse. Here, each horse has several grooms assigned to it, and each groom is responsible for just one horse. For example, Patty, Vicky and Gina look after Oateater, Mandy, Pippa and Alyce look after Man O’War.

Horse =>> Groom

Groom => Horse

B(8)

Gemma is right to make the primary key the student number, subject and date.

If the primary key were to be the student number only, it would cause errors as then if there were to be multiple entries for grades of the same student number, on the same date and same subject. It would mean that the student took multiple papers for one or many subject on the same day.

If the primary key were to be the student number and the subject, it would too cause errors as multiple entries could be entered for the same student number, for the same subject on the same date. So, it would mean that the student would be taking multiple papers for the same subject on the same day.

If the primary key were to be the student number, subject, date and grade, then it would mean that there can only be one grade for each student number. So it would mean that there would only be 101 values for the grade section from 0-100. So no student would actually get the same grade.

B(9)

Draw up an E/R diagram for this situation. Your E/R diagram should follow the same

model as the E/R diagram for the Mondial database, which you have already

downloaded, except that it should show ‘cardinality constraints’. (It need not show

‘participation constraints’, i.e. whether participation in a relationship is mandatory.) For

this diagram, consider Students, Courses, Teachers, and Rooms to be Entity Types. Just

show the relationships that are mentioned here with example data. (For instance, show

the teacher in-charge-of course relationship, but not any other relationship that might

exist, such as teacher teaches-on course relationship.) All other data (BirthDates,

names, phone-extensions) may be treated as attributes of entity types. Note that we

have one compound attribute (Address) and one multi-valued attribute

(Phone-extension) and your diagram should reflect this.

B(10)

(a) Look up information about the MUMPS programming language and the

database system which is part of it, and write a brief (half page) description of

them. Name two major industries which are users of MUMPS databases.

Two major industries using MUMPS databases are the health industry and the banking industry.

B(11)

B(12)

References

1. M.Ursu, 1999. Database system. Goldsmiths University of London

2. Data Entry Clerk

Available: en.wikipedia.org/wiki/Data_entry_clerk

(Accessed on 10 December 2012)

3. Data entry is a top cause of medication errors

Available: http://www.ama-assn.org/amednews/2005/01/24/prsa0124.htm

(Accessed on 10 December 2012)

4. Commentary: Human Error and the design of computer systems

Available: .www.jnd.org/dn.mss/commentary_human_er.html

(Accessed on 10 December 2012)

5. Optical character recognition

Available : http://en.wikipedia.org/wiki/Optical_character_recognition

(Access on 10 December 2012)

6. MUMPS

Available: http://en.wikipedia.org/wiki/MUMPS

(Access on 10 December 2012

CIS 209: Database Systems Page 32