hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ajay.gov" <agovindara...@yahoo.com>
Subject Re: very trick design issue
Date Mon, 04 Apr 2011 01:51:26 GMT

You may want to denormalize by adding the security_price info in the activity
table. When you insert items into the activity table you wll then have to
insert the security_price for it as well. That way you can get the
securty_price for the activity with one call to the activity table.


Hiller, Dean  (Contractor) wrote:
> We have a table of securities and off of that table another table with
> security_price which has the security_date and security_price for that
> date(and security_id of course relating back to the security).  Ie. It's
> a one to many.
> We then have an activity table(each row was a trade of stock) with an
> activity_date(very important date) and security_id.  In our software, we
> already have a list of the Activities we are dealing with over a time
> period(say from 1/1 to 1/31).
> We now need to get all the security_prices related to the each
> activities security_id and date to get the pricing information.  Right
> now, we end up doing a 1+N query here L and get the List of activities
> and then each security_price based on a single activity's date and
> security_id.  I am wondering if there is a way to redesign these
> security tables such that I could possibly do 2 getAll method calls
> instead.  Any ideas on this one?   Or maybe there is someway to do this
> with some indexing library instead and do one query though not sure how
> since each activity has a different date and different security_id.
> Thanks,
> Dean
> This message and any attachments are intended only for the use of the
> addressee and
> may contain information that is privileged and confidential. If the reader
> of the 
> message is not the intended recipient or an authorized representative of
> the
> intended recipient, you are hereby notified that any dissemination of this
> communication is strictly prohibited. If you have received this
> communication in
> error, please notify us immediately by e-mail and delete the message and
> any
> attachments from your system.

View this message in context: http://old.nabble.com/very-trick-design-issue-tp31205115p31310741.html
Sent from the HBase User mailing list archive at Nabble.com.

View raw message