dbTalk Databases Forums  

How to achieve ORing in join cursors

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss How to achieve ORing in join cursors in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dhiraj
 
Posts: n/a

Default How to achieve ORing in join cursors - 02-27-2006 , 07:26 AM






1. Consider following scenario -

* There is one primary table say 'cars', having key as 'carId' and
data part containing a structure of some inforamtion like color,
make, doorcount etc.
* suppose secondary indices are created for attributes color,
doorcount which may have duplicate records.
* Now if I want to obtain a join cursor on 'cars' based on following
info
color = red OR black
doorcount = 4 [b:f81fb95846]OR[/b:f81fb95846] 5

Is such kind of query be solved using join cursors? if not is there
any alternative way to do this?

2. A get call on a cursor (to secondary table) with DB_SET sets the
cursor to the record having key equal to the key specified as
parameter to this call. However if I want this cursor to point to

those records only which are -

Case 1: having key [b:f81fb95846]Not equal[/b:f81fb95846] to the
key passed as
argument to get call
Case 2: having key [b:f81fb95846]Less than[/b:f81fb95846] the key
passed as
argument to get call
Case 3: having key [b:f81fb95846]Greater than[/b:f81fb95846] the
passed key as
argument to get call

Please let me know if there is some way to achieve this.


---
-Dhiraj


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.