MarkLogic 10 and Data Hub 5.0

Latest MarkLogic releases provide a smarter, simpler, and more secure way to integrate data.

Read Blog →


Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up →

Optic, Search, SQL, or SPARQL - when should I use which interface?
04 June 2020 01:21 AM


MarkLogic offers many different ways to access your data. The best interface to use is ultimately determined by your use case. The table below is taken from MarkLogic University's on demand training course "Using the Optic API." That course runs only 12 minutes, and the table below appears at the 9:50 mark.

When to use which API

Data Shape Multi-model Documents Relational lens Semantic data
Output Rows, Documents, Any structure Documents, parts of documents (snippet, highlight) Rows, values Solutions
Strengths Combines aspects of each query mechanism Discovery, relevance, fuzzy text, matching/stemming Joins, aggregates, summarizing large data sets, exact matches Relating entities, linking facts, inferring relationships
Sample queries Review liability terms for every Race with >1000 Runners that offered a "cash prize" What is the best holiday race for me to enter (nearest, highest rated, most relevant)? Which Races had the most evenly balanced Runners based on gender? Find Runners who ran Races in Europe

(4 vote(s))
Not helpful

Comments (0)