Re: Searching OO Associations with RDBMS Persistence Models
- From: Robert Martin <unclebob@xxxxxxxxxxxxxxxx>
- Date: Sun, 28 May 2006 11:51:46 -0500
On 2006-05-03 12:19:11 -0500, frebe73@xxxxxxxxx said:
Hi,
as the lack of replies indicates, there are no good solution for your
problem. OOA/D does not provide any tools for non-trivial searches like
your. Using OOA/D, the standard solution would be to create a
findByNameStartingWithAndByLocation()-method in the Company class. The
implementation of the find-method would use SQL.
Many OO evangelists claim that searches are not needed in well design
OO applications. You have to redesign your application to avoid the
scenario above. Obviously reporting, etc, should not be done using
OOA/D.
Fredrik Bertilsson
http://moonbird.sourceforge.net
Ridiculous. OO and RDB coexist very nicely together. I've never heard anyone suggest that searches aren't needed.
The big problem with OO and RDB is that people try to make them represent each other. RDB is about data structure an OO is about behavior structure. The objects in an OO program should NOT be the tables in the RDB. The objects in the OO program should MANIPULATE the data structures from the RDB.
--
Robert C. Martin (Uncle Bob) | email: unclebob@xxxxxxxxxxxxxxxx
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716 |
.
- Follow-Ups:
- Re: Searching OO Associations with RDBMS Persistence Models
- From: Alfredo Novoa
- Re: Searching OO Associations with RDBMS Persistence Models
- From: frebe73
- Re: Searching OO Associations with RDBMS Persistence Models
- References:
- Prev by Date: Re: Searching OO Associations with RDBMS Persistence Models
- Next by Date: Re: Searching OO Associations with RDBMS Persistence Models
- Previous by thread: Re: Searching OO Associations with RDBMS Persistence Models
- Next by thread: Re: Searching OO Associations with RDBMS Persistence Models
- Index(es):