MiscWorld

A MiscWorld Experience

Archive for December, 2007

UML: Association, Aggregation and Composition

This seems like the neverending story, and because I’m tired of it I want to share my understanding:

  • Association: Used when one instance should send a message to another instance. There’s no a whole / part relationship. In Java this can be an instance calling another instance’s methods. Examples of this can be a Customer and its persistance mechanism (DAO - data access object). They just send messages between each other.
  • Aggregation: Used to represent a whole / part relationship. The creation and destruction of child objects is not controlled by their parent. For example, a Binder and its sheets. You can destroy your binder and save your sheets for later usage… or for another binder.
  • Composition: Like an aggregation but the life span of child objects is controlled by their parent. For example, a Notebook and its sheets… If you create a notebook, you need to create sheets to fill it with. If you destroy your notebook you will destroy all your sheets. You know you have a composition when you no longer need the child objects once the parent has been destroyed.
No comments

Oracle XE & PHP

Have you ever tried to access an Oracle database from PHP? Well, if you are a newbie (like me) this is a great manual that will take you from PHP compilation to XML generated results:

Download: The Underground PHP and Oracle Manual
By Christopher Jones and Alison Holloway

The book includes:

  1. PHP Oracle Extensions
  2. Installing Oracle Database 10g Express Edition
  3. Using Oracle Database 10g
  4. Installing Apache HTTP Server
  5. Installing PHP
  6. Connecting to Oracle Using OCI8
  7. Executing SQL Statements with OCI8
  8. Using PL/SQL with OCI8
  9. and much more…
1 comment