Inside Paulo Abrantes' head
[ start | index | login or register ]
start > comment-start > 2007-02-28 > 1-10

1-10 commented start/2007-02-28/1

Created by jpmsi. Last edited by jpmsi, one year and 151 days ago. Viewed 478 times. #4
[diff] [history] [edit] [rdf]
labels
attachments
I don't think the Search<DomainObject> concept that João described above was completly understood. The suggestion was to consider a view in a database as a regular table. So, if your persistence framework maps objects to tables, it can map and object into a view. If you then ask the framework to provide all objects of that type (a readAll) it will provide objects representing the result of a complex query "transparently".

Well, to me the main problem with this approach is the materialization of the objects resulting from a search, plus all the related objects needed to present the results, when such materialization was (probably) already made by the database engine.

I'll present the same problem as I did to you personally yesterday: Consider a costumer with orders. You wish to list all costumers plus it's most recent order. You would create an index on the date of the order, and join the costumer table with the order table on the most recent order. The query will discard quickly the orders we don't want because it simply transverses the BTree to find our order.

However, when done in memory, upon materializing the results, you'll have to find the most recent order by iterating manually through the orders of the costumer, materializing them all to do the comparison and find the most recent. This is a very simple example that (I hope) can demonstrate my point.

24 comments (by jpmsi, m4ktub, pabrantes) | post comment
Who am I?
paulo-roca2My name is Paulo Abrantes AKA pabrantes and I'm a software developer. I'm currently employed at >>CIIST working as a Java developer in >>FenixEDU.

This blog is mostly about Java programming, domain driven design and snipsnap bliki developing. Everything written in this blog is my personal opinion and it may not reflect the opinions of my employer and co-workers.


Blog subscription
subscribe by rss subscribe by email

Links
>> Home
>> Paulo's Profile
>> Post History
>> Add to Technorati Favorites
>> Paulo's Photo Gallery
>> WishList
>> Posting without Login

Search Blog
Fellow Bloggers

Recent Posts

Java Programming: Bytecode Injection
Intermission: Sorry For Downtime
Software Developing: Studying The Bliki Domain Model
SnipSnap Developing: Trying to settle a roadmap
System Administration: Load Balancing with Apache
Blogging: Two years have passed
Software Developing: The SnipSnap Saga
Java Programming: Getting your code spicy with Groovy
Software Developing: Fluent Interfaces
Software Developing: Implementing a ShoutBox on SnipsSnip
Software Developing: SnipSnap, SnipIt and SnipSnip
Java Programming: Proxies and Access Control
Java Programming: Proxies and References
Java Programming: References' Package
YALM: Yet Another Layout Modification

For older posts, please refer to post-history for a complete Post History

Logged in Users: (0)
… and 8 Guests.
This is a modified version of snipsnap.org created by >>Paulo Abrantes