cse3180 semester 1, 2005 week 1 / 1 welcome to cse3180 ‘principles of database systems’ semester...

69
CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

Post on 22-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 1

Welcome to CSE3180

‘Principles of Database Systems’

Semester 1, 2005

Page 2: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 2

Introduction to CSE3180Introduction to CSE3180

This unit covers many aspects associated with database, and in this series of lectures, those related to Relational Data Base (but not exclusively)

I’m : Rod Simpson

My Office is : Room C 4.46 (for Semester 1)

My Phone contact number is : (03)990 32352

My email is [email protected]

Page 3: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 3

Which stands for

School of Computer Science and Software Engineering

Faculty of Information Technology

Materials for this unit are located atwww.csse.monash.edu.au/courseware/cse3180

Page 4: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 4

No relationship

Page 5: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 5

University NoticeUniversity Notice

Friday 11th March is the last day to add a Semester 1 or Full Year on-campus unit without the risk of a $73.00 late enrolment penalty

Page 6: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 6

The examination will be closed book.

It will consist of 3 sections:

A: A number of multi choice questions

B: A number of short answer questions

C: Four essay type questions (choice of 6)

Principles of Database Systems Principles of Database Systems

Page 7: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 7

Principles of Database SystemsPrinciples of Database Systems

You should have a copy of the unit outline, which includes

– The recommended text (Hoffer, Prescott and McFadden, Edition 7 or 8, whichever is available in the Bookshop)

– The Project

– The Certificate of Work Performed if working in a group

– The Tutorial Guide

Page 8: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 8

TimetableTimetable

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

• Tutorials will be held on Thursday

in Laboratory K 1.07 from midday to 2.00pm

The Laboratories are booked for 2 hours so that if you wish you can continue with the unit exercises or the project

There are 16 terminals in each room

Page 9: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 9

ExclusionsExclusions

The exclusions to this unit are

– Bachelor of Computing

– Bachelor of Computer Science

– Masters degrees

– Graduate Diplomas in Computing ...

Page 10: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 10

PRINCIPLES OF DATABASE SYSTEMS PRINCIPLES OF DATABASE SYSTEMS Lecture 1Lecture 1

PRINCIPLES OF DATABASE SYSTEMS PRINCIPLES OF DATABASE SYSTEMS Lecture 1Lecture 1

Page 11: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 11

Introduction Part 3Introduction Part 3

The notes for this unit can be found on the Monash Web Page at this address:

http://www.csse.monash.edu.au/courseware/cse3180

The Unit Code is CSE3180

The notes are the PowerPoint format and can be viewed on the File Server software.

Page 12: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 12

Lecture ObjectivesLecture Objectives

This lecture will cover:– some thoughts on data storage and retrieval constraints– what is the form of ‘data’– some definitions of ‘data’, ‘information’, ‘audit trail’– what is a data base - who would want one– some of the functions of the database management

software– different models (commercial)– the relational model– advantages and disadvantages of database– some practical aspects of your project

Page 13: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 13

IntroductionIntroductionCourse Outline

As you will see from the notes, the recommended text is Hoffer, Prescott and McFadden, ‘Database Management’. The examples and the exercises at the end of most chapters are well worth a read.

There is a project, and it is expected that you will work in groups - your tutor will arrange this in the first tutorial.

The assignment support software is either Oracle or MS Access. If you wish to use some other DBMS, (such as SQLServer or MySQL) you will need to come to some amicable arrangement with your tutor

Page 14: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 14

IntroductionIntroduction

Features of database in the lectures such as

– Recovery – Security – Consistency– Concurrency– Database Management architecture– Background processes

will be based on Oracle’s version 9i

Page 15: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 15

DatabaseDatabase

In designing a database there is the need to understand what requirements are made of data analyses, who needs these analyses, when and in what form.

In all this there is an expectation that the results of ‘queries’, which is the same as saying data supported by the database is accurate, timely and complete.

In these lectures, you will see how these requirements can be built into a database - as you will do with your database model.

And that is what it is - a model which accurately reflects data as it occurs and is processed in the ‘real world’.

Page 16: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 16

Some Thoughts on Data StorageSome Thoughts on Data Storage

