[MarkLogic Dev General] Type safe data and referencing questions
Mark Waschkowski
mwaschkowski at gmail.com
Mon Jan 14 13:25:21 PST 2008
Hi,
Have been using Marklogic for a while now and haven't seen answers to
the below questions yet, anyone know of an answer or two?
1) Type safe data - I'm concerned with retrieval of typed data,
especially for date information. The only way to store typed data is
through the use of a schema right? I can't specify the type of data on
a per element basis, correct? ie. <person> <birthday
xs:date>01-01-1970</birthday></person>
As well, I noticed the below query in the use case examples:
let $item := doc("items.xml")//item_tuple
[end_date >= xs:date("1999-03-01")
and
end_date <= xs:date("1999-03-31")]
return
<item_count>
{
count($item)
}
</item_count>
Is there a schema behind the loaded data or are the examples un-type
safe? Should I just not worry about type safety and convert the data
values to the type I need when querying? If so, won't that be a
performance issue?
2) Referencing - what is the (if there is one) best practice approach
to reference documents together?
ie. Document A and Document B should both refer to Document C
3) Foreign key constraints - is this supported at all in some fashion?
If not, any approaches to suggest?
Thanks in advance for any and all suggestions!
Mark
More information about the General
mailing list