Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: How to represent a total-and-exclusive relation into a relational database

Re: How to represent a total-and-exclusive relation into a relational database

From: Neo <neo55592_at_hotmail.com>
Date: 18 Jan 2005 18:28:47 -0800
Message-ID: <1106101727.745760.269910@z14g2000cwz.googlegroups.com>


The script below models employes 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 *gender.item ~in = dir)
(CREATE *college.item ~in = dir)
(CREATE *expertise.item ~in = dir)

// Create a male employe named Hugo
(CREATE *hugo.cls = employe)
(CREATE it.gender = +male)

// Create a female employe named Hugo, an intern from MSU.
(CREATE *hugo.cls = employe)
(CREATE it.cls = intern)
(CREATE it.gender = +female)
(CREATE it.college = +MSU)

// Create a male employe named Hugo, a freelancer // who is an expert in C++, RMDBs and SQL
(CREATE *hugo.cls = employe)
(CREATE it.cls = freelancer)
(CREATE it.gender = +male)
(CREATE it.expertise = +"C++")
(CREATE it.expertise = +RMDBs)
(CREATE it.expertise = +SQL)

// Find employes that know RMDBs.
// Finds 3rd Hugo.
(SELECT %.cls=employe & %.expertise=RMDBs)
Received on Tue Jan 18 2005 - 20:28:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US