Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Structure #7

Open
mjoynes-wombat-web opened this issue Oct 30, 2020 · 1 comment
Open

Data Structure #7

mjoynes-wombat-web opened this issue Oct 30, 2020 · 1 comment

Comments

@mjoynes-wombat-web
Copy link

mjoynes-wombat-web commented Oct 30, 2020

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.

New Err Diagram v2 (1)

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.

@mjoynes-wombat-web
Copy link
Author

mjoynes-wombat-web commented Oct 30, 2020

Questions to discuss. @tatianamac

Are there any additional pieces of data?
Are there any ways in which words will need to be categorized?
Are there any ways in which the words will need to be accessed?
Regarding language code for languages, are we using a particular standard? Based on the folder it looks like we're using a combination of the ISO 639-1 language code and the ISO 3166-1 Alpha-2 code. It looks like the common combination of these is with a dash but we're currently using an underscore. How should this look going forward and should we be supporting translated country names and language names?
Are there any additional requirements from the front end or api users would need to change the data structure?

This was referenced Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant