Re: How to represent a total-and-exclusive relation into a relational database
Date: 18 Jan 2005 13:49:19 -0800
Message-ID: <1106084959.676129.260730_at_c13g2000cwb.googlegroups.com>
> ... employe can be an InternEmploye or a Freelancer ...
The script below models the above with an experimental db.
// Create items in directory to classify things.
(CREATE *employe.item ~in = dir)
(CREATE *intern.item ~in = dir)
(CREATE *freelancer.item ~in = dir)
(CREATE *SS#.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.SS# = +111-11-1111)
(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.SS# = +222-22-2222)
(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 Tue Jan 18 2005 - 22:49:19 CET