views:

203

answers:

1

I am designing the layout and usage of an Amazon SimpleDB application. The docs for simpleDB give several example queries: Here is one: ref: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1231

select * from mydomain where Title = 'The Right Stuff'

I would like to use something like:
select * from mydomain where * = 'The Right Stuff'

So I can search through all attributes for 'The Right Stuff'.

I know I could build a database and test this, but right now I'm not coding, just planning, so if there is anyone out there who knows the solution to this, then thanks.

Is there a public database out there we can query for testing?

--Tom

+3  A: 

There is no way so perform the type of query you are asking about. Each attribute value in SimpleDB is indexed according to the attribute name it is associated with. In other words, there is a separate index for each attribute name. As a result, even if you could do it it would need to examine every index in the domain and would be prohibitively slow in the current SimpleDB implementation.

You could simulate this for yourself, however, at the cost of duplicating all of your data and restricting your application to 128 attributes per item, rather than 256. You would do it by creating an additional multi-valued attribute in every item to hold the values of every other attribute in that item. Then you construct your special queries against that one attribute (you would need to use the same name for that attribute in all items).

I don't recommend this approach.

There are not any official public SimpleDB databases available from AWS but there are a couple API compatible clones out there:M/DB is one.

Mocky
Thanks, I kinda figured that. I think that I will instead just search through about 4 - 6 attributes. Also I plan on keeping the number of attributes as low as possible.
Tom Andersen