• A major benefit of Computing is the ability to STORE and RETRIEVE large amounts of data

• However, there are a number of processes and other considerations which need to be worked together to maximise this benefit

• Some very early items are– What data ?– What are its sources ?– What are the volumes / frequency ?– How long is to be stored and why this period ?– In what FORM is it to be stored ?

Page 17: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 17

Some Thoughts on Data RetrievalSome Thoughts on Data Retrieval

• Who is going to ‘access’ (retrieve ?) this data

• How often ?

• From where ?

• Why is data to be accessed - for what purpose ?

Page 18: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 18

Some Thoughts on Data RetrievalSome Thoughts on Data Retrieval

• How is it to be accessed ? Voice inquiry, remote, by formal request, normal processing schedule, randomly, whenever the ‘need’ arises ?

• Is the data to be freely available ?– Are there some limitations on access ?– How are these access limitations managed ?

• What value is inherent in the data ?

Page 19: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 19

Some General ThoughtsSome General Thoughts

• What time base or volume spread is to be represented by the data ?

• What levels of accuracy are to be expected ?

• Is data to be available 7 days a week, 24 hours/day ?

• What response time is expected ? Minimum ? / Tolerable ?

And just what does that mean in real value terms ?

• How is new or altered data to be directed to existing data ?

Page 20: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 20

Some General ThoughtsSome General Thoughts

• How is input access to be controlled ?

• When and why is data deleted - who authorises such deletions ?

• What does the ‘data’ consist of - characters, objects, audio visual, TV, audio, animation ?

• What is the optimum method of storage (organisation) ?

Page 21: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 21

Some Advanced Commercial Applications

Some Advanced Commercial Applications

You have probably heard of these ‘advanced’ applications– Consumer (or Customer) Resource Management– Supply Chain Management

But have you heard of– Business Intelligence – Business Process Intelligence– Business Process Management– Business Activity Monitoring

These are some of the new, current applications

Page 22: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 22

Some DefinitionsSome Definitions

A General Definition:

DATA - raw (unprocessed or partly processed) facts which represent the state of entities (things) which

have occurred

INFORMATION - data which has been processed into a form USEFUL TO THE USER

What is Information to one user may be Data to another user.

Page 23: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 23

Possible influence of ABC Channel 2 ?

Where are the Mars landers ?

Which of these is Mars ?

Page 24: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 24

Audit TrailAudit Trail

General Definition:

‘The presence of data processing media and procedures

which allow any and / or all transaction(s) to be traced

through ALL STAGES of processing’

This infers that the following devices / techniques are in place:

1. A logging device which ‘traps’ all transactions

2. Some way of tagging each transaction so that it can be identified

3. Some way of retrieving the required transaction(s)

4. Some way of archiving - what is the required period ?

5. Control procedures and processes to ensure integrity

Page 25: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 25

DatabaseDatabase

A Database is a shared collection of Inter-Related data designed to meet the needs of multiple types of users and applications.

This implies that multiple USER VIEWS can be defined

Data stored is independent of the programs which use it

Data is structured to provide a basis for future applications

DATABASE = Stored Collection of Related Data

May be physically distributed

Page 26: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 26

Database Management SoftwareDatabase Management Software

A DBMS is SOFTWARE which provides access to the database in an integrated and controlled manner

A DBMS must contain :

1. Data Definition and Structure capabilities

2. Data Manipulation capabilities

Page 27: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 27

Data Definition and ManipulationData Definition and ManipulationData Definition Language (DDL)

used to describe data at the database level

Schema level - complete database description

Sub-Schema level - user views (restricted)

Data Manipulation Language (DML)

Provides for these Create Insert

capabilities Update Retrieve (extract)

Delete Drop

Modify Calculation

Report

Page 28: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 28

The Many Faces of DatabaseThe Many Faces of Database

Databases can be:

1. Transaction Intensive - ATM’s Checkouts

2. Decision Support - Browsing for trends

3. Mixed-Load - Combination of both

4. Small databases - Few thousand records

5. Very Large Database - Many millions or trillions

(VLDB) of records (Banks)

6. Non Traditional - Weather bureau, flight plans

Computer Aided Design data

7. Mobile - Able to ‘move around’

Page 29: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 29

