A couple of simple questions
I've been using Couchbase 1.8 for a while for session management and data caching and it works very well. I am now trying to see if I can do more with it, especially since 2.0 has been released and we got views. I watched some of the videos online and read a lot of the documentation, but somehow I cannot find the answers to my questions. Any help would be much appreciated.
My system has a bunch of objects defined in a model. Think of Persons, Vehicles, PersonAndVehicleAssociation and so on. There's many of these, but let's just use those 3.
Each of those objects (documents) have a bunch of properties (some of which are other types).
Think of a them like this:
Id = "2187328-3221-122222"
First = "Jack"
Last = "Smith"
Age = 35
City = "New York"
ZipCode = "12345"
Id = "324333-2132-145666"
State = "NJ"
Tag = "ABC-123"
Make = "Chevrolet"
Model = "Corvette"
PersonId = "2187328-3221-122222"
VehicleId = "324333-2132-145666"
AssociationType = "Owner"
Pretty common stuff.
Now, I need to run queries such as the following:
"20 Persons SKIPPING 234400 WHERE Address.City = 'New York' AND Name.Last LIKE '%mit%'"
"FIRST 10 Vehicles WHERE (Plate.State in ['NJ', 'IL', 'CA'] OR Make LIKE 'Chev%') AND (...something else...)"
These queries are pretty much **always dynamic and customer-driven**. The UI allows our customers to search data any way they need. This is a pretty common need for any data-oriented system, so there has to be an answer somewhere... I just cannot seem to find it :(
My first problem is the use of SQL LIKE functionality and the ability to mix a number of conditions.
Is there any "SQL to Couchbase" set of articles or documents that cover these sort of scenarios? I assume the majority of developers looking at Couchbase for more than just a cache mechanism, would come from a SQL background. Are questions like these answered anywhere?
Thanks a lot!