Mapping Objects to Relational Databases: O/R Mapping In Detail By Scott W. Ambler

Most modern business application development projects use object technology such as Java or C# to build the applation software and relational databases to store the data.  This isn’t to say that you don’t have other options, there are many applications built with procedural languages such as COBOL and many systems will use object databases or XML databases to store data.  However, because object and relational technologies are by far the norm that’s what I assume you’re working with in this article.  If you’re working with different storage technologies then many of the concepts are still applicable, albeit with modification (don’t worry, Realistic XML overviews mapping issues pertaining to objects and XML).

Unfortunately we need to deal with the object relational (O/R) impedance mismatch, and to do so you need to understand two things: the process of mapping objects to relational databases and how to implement those mappings.  in this article the term “mapping” will be used to refer to how objects and their relationships are mapped to the tables and relationships between them in a database.  As you’ll soon find out it isn’t quite as straightforward as it sounds although it isn’t too bad either.
阅读全文 Mapping Objects to Relational Databases: O/R Mapping In Detail By Scott W. Ambler