|
Object-Relational Mapping The goal is now, to "wire" the relational tables in the MySQL database to the object-oriented structure of Helma. While MySQL (and any other relational database system) structures data in tabular form, each row representing a data set, in Helma each table row becomes a HopObject using the columns as named subnodes, also called properties. +----+-----------+-----------+---------------------+ | id | firstname | lastname | email | +====+===========+===========+=====================+ | 1 | Hannes | Wallnoefer | hannes@helma.org | +----+-----------+-----------+---------------------+ | 2 | Robert | Gaggl | robert.gaggl@orf.at | +----+-----------+-----------+---------------------+ | 3 | Tobi | Schaefer | tobi@helma.org | +----+-----------+-----------+---------------------+ fig.1 A relational database table. +-------------+ | HopObject 1 | +===========+=+----------------+ | FIRSTNAME | Hannes | +-----------+------------------+ | LASTNAME | Wallnoefer | +-----------+------------------+ | EMAIL | hannes@helma.org | +-----------+------------------+ +-------------+ | HopObject 2 | +===========+=+-------------------+ | FIRSTNAME | Robert | +-----------+---------------------+ | LASTNAME | Gaggl | +-----------+---------------------+ | EMAIL | robert.gaggl@orf.at | +-----------+---------------------+ +-------------+ | HopObject 3 | +===========+=+--------------+ | FIRSTNAME | Tobi | +-----------+----------------+ | LASTNAME | Schaefer | +-----------+----------------+ | EMAIL | tobi@helma.org | +-----------+----------------+ fig.2 Three HopObjects representing the three rows of the table.These so-called type mappings are set-up in the file type.properties for each HopObject. We create such a file in the next step.
|
navigation
Download
Community
Weblog
Mailing Lists
IRC Channel
Documentation
Introductions
Tools
Reference
Project
Roadmap
Bug Reporting
Source
Wiki
Tags
Updates
Related Projects
search
|
||||