Re: How to represent a total-and-exclusive relation into a relational database
Date: 18 Jan 2005 15:05:26 -0800
Message-ID: <1106089526.271517.267860_at_c13g2000cwb.googlegroups.com>
// Create items in directory to classify things.
(CREATE *employe.item ~in = dir)
(CREATE *intern.item ~in = dir)
(CREATE *freelancer.item ~in = dir)
(CREATE *gender.item ~in = dir)
(CREATE *college.item ~in = dir)
(CREATE *expertise.item ~in = dir)
// Create employe John, an intern from MSU.
(CREATE *john.cls = employe)
(CREATE john.cls = intern)
(CREATE john.gender = +male)
(CREATE john.college = +MSU)
// Create employe Mary, a freelancer
// who is an expert in C++, RMDBs and SQL
(CREATE *mary.cls = employe)
(CREATE mary.cls = freelancer)
(CREATE mary.gender = +female)
(CREATE mary.expertise = +"C++")
(CREATE mary.expertise = +RMDBs)
(CREATE mary.expertise = +SQL)
// Find employes that know SQL.
// Finds Mary.
(SELECT %.cls=employe & %.expertise=SQL)
Received on Wed Jan 19 2005 - 00:05:26 CET