Date post: | 07-Apr-2018 |
Category: |
Documents |
Upload: | danny-manno |
View: | 218 times |
Download: | 0 times |
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 1/22
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights reserved.
Data Management Layer
Design
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 2/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
2
ObjectivesBecome familiar with several object-persistence formats.
Be able to map problem domain objects to different object-persistence formats.
Be able to apply the steps of normalisation to a relational
database.Be able to optimise a relational database for object storage
and access.
Become familiar with indexes for relational databases.
Be able to estimate the size of a relational database.Be able to design the data access and manipulation
classes.
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 3/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
3
The Data Management LayerIncludes:
data access and data manipulation logic
the actual design of the storage
Four-step design approach
Select the format of the storage
Map the problem-domain objects to an object-persistence format
optimise the object-persistence format
design the data access and manipulation classes
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 4/22
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights reserved.
OBJECT PERSISTENCE
FORMATS
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 5/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
5
Object Persistence FormatsFiles (Sequential and Random)
Relational databases
Object-relational databases
Object-oriented databases
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 6/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
6
Sample File
Fictitious customer database
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 7/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
7
Sequential & Random
Access FilesSequential access files allow sequentialoperations (assumes disc storage)Read, write, and search
Efficient for report writingSearches are not efficient because on average
50% of records have to be accessed
Two versions
Ordered (linked list)Unordered (chronological placement)
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 8/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
8
Random Access FilesAllow only random or direct file operations
Good for finding and updating a specific object
Inefficient for report writing
Require a key or index to locate the desiredrecord
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 9/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
9
Application File TypesMaster Files
Look-up or Reference files
Transaction files or Journals
Audit file
History file
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 10/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
10
Relational DatabasesCollection of tablesA table is comprised of rows of attributes that
define an entity
Each row in the table is a unique record
The same attribute in each record is the primarykey of the table. Each key value must be unique
Tables are related to each otherA foreign key is a record attribute that is the
primary key of another tableRelationships established by linking foreign key of
one table to the primary key of another table
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 11/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
11
Database Management
System - DBMS
Software that creates and manipulates adatabase
RDBMS is a DBMS for a relational database
RDBMS usually support Referential Integrity
the idea of ensuring that values linking the tables
together (references) through the primary and
foreign keys are valid and correctly synchronised
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 12/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
12
Referential Integrity ExampleThe class Customer has an attribute custID
The class Order has an attribute custID thatindicates the customer who placed the order
You should not be able to:
create an order for a non-existent Customer;
delete a Customer who has existing orders;
change the custID value of a Customer, unless youalso change the custID values of the related
orders (caveat – never change primary keys)
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 13/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
13
The Structured Query
Language: SQLA standard language for manipulating data in
tables: DDL and DML
SQL Commands enable the functions:Create, edit, and delete tables
Add, edit, and delete data
Display data from one or more related tables
Display data computed from data in one or morerelated tables
Studied in ICT118 Database and Info Retrieval
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 14/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
14
Selecting Persistence Formats
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 15/22
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights reserved.
MAPPING PROBLEM-DOMAIN
OBJECTS TO OBJECT-
PERSISTENCE FORMATS
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 16/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
16
Mapping PD Classes to RDBMSMap all concrete problem domain classes to the
RDBMS tables.
Map single valued attributes to columns of the tables.
Map methods to stored procedures or to program
modules.
Map single-valued aggregation and associationrelationships to a column that can store the key ofthe related table
Map multi-valued attributes and repeating groups tonew tables and create a one-to-many associationfrom the original table to the new ones.
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 17/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
17
Mapping PD Classes to RDBMSMap multi-valued aggregation and association relationships
to a new associative table that relates the two originaltables together. Copy the primary key from both originaltables to the new associative table
For aggregation and association relationships of mixedtype, copy the primary key from the single-valued side(1..1 or 0..1) of the relationship to a new column in thetable on the multi-valued side (1..* or 0..*) of therelationship that can store the key of the related table
Ensure that the primary key of the subclass instance is thesame as the primary key of the superclass..
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 18/22
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights reserved.
OPTIMISING RDBMS-BASED
OBJECT STORAGE
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 19/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
19
Optimising Storage EfficiencyNo redundant data:
Wastes space – an issue in large scaleinformation system
Allows more opportunities for error
Few null values in tables:
Null is difficult to interpret
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 20/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
20
Normalisation
Tells us how well-formed the data is in anRDBMS
Reduces data redundancies
First four levels of normalisation are
1 Normal Form: removes multi-valued fields
2 Normal Form: removes partial-key dependencies
3 Normal Form: removes transitive dependencies(dependence on non-primary key fields)
Boyce-Codd Normal Form: every determinant is a
candidate key
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 21/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
21
Steps of Normalisation
8/6/2019 ICT117 Week11 Data Management s
http://slidepdf.com/reader/full/ict117-week11-data-management-s 22/22
17 March, 2011 ICT117 Systems Analysis & Design. Semester 2, 2010.
Includes John Wiley & Sons © material.
22
Next lecture
HCI – Human Computer Interface design