You have a problem with that requirement "not to use XQuery". That's sort of 
like saying "don't use SQL" with an RDBMS. Sure, you can encapsulate it so that 
you cannot see it from your Java code - but it's still there. The XCC connector 
doesn't write XQuery for you.

Thinking in terms of low-level RDBMS tools like foreign keys and tables won't 
get you very far. Back up. Start from the use cases instead, and do some 
top-down work. Think about per-user documents and directories. For example, you 
might model each user as a URI prefix ('/user/' + USERID + '/') and store each 
user's XML in a well-known URI with that prefix. Multiple XML or BLOB documents 
might also share that prefix. You could then use xdmp:directory() to query all 
of a user's documents, or doc() to retrieve a specific document. I don't know 
if that really suits your use-cases, but it might.

Keep in mind that the XML data model does not provide for binary nodes: those 
are a MarkLogic extension, and they are allowed only as root nodes. You can 
store and retrieve both types of nodes in one update or query, though, so you 
should be able to implement your use cases. You can probably implement inserts 
without using XQuery, but you will have to write some XQuery to query the 
database. That's what it's for.

-- Mike

On 24 Oct 2011, at 08:05 , Babu Moshay wrote:

> Dear all,
> I am new to Marklogic setup as well as NoSQL way of doing things..I have a 
> use-case which would have been very straightforward to implement in J2EE 
> patterns using RDBMS but now that I am expected to evaluate MarkLogic I 
> wonder if this mailing list can help me out with it....
> 
> I have looked through the documentation PDFs but haven't been able to figure 
> out what exactly needs to be done to get going...
> 
> I have 2 tables...1 user details e.g. name of the user, contact etc etc..plus 
> it has a BLOB which stores his picture...then there is another table which 
> stores user's published articles(all BLOBs) which has userId as foreign key 
> referencing user table's primary key..
> 
> I take input from frontend which accepts all these inputs from HTML form and 
> create necessary entries in database..
> 
> I am told not to use XQuery ..Just use XCC/Java connector and see if that 
> works...
> I am looking for a tutorial or precise peace of document which discusses 
> these activities...
> 
> I can store XML content....agreed..
> I can store Binary content....agreed.
> 
> Can I write something which joins XML and Binary together and forms a single 
> unit while reading/writing from Marklogic?
> 
> 
> 
> Thanks and regards,
> BM
>  
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to