Database Reference
Validate against: http://json-schema.org/draft-07/schema#
Schema ID: http://schemas.digitallinguistics.io/DatabaseReference-4.3.0.json
Type: object
Description
A reference to an item in a database, used when you wish to store an item separately in the database (following a relational database model), rather than inline. A disadvantage of this approach is that it often requires making multiple database calls. To avoid this, in most cases the actual object can be used instead of a database reference. For example, instead of making a reference to a separate Person file, you can simply include the Person object directly in place of the database reference. This is useful when you don’t want to deal with cross references and multiple database calls. In this case, it is often a good idea to include just a minimal set of data. For a person, for example, you might include just the ID, abbreviation, family name, and given name. This prevents you from having to replicate all of the data about that Person each time it is used.
Properties
The following properties are defined for this object:
Type:
type
Type:
string
Read-only:
true
Description
The type of object. Must be set to
DatabaseReference
.This item must have the following value:
"DatabaseReference"
Referenced Abbreviation:
abbreviation
Type:
string
Description
The abbreviation of the referenced database item.
Referenced Schema
This item must validate against the following schema:
Referenced ID:
id
Description
The ID of the referenced database item
Filename:
filename
Type:
string
Description
If the reference database item is a media item, use this field for the name of the referenced file.
Referenced Index:
index
Type:
integer
Description
The index of the referenced database item. Indexes should start at 1 rather than 0 to increase human readability.
Minimum:
1
Referenced Key:
key
Type:
string
Description
The key of the referenced database item
Regular expression to match:
^[^\s]+$
Name:
name
Description
The name of the referenced database item, optionally in multiple languages.
Referenced Schema
This item must validate against the following schema:
Referenced Item Type:
referenceType
Type:
string
Description
The type of database item being referenced
Allowed Values
"BibliographicReference"
"Bundle"
"Language"
"Lexeme"
"Location"
"Media"
"Morpheme"
"Orthography"
"Person"
"Sense"
"Text"
"Utterance"
"Word"
Referenced URL:
url
Type:
string
Description
The URL of the referenced database item
Format:
uri
Additional Properties
Any additional properties must adhere to the following schema:
This schema imposes no restrictions. All values are valid.
Examples
The following are example values for this schema:
-
{ "id": "73384c91-6c15-42a4-81e3-9c7d03343bad", "index": 2, "referenceType": "Utterance", "type": "DatabaseReference", "url": "https://api.digitallinguistics.io/languages/Chitimacha/texts/A1/utterances/2" }
-
{ "id": "6c4268c0-5249-408d-92ba-9daff1cab616", "key": "Omoiseke", "name": "Ómoíséké ósokérété chíséese", "referenceType": "Text", "type": "DatabaseReference", "url": "https://api.digitallinguistics.io/languages/Gusii/texts/Omoiseke" }