DBMS RequirementsDBMS Requirements

Querying Capabilities

Data Displays (Presentation)

Data entry

Data Validation

Data Deletion

Committing Procedures (of changes)

AND Data Integrity, Security, Consistency and Concurrency Capabilities

Page 30: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 30

The Many Faces of DatabaseThe Many Faces of Database

• They can be:

Data Warehouses (which you will meet in Lecture 8)

Data Marts (or martlets)

• How is a database size measured ?

There are a number of ‘measurements’

Raw data size

Total database size

Total usable disk space size (which includes media protection such as mirroring)

Page 31: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 31

The Many Faces of DatabaseThe Many Faces of Database

Hardware Database Raw Data Total Disk

HP9000 Oracle 100GB 643GBDigital 8400 Oracle 100GB 361GB

IBM SP2 DB2/6000 100GB 377GB

NCR5100 Teradata 100GB 880GB

NCR5100 Teradata 1,000GB 3,280GB

Page 32: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 32

How ‘Big’ can a Database be ?How ‘Big’ can a Database be ?

• Try this : The Land Registry in England has a DB2 database whose ‘size’ is 18.3 TeraBytes

• This includes : User data

Summaries

Aggregates

Indexes

It does not include Free Space and Redundancy areas

Page 33: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 33

Important Database FeaturesImportant Database Features

• Data Integrity• Data Independence• Referential Integrity - Relational Database Model• Concurrency Control - Multiple Users• Consistency

- multi users

- distributed database

- replicated database

- partitioned database

- mobile database• Recovery from failure (Transaction and Media)• Security

Page 34: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 34

owner / parent

child / parent

child / parent

owner

member

Data Base Models - HierarchicalData Base Models - Hierarchical

child

Page 35: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 35

Data Base Models - NetworkData Base Models - Network

set of data

owner

member

Note: Only linked sets can be accessed

set ofdata

member

owner

Page 36: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 36

Data Base Models - NetworkData Base Models - Network

set of data

owner

member

Note: Only linked sets can be accessed

set ofdata

Page 37: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 37

Data Base Models - RelationalData Base Models - Relational

table table table table table A B C D E

Any table(s) can be joined to any other table(s), provided there is a means of effecting the join

Primary key / Foreign key concept. Data redundancy

No fixed linkages

Page 38: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 38

Edgar F. CoddEdgar F. Codd

• Born 1932, UK.• Died April 18, 2003.• BA/MA (Maths) Oxford University• PhD University of Michigan.

The Relational Oath:The Relational Oath:“I promise to use the key, the whole key and “I promise to use the key, the whole key and nothing but the key, so help me Codd”nothing but the key, so help me Codd”

Dr. E. F. Codd

Page 39: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 39

A Primary Key - What’s that ?A Primary Key - What’s that ?

• Hoffer, Prescott and McFadden define a Primary Key as :

An attribute (or combination of attributes) which uniquely identifies each row in a relation. (table)

• Richard T. Watson has this to say:

The primary key definition block specifies a set of column values comprising the primary key. Once a Primary Key is defined, the system enforces its uniqueness by checking that the Primary Key of any new row does not already exist in the table.

Page 40: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 40

And - A Foreign Key ??And - A Foreign Key ??

• Hoffer, Prescott and McFadden’s definition:

An attribute (or attributes) in a relation (table) of a database which serves as the Primary Key of another relation (table) in the same database.

• Richard T. Watson says:

An attribute (or attributes) that is a Primary Key in the same table, or another table. It is the method of recording relations in a relational database.

And, both the Primary and Foreign Key(s) should be drawn from the same Domain.

Page 41: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 41

2 relations (tables)2 relations (tables)

EMPNUM NAME Date of Birth DEPTNUM 3 JONES 16-05-1956 605 Referencing 7 SMITH 23-09-1965 432 Table 11 ADAMS 11-08-1972 201 15 NGUYEN 23-10-1964 314 18 PHAN 16-11-1976 201 23 SMITH 19-09-1974 314Relation (Table) Name : EMPRelation Schema: EMP(empnum,name,date of birth,deptnum)

DEPTNUM DEPTNAME201 Production314 Finance432 Information Systems605 Administration

