-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Data Structure
Based on the content of the definitions in the 11ty version of the site the data structure for the words are as follows in a SQL data structure.
Categories vs Entries
Categories will typically only have a title and the common attributes. They are used to categorize and related various entries with each other.
Entries are typically items with multiple attributes associated with them. They may be related to another entry but are typically done so to provide additional data about that entry and not to group and categorize them.
Translation Data Structure Rational
To handle the ability for any item to be translated into a given language each item will have multiple entries associated with it. These entries will also be associated to the localization (i.e. language) to which they are translated.
Common Entry Attributes
Entries will have a set of attributes that are common across them. At minimum I would recommend the following.
- id
- createdAt (date)
- updatedAt (date)
I would also recommend that any entry that will be directly accessed via a have the following.
- slug
In the case of Craft CMS these items are standard for all entries.
First Level Entry
The only first level entries are words. These word entries should have the following attributes associated with them. Words can be categorized by Flags and Statuses.
- title (text)
- defined (boolean)
- body (text)
- excerpt (text)
- showInTableOfContents (boolean)
Second Level Entries
There are several second level entries. These are all groupings of items that are associated to one or more word entries to add aditional context to them but can be shared across multiple words. They are all managed in their own group and associated to the specific word entry as needed.
- Alt Words
- Readings
- Speech Parts
- SubTerms
Alt Words
Alt Words can also be associated to the category group Alt Word Groups. Alt Words have the following attributes.
- title (text)
- link (text)
Readings
Readings have the following attributes.
- title (text)
- href (url)
Speech Parts
Speech Parts have the following attributes.
- title (text)
- abbreviation (text)
Sub Terms
Sub Terms have the following attributes.
- title (text)
- affix (text)
Categories
There are several groupings of categories.
- Alt Word Groups
- Flags
- Flag Levels
- Flag Types
- Statuses
Alt Word Groups
Alt Word Groups are used to categorize Alt Words. They have the following attributes.
- title (text)
Flags
Flags can also be associated to the category groups Flag Levels and Flag Types. Flags have the following attributes.
- title (text)
Flag Levels
Flag Levels are used to categorize Flags. They have the following attributes.
- title (text)
Flag Types
Flag Types are used to categorize Flags. They have the following attributes.
- title (text)
Statuses
These have the following attributes.
- title (text)-
Accessing Words
The data structure above allows words to be accessed/filtered in multiple ways. They can be accessed/filtered by the any of the categories. A word can be found through it's second level entry association as well.
Harnessing something like Elastic Search will allow for further access and flexibility when searching for an item. But this will be done through a search methodology and not through a filtering methodology.