emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: triples


From: Jean Louis
Subject: Re: [ELPA] New package: triples
Date: Thu, 27 Oct 2022 22:15:38 +0300
User-agent: Mutt/2.2.7+37 (a90f69b) (2022-09-02)

* Andrew Hyatt <ahyatt@gmail.com> [2022-10-27 08:20]:
> > In this case any table, column, with its primary key may be related to
> > any other table, column with its primary key. That way objects and
> > subjects are constrained and rigid, it is not universal triplets, but
> > database tables dependent one. It relates only what exists in the
> > database. If there is `people' database then such may be related to
> > arbitrary other tables like `statistics'.
> 
> Thanks for mentioning this, it's an interesting design I'll read up
> on!

Recently I am thinking of using UUID. Any table, column, by primary
key (by it UUID or just INTEGER or else), may still have UUID. Let us
say transaction entry:

                             ID   3
                   Date created   "2022-02-27 18:57:23.52117"
                  Date modified   nil
                   User created   "maddox"
                  User modified   "maddox"
                      Date/Time   "2022-02-27 00:00:00"
                           Name   "Mobile money fee"
                    Description   "nil"
                         Amount   2310.0
                       Currency   "UGX - Ugandan shilling"
                   From account   "Jean Louis"
                     To account   "Mobile money expenses"
                           UUID   "3c171d3d-b2c8-4527-8984-34bbacc82ff2"
                  Hyperdocument   nil

Then by using UUID as subject, predicate, and UUID as object, it
becomes clear what is what. A function must search UUID among those
tables who have it. It is really fast, not noticable. But I can't know
how well it could scale with millions or billions of records. For
presentation purposes it would be fine, but for direct access, I
can't be sure of speed.

> > select * from predicates;  predicates_id | predicates_name |
> > predicates_description
> > ---------------+-----------------+-----------------------------------
> > 1 | is              | When subject is object.  2 |              knows
> > | When subject knows object.  3 |              registered      | When
> > subject registered an object
> > 
> > by adding "has" predicate, one can tell:
> > 
> > person has age person has name employee has id id is integer employeee
> > has manager employee is person manager is person
> 
> We have "has" but not "is". The schema has types, those types have
> properties.  So we can have a subject, "Joe Employee", who has a type
> person, and a type employee, and a type manager, the properties of those
> respective types.  But we don't know or enforce that
> every employee is also a person.  It's perhaps a feature that can be
> added later if needed; it seems possible in the current
> implementation.

Principle of semantic triplets is just subject, predicate and
object. I guess you allow users to add any kind of predicates, right?

Types are automatically formed by using subject, predicate, object
principle.

Reference: https://en.wikipedia.org/wiki/Semantic_triple

This should be enough by using that principle:

- job is activity
- job has status
- employee is status
- Joe is name
- person has name
- Joe has employee (meaning status)

Also see this:

OneModel — an Alternative to emacs org-mode:
https://soylentnews.org/article.pl?sid=16/04/23/0149257

OneModel - Record, manage and share any knowledge:
http://onemodel.org/1/e-9223372036854618119.html

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]