Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Information Management
Information Management
Agenda
Normalization
Information Management
What is Data?
Information Management
Information Management
Why Databases?
Why database?
The way data is accessed
The way data is handled
Information Management
Managing Data
Information Management
Information Management
Information Model
Information Model
Abstract management of objects at a conceptual level
Independent of specific implementations and protocols
Hides all protocol and implementation details
Defines relationships between managed objects.
Information Management
Data Model
Data Model
Define how data is to be represented and structured
It can be used to map how data from the real world is to be
represented in a software system
Information Management
10
Extended Relational
Entity-Relationship
Hierarchical
Network
Object-oriented
Object-relational
Relational
Semantic
Semi-structured (XML)
Information Management
11
Advantages
Based on a formal theoretical model and proven in practice
Provides logical view of the data
Information Management
The relational data model has its own unique terms used to
define its concepts.
Domain
Attribute
Relation
(ID, int)
(NAME, text)
(EXT, int)
(Active, boolean)
John S
54213
Michael B
52137
Jeremy W
50603
Leah E
58963
Tuple
Domain (or data type) defines the set of possible values that data can assume
12
Information Management
Table
13
ID
NAME
EXTENSION
MANAGER
John S
54213
Susan P
59867
Andrew J
55935
Michael B
52137
Jeremy W
50603
Leah E
58963
Row
2010 IBM Corporation
Information Management
Tables
For example:
You want to store data about a company
Data about branch offices will be stored in a table
Employee data for specific branches will be stored in its own
table
Product data will be stored in another table
14
Information Management
Columns
15
Columns must be
designated a specific
data type such as
DATE, VARCHAR, INTEGER
and so on
Specific
Information
Data type:
Char
Information Management
Data Type
This is counterpart of Domains in the Relational Model,
which defines the smallest unit of data that can be stored
Columns always have a data type
Attribute/Colum
Smallest unit of
Data (atomic value)
16
Information Management
17
Primary Keys
Uniquely identifies each tuple (row) of the relation (table)
Relations must always have a primary key
Although it is recommended, tables in a relational database
are not required to have a Primary Key
Examples
Driver's license of a person
ISBN of a book
Serial number of a product
Primary Key
Information Management
18
Foreign Keys
Attribute in one relation whose values match a primary key
of another relation
Defines the relationship between two tables
ID
(PK)
NAME
DEPT_ID
(FK)
ID
(PK)
DEPT_NAME
John S
Finance
Michael B
Design
Jeremy W
Business
Leah E
Development
Information Management
Why Normalization?
19
ID
Name
Office City
Extension
Task
John S
Toronto
54213
Planning
John S
Toronto
54213
Marketing
John S
Toronto
54213
Testing
Susan P
New York
59867
Marketing
Jennifer L
Chicago
59415
Planning
Jennifer L
Chicago
59415
Testing
Information Management
Normalization
No anomalies, no redundancy
No loss of information
Employee Table
Task Table
ID
Name
Office City
Extension
John S
Toronto
54213
Susan P
New York
Jennifer L
Chicago
ID
Task
Planning
59867
Marketing
59415
Testing
20
Employee ID
Task ID
3
2010 IBM Corporation
Questions?
Summer/Fall 2010
E-mail: imschool@us.ibm.com
Subject: DB2 Academic Workshop
Information Management