Sfoglia il codice sorgente

Added common attributes

Samuel W. Flint 8 anni fa
parent
commit
a3aaa9b41f
1 ha cambiato i file con 21 aggiunte e 2 eliminazioni
  1. 21 2
      cl-genealogy.org

+ 21 - 2
cl-genealogy.org

@@ -26,7 +26,7 @@
 #+TOC: headlines 3
 #+TOC: listings
 
-* WORKING Data Storage [7/8]
+* DONE Data Storage [8/8]
 :PROPERTIES:
 :CREATED:  <2016-01-06 Wed 13:14>
 :END:
@@ -229,11 +229,30 @@ Keeping notes within the database is a good idea, it allows the notes to be link
     :/media-link #'stringp)
 #+END_SRC
 
-** TODO Common Attributes
+** DONE Common Attributes
 :PROPERTIES:
 :CREATED:  <2016-01-06 Wed 13:18>
 :END:
 
+As LambdaLite is schemaless, the following attributes can be mixed in to other tables, and can be used to help link records quickly and easily.
+
+ - Person :: The ID of a relevant Person.
+ - Birth :: The ID of a relevant Birth.
+ - Death :: The ID of a relevant Death.
+ - Marriage :: The ID of a relevant Marriage.
+ - Divorce :: The ID of a relevant Divorce.
+
+#+Caption: Common Table Attributes
+#+Name: common-table-attributes
+#+BEGIN_SRC lisp
+  (defattributes
+      :/person (in-table-column :people :/person-id)
+    :/birth (in-table-column :births :/birth-id)
+    :/death (in-table-column :deaths :/death-id)
+    :/marriage (in-table-column :marriages :/marriage-id)
+    :/divorce (in-table-column :divorces :/divorce-id))
+#+END_SRC
+
 * WORKING Data Interface [0/10]
 :PROPERTIES:
 :CREATED:  <2016-01-06 Wed 13:15>