Data Hub Framework Flows

Author: Dave Cassel  |  Category: Software Development

The Data Hub Framework is a feature recently added to MarkLogic that makes it easier to gather data from a variety of sources and build a common representation across the original formats. I learned some useful things about working with the framework that I thought were worth writing down (partly so that I’ll remember them). […]

Evolution of modeling relationships in MarkLogic

Author: Dave Cassel  |  Category: Software Development

MarkLogic, as a multi-model database, can store data both as documents and as triples. We model entities as documents. Over time, the way we’ve modeled relationships has changed. In the Beginning Prior to MarkLogic 7, relationships were modeled by including either a URI or some other identifier as an element or attribute. In most cases, […]

Building a MarkLogic Data Model

Author: Dave Cassel  |  Category: Software Development

This post is an excerpt from a book I’m working on: MarkLogic for Node.js Developers. This section is part of a chapter on Data Modeling, falling after a comparison to relational database modeling and a discussion of denormalization. The goal is to address the question of what should be a document in MarkLogic. The next […]

Memoization in XQuery

Author: Dave Cassel  |  Category: Software Development

Memoization is tracking partial solutions so that they don’t have to be recalculated. A good example of where this is handy is the Fibonacci sequence. You may remember that the definition of this is: F(n) = F(n -1) + F(n – 2) F(1) = 1 F(2) = 1 Clearly, this is a recursive function. Let’s take a […]

Loading JSON into MarkLogic 7

Author: Dave Cassel  |  Category: Software Development

This post shows how to ingest JSON into MarkLogic 7 using mlcp. Unlike many, this one is very specific to MarkLogic 7. Since the release of MarkLogic 6, MarkLogic Content Pump (mlcp) has been the supported tool for importing, exporting, and copying content. One feature that’s missing from it is the ability to load JSON files […]

MarkLogic, Angular, and node: Authentication

Author: Dave Cassel  |  Category: Software Development

My first effort with the DemoCat application had a pretty simple architecture: node hosted static resources and passed REST requests straight through to MarkLogic. This approach is more in keeping with the three-tier architecture that MarkLogic’s customers typically use, but my middle tier was doing almost nothing. I’ve made some improvements, especially related to user management. […]

mlFacets directive

Author: Dave Cassel  |  Category: Software Development

My group within MarkLogic is moving to using AngularJS for the front-end code of our MarkLogic applications. One of the things I like about AngularJS is how many directives are already out there, and thus available for us to use in MarkLogic-driven web applications. Of course, not everything is already out there, and I want […]

Fixing a slow XQuery function

Author: Dave Cassel  |  Category: Software Development

Sometimes an application is slower to respond than we like. There are a variety of reasons this can happen — hardware, indexes, algorithms. MarkLogic offers some tools to investigate the software aspects of code running too slow. The rest of this post is a case study investigating slow responses on a project I worked on […]

Demo Catalog

Author: Dave Cassel  |  Category: Software Development

I’ve begun working on a Demo Catalog application recently that has a few purposes. My immediate purpose is to make our demos easier for our sales engineers to describe, find, comment on, and file bugs and RFEs against. If others find the app helpful as it develops, that’s great. But this project is also going […]

XQuery: finding values in one sequence that aren’t in another

Author: Dave Cassel  |  Category: Software Development

During a recent working session, a question came up about how to quickly find all the values in one sequence that aren’t in another. A little poking around the web turns up what seems to be the standard approach: I found that approach in a couple places, including functx’s implementation. If I’m thinking about it right, […]