Relation (Table) Name : DEPTRelation Schema: DEPT(deptnum, deptname)

ReferencedTable

Page 42: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 42

Relational DatabaseRelational Database

Data is represented in ROW and COLUMN form (matrix)

(tuple) (attribute)

Collections of related data ---> TABLES (relations)

1 or more tables ----> DATA BASE

ATTRIBUTES are generally static

ROWS are DYNAMIC and Time-Varying

The number of Attributes = DEGREE of a table

The number of Rows = CARDINALITY of a table

Page 43: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 43

Some RDB ConsiderationsSome RDB Considerations

• Data is held in tables• No order of data in tables - row or attribute• Concept of Foreign Key - Primary Key relationship• Data Typing - including nulls• Query Access - insert, update, delete, retrieval• Indexing on candidate (and Primary) keys• Integrity Constraints

Attribute value ranges

Referential Integrity (Foreign Key - Primary Key)

Entity Integrity

User Defined Integrity• Set retention constraints

Page 44: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 44

Some RDB ConsiderationsSome RDB Considerations

• Domain constraints• User defined ‘Rules’ e.g. quantities and values must not be

negative; pricing rate must not be zero• Recovery procedures• No explicit linkages between tables• Linking or embedding database operations in a procedural

language (Cobol, C ..)• Databases may be distributed across similar or different

DBMS’s• Security features

Page 45: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 45

Data Description LanguageData Description Language

Used to describe data at the Database level

Structure: Attributes

Schema : Complete description of the database using DDL

SubSchema : Describes data in the database as it is ‘known’ to individual programs(processes) or users

The segment of logical data record(s) required is

commonly known as a VIEW

Page 46: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 46

Data Manipulation LanguageData Manipulation Language

Language (commands and syntax) used to cause transfers of data from the Database and the Operating Environment and vice versa

Variety of Languages - Cobol, C, Java, C++

and SQL as in Access, DB2, dBASEV, Informix, Oracle, VisualDataBase, SQLServer, MySQL

Windows versions provide Icons and Menu options which are translated by the DBMS software to Database manipulation commands

Typical commands: get, put, replace, seek, update,delete, insert, drop, find, modify

Page 47: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 47

A Typical Database ModelA Typical Database Model

Users - keyboard directDBMS

Database

Users

MenuOptions

Program

Interface

Programs written inCobol, C, C++, PascalJava etc.

Database QueryAccess Language

Page 48: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 48

Advantages of DatabaseAdvantages of Database

• Reduced Data Redundancy

• Data Integrity

• Data Independence

• Data Security

• Data Consistency

