Академический Документы
Профессиональный Документы
Культура Документы
Technology Overview
Agenda
The following slides provide a high level overview of the
following topics
3-2
N-Tiered Architecture
- IE 6.0+
Web
Server
Application
Server
- WebLogic
- WebSphere
- Tomcat*
- Oracle AS
DB
- Oracle
- DB2
- MSS
* Tomcat doesn't allow for the physical splitting of web and app
server onto separate physical boxes
3-4
Web
Server
Application
Server
3-5
DB
Web
Server
Application
Server
3-6
DB
Entity Relationship
Diagramming Standards
3-8
Person
Account
Bill Msg
Code
3-9
Customer
Class
Control Table
N/A
Person
Account
Bill Msg
Code
3 - 10
Customer
Information
Billing
Rates
Meter
Management
Meter Read
Financial
Transaction
Adjustment
Field Order
Payment
To Do
Background
Process
Credit &
Collections
Workflow &
Notification
Maintained
on higher
level page
Sales and
Marketing
Framework
Meta-Data
3 - 11
Customer Info.
Customer
Class
Control Table
N/A
Person
Account
PK: Person ID
3 - 12
PK: Account ID
Bill Msg.
Code
Customer
Class
Control Table
N/A
Person
PK: Person ID
Account
PK: Account ID
3 - 13
Bill Msg.
Code
Customer
Class
Control Table
N/A
Person
PK: Person ID
3 - 14
Person/
Account
Account
Bill Msg.
Code
PK: Account ID
Bill
Message
Account
Bill
Message
Appearance
Flag
Values:
Always appears on bills
Appears on next bill
The Appearance Flag is not a separate table. Rather, the dashed line
means that there's a column on the Bill Message table whose valid
values are defined on the "Lookup" table. The "lookup" table is a
single table that holds valid values for many columns on many tables.
In this example, this means that the lookup table contains two valid
values for the appearance flag.
3 - 15
3 - 16
3 - 18
In other words, if the data dictionary is wrong, the backend SQL will
also be wrong
Table /
Field
Constraint
Constraint
/ Field
Field
3 - 19
Theory = Practice
We slavishly follow relational theory and design our databases
to Codd's 3rd normal form rule:
all columns are related to the key, the whole key, and nothing but the
key
If you don't know what "3rd normal form" means, you have some
homework tonight
3 - 22
No Recurring Groups
Rather, we create a "child table" so each implementation can have as many different entries
as it needs
Person Id
Person
Person Id
ID Type
ID
123819812
SSN
123-23-2992
123819812
DL
CA 992829
123412352
SSN
229-20-2900
123819812
123412352
Person /
ID
Person /
Phone
Identifier
Type
Phone
Number
Type
Person Id
Phone
Type
Phone
Number
123412352
Home
415-393-2202
123412352
Work
415-388-9474
Prime Keys
The prime key of many "non
admin" tables is a systemassigned, random number
Person Id
ID Type
ID
123819812
SSN
123-23-2992
123819812
DL
CA 992829
123412352
SSN
229-20-2900
Description
SSN
Social security
number
Drivers
license
number
DL
3 - 24
Person
123819812
123412352
Person /
ID
Person /
Phone
Identifier
Type
Phone
Number
Type
Person Id
Phone
Type
Phone
Number
123412352
Home
415-393-2202
123412352
Work
415-388-9474
PK is gold
FKs are
blue
3 - 25
There is almost no
redundant data (not even
a column on Account that
holds its balance)
Account Id
Account
12988382
43837729
Financial
Transaction
Financial
Transaction
Type
Master Data
FT Id
Transaction Data
Child Data
129829021
129899382
129829982
129872827
Account Id
12988382
12988382
12988382
12988382
FT Type
Bill
Pay
Bill
Pay
Amount
$390.34
$-192.66
$192.66
...
No Multi-Purpose Columns
We don't have empty "user defined fields" on our tables. Why?
Person
Person /
Char.
Characteristic
Type
Most objects have a "char" table
so implementations can "add
columns" without changing the
database
3 - 27
Language Tables
The admin tables support multiple end-user languages
An earlier diagram implied
that there's a column on the
Identifier Type table that
holds its description this is
NOT true
ID Type
Description
SSN
Social security
number
Drivers
license
number
DL
3 - 28
Person
Person /
ID
Identifier
Type
Language
Identifier
Type /
Language
ID Type
Language
Description
DL
English
Drivers license
DL
French
SSN
Permis de
conduire
Person
CLOB
3 - 29
Maintenance Objects
MO Definition
Most logical transactions are made up of several tables (due to the good
relational design practices described earlier)
We use the term "maintenance object" (MO) to reference the group of tables
that hold an object's physical data
The person
maintenance object's
data is held in several
tables
Person
Person
CI_PER
Person ID
Person / ID
CI_ID_TYPE
CI_PER_ID
Person /
Name
Person /
Phone
CI_PER_NAME
CI_PER_PHONE
Name Type
CI_LOOKUP_FIELD
3 - 31
Phone Type
CI_PHONE_TYPE
Why MO's?
Rather, we prefer logic to "send messages" to a maintenance object (e.g., read a person, add a person, change a
person, etc.) and then the MO can determine how to satisfy the request
You will find that messages are sent to MO's via an XML document and that the MO will publish an XML document
in response
Person
Person
CI_PER
Person / ID
CI_PER_ID
3 - 32
Person /
Name
Person /
Phone
CI_PER_NAME
CI_PER_PHONE
Person
CI_PER
Person ID
Person / ID
CI_ID_TYPE
CI_PER_ID
Person /
Name
Person /
Phone
CI_PER_NAME
CI_PER_PHONE
Name Type
CI_LOOKUP_FIELD
3 - 33
Phone Type
CI_PHONE_TYPE
The MO, table and field meta-data is very important as it is used to generate the
java classes that add, change, delete and read a maintenance object
Table / Field
MO
MO Def /
Table
Primary
Child
Field
3 - 34
3 - 35
The program used to construct the MO's info string (info strings appear
throughout the UI, for example, whenever an account is displayed on a page,
a description of the account appears, this description is what we refer to as an
"info string")
The transaction used to display / add / update instances of this MO
We point this out as you'll use FK Ref's extensively when you develop
business objects and user interface
Table
FK
Reference
3 - 36
Persons
County Parcel ID =
A234993
Places
Elevation =
1000ft
Customer
Count = 4
Contracts
Things
Other
Things
3 - 38
Number
Wires = 3
...
Copyright 2009, Oracle. All rights reserved.
Volts
= 240
Premise /
Char
Char
Type
An implementation
can set up an
unlimited number of
user-defined fields for
their premises (here's
an example of a
premise with 6 chars)
3 - 39
Predefined
Value
3 - 40
Ad hoc
Value
Foreign Key
Reference
File
Location
Gender
Male
Female
3 - 41
Predefined
Value
Ad hoc
Value
Foreign Key
Reference
Valid Value
File
Location
Defined
Value
Ad hoc
Value
Char
Type
Foreign Key
Reference
File
Location
Valid Date
Validation
Algorithm
3 - 42
Defined
Value
Ad hoc
Value
Property
manager
Foreign Key
Reference
3 - 43
FK
Reference
File
Location
Defined
Value
3 - 44
Ad hoc
Value
Foreign Key
Reference
Customers
Contract
File
Location
Premise /
Char
Characteristic
Type
Notice how the Taxing
county changes (and
therefore the tax rate
will change on this
effective date)
3 - 45
Entity
Char Type
/ Entity
3 - 46
Values:
- Person
- Account
- SA
- Premise
- SP
- Meter
- Item
- Meter Type
- Item Type
- SP Type
- SA Type
- Device Test
- Distrib. Code
etc..
3 - 48
You cannot change or remove core business rules, you can only add to them
MO's that are written in Cobol can be extended by writing Java or Cobol
MO's that are written in Java should only be extended by writing Java (but this
isn't strictly enforced)
Foreshadowing
However, rather than write and compile code, there are many
more elegant ways to add business rules to a MO
You'll learn about these in the next chapters
3 - 49
Data Ownership
Owning Meta-data
As you can probably guess, the meta-data is an integral part
of the system
Much of this meta-data is interpreted at execution time and is
therefore shipped with our software
We don't want implementations to change this meta-data
because:
3 - 52
Installation FW
Field
Owner Flag
Table
Char Type
meta-data
3 - 53
The system will not allow changes to a row if the row's owner flag is not the same as the
implementation's owner flag
For example, an implementation will not be able to change data owned by the base-package
For example, if an implementation adds a new MO, the MO will be marked with an owner flag of CM
(given this is the value on the implementation's installation record)
CM
Owner Flag
3 - 54
Installation FW
Field
Field
Description
VERSION
RS_CD
MSG_ID
DOB
Version
Rate Code
Message Id
Date of Birth
Owner Flag
Owner
F1
C1
A2
CM
Message MO
Owner Flag
Message
Message /
Language
Language
3 - 56
3 - 57
Adding A New MO
3 - 59
Given a good design is your starting point, the following points describe
the steps necessary to create a new MO:
1. Create the tables, columns, indexes, and constraints in the database (this
typically involves a DBA; there are no tools within the application to do this)
2. Populate the system's table / field meta-data to match the information in the
database. You use the transactions you used in this chapter to do this.
3. Populate the system's MO meta-data with information about your new tables.
Again, you'll use the transactions you used in this chapter to do this.
4. Use the MO Wizard to generate the Java annotations (you must use Eclipse to
access this wizard). You'll learn about this wizard in the Java developer class.
5. Rebuild the shared Java environment with your new annotations
6. Create a FK reference meta-data object for your new MO
Bottom line - you should not have to write any Java (the system will use
the generated annotations to add, change, delete and read your new MO)
3 - 60
3 - 61
Review Questions
3 - 62
3 - 63
3 - 64