Re: Question about "linking tables"

From: Neo <neo55592_at_hotmail.com>
Date: 25 May 2007 07:35:18 -0700
Message-ID: <1180103718.478157.258960_at_q75g2000hsh.googlegroups.com>


> I have a theory question regarding relational databases and linking tables:

Alternatively, the above data can be modelled using a db that does not require one think in terms of tables, ids and keys.

(new 'john 'person)
(new 'mary 'person)

(new 'book1 'book)
(new 'book2 'book)

(new 'math 'category)
(new 'science 'category)

(new 'author 'role)

(set book1 author john)
(set book1 category math)

(set book2 author john)
(set book2 author mary)
(set book2 category math)
(set book2 category science)

(; Get a science book authored by john)
(; Gets book2)
(& (get book instance *)

    (get * author john)
    (get * category science)) Received on Fri May 25 2007 - 16:35:18 CEST

Original text of this message