• Easier use of Data via DBMS Tools (Query languages, 4GL's)

Page 49: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 49

Disadvantages of DatabaseDisadvantages of Database

• Complexity

• Expense

• Vulnerability

• Size of - disk storage, processor memory

• Training Costs

• Compatibility

• Technology Lock In

Page 50: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 50

More on DBMSMore on DBMS

Capabilities Required:– the DBMS must provide a natural interface of user data– the interface must be independent of any physical

storage structures– different users with different views must be able to

access the same database– database changes must be possible without affecting

programs which do not use the changes

(Physical and Logical Independence)

Page 51: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 51

More on DBMSMore on DBMS

Other Requirements : Provision of Operational Facilities to ensure:– multi user access control– remote terminal access– restrictions on user access– recovery from system faults– database distribution

Page 52: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 52

Page 53: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 53

Your ProjectYour Project

• Intended to bring together many of the aspects required in DATABASE DESIGN

• It is NOT a complete systems design

• There is no transaction processing required

• The database MUST contain data

• It must exhibit constraints and other forms of data integrity

Page 54: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 54

Data ModelsData Models

Model ofsystem

in client’smind

Entity model ofclient’s model

Table modelof entity model

Tables on diskTables on disk

ServerServer

Page 55: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 55

Communicating with a RDBMS Using SQL

Communicating with a RDBMS Using SQL

DatabaseDatabase

SQL> SELECT loc FROM dept;

SQL> SELECT loc FROM dept;

SQL statementis entered Statement is sent to

database

LOC

-------------

CLAYTON

CAULFIELD

PENINSULA

GIPPSLAND

LOC

-------------

CLAYTON

CAULFIELD

PENINSULA

GIPPSLAND

Data is displayed

Page 56: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 56

Your ProjectYour Project

• There are 3 deliverables - normal design practice– Don’t overlook the User’s interest / Contribution / Costs

• In the assignment, YOU are the user– You set the ground rules, also known as Business Rules– You need to document these Rules– Don’t make the project too onerous i.e. make the design

simple.– That way you will create a working model in the 13 weeks

we have

Page 57: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 57

Your ProjectYour Project

• Deliverable 1 - The Project Plan

Due 17th March

• Deliverable 2 - User Requirements Statement

Due 21st April

• Deliverable 3 - The working model

Due 26th May

Page 58: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 58

Your ProjectYour Project

• One of the group members will need to be the Co-ordinator

- do this co-operatively.

• Also, some person in the group will need to address the question of documentation !!!

• Use of Microsoft Project, Word and possibly Excel (or some spreadsheet) would be an advantage.

Page 59: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 59

Your ProjectYour Project

• Deliverable 1 - Project Plan:– This sets the tempo for the assignment– Make sure you have the MAJOR components included– Gannt charts change as events occur - or don’t occur

• Continue with the development of the Project - don’t waste time in just preparing the Gannt chart

• By Thursday 17th March, you should have some workable ideas about the rest of the assignment

Page 60: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 60

Your ProjectYour Project

• One member will need to act as the Reviewer for– Project plan completeness

– Validity of the Entities

– Validity of the Entity Relationships

– Normalisation / Primary key(s) / Foreign key(s)

– User requirements statement (this includes suggested report and Query profiles)

Page 61: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 61

Your ProjectYour Project

Review (continued)– Data structures

– Constraints

– Test strategy

– Test data

– Testing results

– Operational model

Page 62: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 62

Your ProjectYour Project

• Make rough outlines of the Entities

• Make rough outlines of the Data Structures - these fill out the Entities

• Make rough outlines of the Reports, Queries

• Make notes of Rules, and the Constraints you consider will help the Rules to control data in the database

Page 63: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 63

Your ProjectYour Project

• Review the E-R diagram critically - it’s best if one person of the group becomes the ‘Quality Control’.

• Each member of the group MUST know what the assignment is about and how it is being developed.

• Prepare the ‘final’ technical paper by Thursday 8th May

Page 64: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 64

Your ProjectYour Project

• You will probably be using MS-Access to develop the physical database. Or, you could use Oracle.

• Become familiar with the Table Design feature– Include Primary Keys, Required Fields, Value Ranges or

Exclusions– ‘Numbers’ are ??

– Integers (no decimals)– Numerics with decimals– Text references only

• Use data types to constrain data• Use the ‘required’ property

Page 65: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 65

Your ProjectYour Project

• If you are using lists of controlled data, investigate the Combo Box or List Box features

• When using Queries, don’t make them complex

• Reports are the standard report function

• Forms (a software development) can be easily developed using normal function of the database dialog box

• You can make an active form using standard facilities

Page 66: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 66

Your ProjectYour Project

• There should be no need to delve into the Applications Development features of Access. However, if you have some expertise, and time, do so by all means

• Make sure you keep a backup of your database

Page 67: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 67

Building EvacuationBuilding Evacuation

If the Building Evacuation Alarm System Activates

– Collect your belongings– Move out of the room using the Exits– Use the Stairs - NOT the Lifts or Escalators– Follow the directions of FLOOR WARDENS - if present– Move to the Lawn outside K Block (common)– Wait for further instructions (if during the evening use

your discretion)

– TREAT EVERY EVACUATION ALERT AS REAL

Page 68: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 68

TimetableTimetable

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

• Tutorials will be held on Thursdays in Laboratory K1.07 from 1.00pm to 3.00pm.

The Laboratories are booked for 2 hours so that if you wish you can continue with the unit exercises or the project

There are 16 terminals in each room

Page 69: CSE3180 Semester 1, 2005 Week 1 / 1 Welcome to CSE3180 ‘Principles of Database Systems’ Semester 1, 2005

CSE3180 Semester 1, 2005 Week 1 / 69

That should be enough for today

The unit materials are available at

http:///www.monash.edu.au/courseware/cse3180