| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: How to represent a total-and-exclusive relation into a relational database
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
![]() |
![]() |