Data model: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
''Note: This documentation reflects the process adopted for the Miranda prototype (c. November 2017), and has not yet been updated for the alpha release in May 2018.''
=== Beta Data Schema ===


=== Prototype Data Model ===
The Miranda Digital Asset Platform is designed to support an arbitrary number of different content types, each defined via a JSON schema.  Each of these content type objects is stored within a NoSQL field within a postgresql table that contains a variety of other fields that help manage the data access rules around that content and provide metadata about when that content was last imported into the system from an external source or edited within the DAP.
The Miranda Digital Asset Platform is designed to support an arbitrary number of different content types, each defined via a JSON schema.  Each of these content type objects is stored within a NoSQL field within a postgresql table that contains a variety of other fields that help manage the data access rules around that content and provide metadata about when that content was last imported into the system from an external source or edited within the DAP.



Revision as of 16:23, 9 January 2019

Beta Data Schema

Prototype Data Model

The Miranda Digital Asset Platform is designed to support an arbitrary number of different content types, each defined via a JSON schema. Each of these content type objects is stored within a NoSQL field within a postgresql table that contains a variety of other fields that help manage the data access rules around that content and provide metadata about when that content was last imported into the system from an external source or edited within the DAP.

So each record consists of:

  • A row within the postgresql content table
  • Within that row, a field that contains the JSON for the content type
  • Within that JSON,
    • a set of core metadata fields specific to that content type
    • a set of fields identifying connections between this record and other records
    • a set of fields identifying connections between this record and any binary files managed by the system

Database Schema

Name Type Description
id integer Serial identifier in the database for relational indexes. Not for use in API.
id_dap uuid <guid> Universal identifier for the DAP record across services. Used to request records by ID in API.
date_created datetime On first insertion. Do not change this on updates.
date_updated datetime On first insertion set to the same exact value as date_created.
type string The record type allows well-indexed querying to differentiate by some top-level categorization of records. It is also a lookup identifier for record-specific configuration or logic.

Types include: content (a content item), collection (a set of content items, grouped together to demonstrate a related collection for users), container (a means of organizing a sub-set of related items as part of a larger content record.

metadata jsonb The full schema-compliant metadata record. It should include everything needed for surfacing this discrete item in the API or pushing to the search index. (Excluding questions of related records.)