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.
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:
- PHP Oracle Extensions
- Installing Oracle Database 10g Express Edition
- Using Oracle Database 10g
- Installing Apache HTTP Server
- Installing PHP
- Connecting to Oracle Using OCI8
- Executing SQL Statements with OCI8
- Using PL/SQL with OCI8
- and much more…
