Marklogic学习 —— 灵活的数据模型
数据模型
文档模型
多模型语义学
强大并且可以组合
\ | JSON | XML | RDF | JSON/XML + RDF |
---|---|---|---|---|
Usage | ideal for structured data that is stored as objects | ideal for structured and unstructured data or text | ideal for facts and relationships | ideal for systems of data, text, and relationships |
Description | • schema-agnostic • Query with Javascript• compact and fast to parse• six kinds of values: objects, arrays, floats, strings, booleans, nulls• avoids namespaces, comments and attributes• common data format for the web | • schema-agnostic• Query with xQuery• can store objects, sets, and many data * such as dates, durations, integers, and more• Uses namespaces (for embedding object *), comments, and attributes (for adding metadata)• More maturity than JsoNas a data model | • Define entities and relationships• atomic structure (cannot be broken down further)• Uses universal standards for data and querying (rDF and sParQl)• Used for reference data, metadata, provenance | • Documents can contain triples• triples can annotate documents• graphs of triples can contain documents• enhanced querying:- expand a document search using graphs- enhance graph search by linking to documents- restrict document search using triples |
相关文章