Skip to content
Snippets Groups Projects
documentation.adoc 3.29 KiB

Keyword

Simply said: A keyword is a list of key-value pairs.

These values for example can be used as content to choose from (e.g. a combobox-list).

Glossary

Keyword Container

A keyword container is the element that keeps several entries of Keywords together. That could be for example something like "Contact-Status". Keep in mind that this done virtually and not in the actual way of storage.

Keyword Entry

A keyword entry is a specific child-element of a keyword container. For the upper example "Contact-Status" this could be "Active", "Inactive", etc.

Keyword

Keyword describes the whole set of elements like keyword container and keyword entry. It’s more like a virtual bracket for the whole construct.

Types of Keywords

Simple Key-Value lists

The Structure

abstract structure of keywords
digraph g {
  rankdir="BT"
  bgcolor="#222222"

  graph [ dpi = 100 ]
  node [ shape = box color="#dddddd" fontcolor="#dddddd" fontname = "Consolas"];
  edge [ color="#dddddd" ]
  { rank=max;  kwdContainer [label="Keyword Container"] }
  { rank=same; kwdEntry [label="Keyword Entry"] }
  { rank=next; entry1 [label="Entry 1" shape=ellipse] }
  { rank=same entry1; entryN [label="Entry N" shape=ellipse] }

  kwdEntry -> kwdContainer;
  kwdEntry -> kwdContainer;
  entry1 -> kwdEntry
  entryN -> kwdEntry
}

Take a look at the following table. Beware that these are not the actual db-column-names but the information what’s represented.

Table 1. simplified, abstract representation how keywords are actually stored
UID key-ID tile container

unique key 1

1-key-value A

one

container 1

unique key 2

2-key-value A

two

container 1

unique key 3

3-key-value A

three

container 1

unique key 4

1-key-value B

I

container 2

unique key 5

2-key-value B

II

container 2

And, to clarify an example:

Table 2. simplified, example representation how keywords are acutllay stored
UID key-ID tile container

db1792cd

de-DE

German (Germany)

Language

62df7f0ba

en-GB

English (United Kingdom)

Language

126229d9

fr-FR

French (France)

Language

3508929f

ab7b1885

active

ContactStatus

52ce5785

2b2091eb

inactive

ContactStatus

Extended Key-Value lists with special Attributes

Basically this is a extension of the [Simple Key-Value lists]. Sometimes it’s necessary to have some more properties within a keyword-entry. Example:

You’ve got a Keyword-container for Types of Communication with basically the following values:

  • mobile phone

  • landline phone

  • email-address

  • web-address

If you want to add a general type of information like "PHONE", "MAIL", "WEB" you’ve to add a keyword-attribute to the keyword-entry where you can store that information.

Complex Keyword as own entity

Sometimes you’ve a special case where the keyword entity cannot provide all the functionality.

In that case you can always define you own entity and create your own database structure to represent all the information and provide all the functions you need.

As an example, this could be the Country_Entity