dbTalk Databases Forums  

Introducing PlayDB (The Model, The Language, The DBMS)

comp.databases.object comp.databases.object


Discuss Introducing PlayDB (The Model, The Language, The DBMS) in the comp.databases.object forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Christopher Browne
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 10-11-2003 , 04:26 PM






In an attempt to throw the authorities off his trail, seunosewa (AT) inaira (DOT) com (Seun Osewa) transmitted:
Quote:
"Bob Badour" <bbadour (AT) golden (DOT) net> wrote:
SELF is a classless programming Language, claims to be object oriented
http://www.wikipedia.org/wiki/Self_computer_language
http://research.sun.com/self/language.html
http://research.sun.com/research/sel...ial/index.html

A lot of ideas about making a typeless Object-Oriented database system
workable would be learned. i am on it.
SELF isn't "typeless;" the only language I recall that _claimed_ to be
such was BCPL (predecessor to B and C), and even there, that wasn't
honestly typeless; it was instead pretty "loose" about them.

Perl and TCL both have a history of pretending "typelessness;" their
scalars can be coerced into pretending that they are strings or
numbers depending on what operation you use on them. Mind you, since
they have aggregate 'types' it's again not honest to call them
"typeless;" they are more 'schizophrenic about types.' (Which is
sometimes a big pain.)

What could be of _some_ merit would be to have a system that is 'type
agnostic;' that is, you have containers/slots in which you can put any
type. That's sort of what Self does; that's _certainly_
characteristic of the Lisp family. The latter is strongly typed, but
common data structures allow plunking in data of any type, in contrast
with (say) ML.

Whether or not this is any good for databases is another question. The
_problem_ with being open to a "loose" set of types is that there then
needs to be code to interpret the different types.
--
If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
http://cbbrowne.com/info/unix.html
Signs of a Klingon Programmer - 16. "Klingon programs don't do
accountancy. For that, you need a Ferengi."


Reply With Quote
  #12  
Old   
Seun Osewa
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 10-12-2003 , 07:45 PM






Hi,

I would like to know how you generate those introductory phrases
attached to your quotations of other people!

Christopher Browne <cbbrowne (AT) acm (DOT) org> wrote

Quote:
In an attempt to throw the authorities off his trail, seunosewa (AT) inaira (DOT) com (Seun Osewa) transmitted:
"Bob Badour" <bbadour (AT) golden (DOT) net> wrote:
I did not mean to imply that Bob Badour mentioned Self. It turns out
that Self is not what I thought it would be while leaving for the
night. Don't you see the potential calue of allowing objects to join
and leave classes as necessary over time? It is all about letting
data last long even if its accessed differently. "Large Shared Data
Banks" anyone?

Quote:
SELF is a classless programming Language, claims to be object oriented
[snip]
SELF isn't "typeless;" the only language I recall that _claimed_ to be
such was BCPL (predecessor to B and C), and even there, that wasn't
honestly typeless; it was instead pretty "loose" about them.

Perl and TCL both have a history of pretending "typelessness;" their
scalars can be coerced into pretending that they are strings or
numbers depending on what operation you use on them. Mind you, since
they have aggregate 'types' it's again not honest to call them
"typeless;" they are more 'schizophrenic about types.' (Which is
sometimes a big pain.)

What could be of _some_ merit would be to have a system that is 'type
agnostic;' that is, you have containers/slots in which you can put any
type. That's sort of what Self does; that's _certainly_
characteristic of the Lisp family. The latter is strongly typed, but
common data structures allow plunking in data of any type, in contrast
with (say) ML.
What I am really trying to say is, if a single object can present
itself as a member of any class to which it is supposed to belong, and
we use special constraints to model other concepts like type
inheritance, the system would be interesting and very flexible. If an
circle can wake up and say, "ok I am changing my dimensions I am no
longer a circle". if the DBA can say "all right employees no longer
have to be managers". Will get back to it. I have done little frther
development of the ideas.

Quote:
Whether or not this is any good for databases is another question. The
_problem_ with being open to a "loose" set of types is that there then
needs to be code to interpret the different types.
Interesting food for thought. In other words, implemention
difficulties. Its notable that a special index structure would have
to be created just to be able to tell what objects in a system belong
to a particular class. It'll no longer be as simple as a sequential
scan on a file. So its good to be able to rearrange the objects based
on read patterns and that's where log-structured data storage might be
useful.

But at the right stage I would investigate to see if by taking
advantage flexibility of the scheme we can in some cases buy back some
of the lost performance. And make programs simpler. But meanwhile
maybe I should work on the object model? I do not yet se how to link
this with the idea that the database is essentially a colection of
assertions unless I say a collection of assertions about the existence
of an object with certain properties. Seems like a restriction in the
general case which means the relational model may be even more of a
restriction.

Best Regards,

Seun Osewa.


Reply With Quote
  #13  
Old   
Christopher Browne
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 10-12-2003 , 08:13 PM



seunosewa (AT) inaira (DOT) com (Seun Osewa) wrote:
Quote:
I would like to know how you generate those introductory phrases
attached to your quotations of other people!
Gnus is really, really, really powerful.

(setq *random-headers*
'(("The world rejoiced as " " wrote")
("In an attempt to throw the authorities off his trail, "
" transmitted")
("Oops! " " was seen spray-painting on a wall")
("In the last exciting episode, " " wrote")
("Quoth " "")
("Martha Stewart called it a Good Thing when" "wrote")
("A long time ago, in a galaxy far, far away, " " wrote")
("After takin a swig o' Arrakan spice grog, " " belched out...")
("After a long battle with technology," ", an earthling, wrote")
("Centuries ago, Nostradamus foresaw when " " would write")
("" " wrote")))

(defun insert-random-header ()
(let* ((r (random (length *random-headers*)))
(headers (elt *random-headers* r))
(pre (car headers))
(post (cadr headers)))
(insert pre (mail-header-from message-reply-headers) post ":\n")))
--
output = reverse("gro.mca" "@" "enworbbc")
http://www.ntlug.org/~cbbrowne/unix.html
"Windows95, Word97, Office98: With all the criticisms of MICROS~1, at
least they include ``best-before'' dating on many of their
products..." -- cbbrowne (AT) hex (DOT) net


Reply With Quote
  #14  
Old   
Seun Osewa
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 10-15-2003 , 06:11 AM



Reference news:<ba87a3cf.0310091820.50180857 (AT) posting (DOT) google.com>...
Quote:
Based on my own observations, I would like to define a class as:

"A set of Objects/Entities percieved to have certain similar
properties."

What if an object could be a member of any arbitrary set of classes?
What if this mapping of object to class was totally dynamic?

Hi,

I have decided to post examples about the proposed data model and the
language, to show how everything may work together.

====================================
EXAMPLE 1: Circles and Ellipse
====================================
//Class Definitions are meant to last as long as the database
//They can change though each object may implement them differently
Define Class Circle {
in:
Radius (int)
out:
Radius (int)
Area (int)
)

Define Class Ellipse {
//Note that Inheritance is not "mentioned" above.
//Each class is allowed to be mutually exclusive of all others
in:
Radius01 (int);
Radius02 (int);
out:
Radius01 (int);
Radius02 (int);
Area (int);
}

//Object Templates are used to create new Objects
//Standard OO uses the class definition as object template.
Define Template RoundShape {
variables:
//variables represent the physical structure for all objects created
with
//this template.
radius01 (int) DEFAULT 0;
radius02 (int) DEFAULT 0;

construct:
RoundShape(int a, int b) {
radius01=a;
radius02=b;
object_set_classes(Circle if (a==b), Ellipse);
}

RoundShape(int radius) {
radius01=radius02=radius;
object_set_classes(Circle, Ellipse);
}

in:
Radius (int) {
radius01 = in;
radius02 = in;
}

Radius01 (int) {
radius01=in;
//dynamic join and leave class based on properties.
if (radius01==radius01) object_join_class (Circle);
else object_leave_class (Circle);
}

Radius02 (int) {
radius01=in;
//dynamic join and leave class based on properties.
if (radius01==radius01) object_join_class (Circle);
else object_leave_class (Circle);
}

out:
Radius (int) {
//should only happen if we are a circle
assert (radius01==radius02);
out = radius01;
}

Area (int) {
out = radius01 * radius02; //deliberately wrong formular
}
}

USER COMMANDS:
**************
Quote:
CREATE OBJECT USING SeunRoundShape (20, 20);
CREATE OBJECT USING SeunRoundShape (20, 40);
CREATE OBJECT USING SeunRoundShape (40, 20);
CREATE OBJECT USING SeunRoundShape (40, 40);
OK

Quote:
SELECT Radius, Area FROM EACH Circle;
Radius Area
20 400
40 1600

Quote:
SELECT Radius01, Radius02, Area FROM EACH Ellipse;
Radius01 Radius02 Area
20 20 400
20 40 800
40 20 800
40 40 1600

Quote:
SELECT Radius01, Radius02, Area FROM EACH Ellipse NOT Circle
Radius01 Radius02 Area
20 40 800
40 20 800

Quote:
SELECT Radius01, Radius02 FROM EACH Circle;
Error: Undefined Input Slot Radius01 for Class Circle;

Remarks:
Yes, its longer than SQL but arguable more flexible.


================================================== ===============
EXAMPLE 2: Involving Pointers
================================================== ===============
Define Class Employee {
in:
Name (string);
Dept (Department);
out:
Name (string);
Dept (Department);
}

Define Class Department {
in:
Name (string)
Head (Employee)
out:
Name (string)
Head (Employee)
}

///
[exclude Object Template definitions]
///
SAMPLE USER-LEVEL QUERIES:
**************************
//select each department's name and name of head
Quote:
SELECT Name, Head->Name FROM EACH DEPARTMENT
//select each employee's departmet name and Head of Department
Quote:
SELECT Name, Dept->Name, Dept->Name->Head FROM EACH EMPLOYEE
===============================
EXAMPLE 3:Equivalent query for challenge thrown by Lauri:
===============================
SELECT FOR GROUPING //group by following 'fields'
customer->name,
details->product->name
AND ALSO //aggregate functions
SUM(Details->quantity * Details->product->price)
FROM EACH
Order //always choose a base class for query
==
Important aspects of Class Definition:
Define Class Customer {
in: name(int);
}
Define Class Details {
in: product(Product); quantity (int);
}
Define Class Order {
in: customer(Customer); details(Details);
}
Define Class Product {
in: name(String); price(Decimal);
}
============

I hope I have been able to illustrate some of my concepts. Please ask
questions to clarify the fuzzy aspects and give your insights.

Best Regards,
Seun Osewa


Reply With Quote
  #15  
Old   
Seun Osewa
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 10-15-2003 , 07:41 AM



The Proposed Query Language: Some Observations
**********************************************
- Always assumes the presence of a "home class" from which joins are
"radiated", and therefore every line in the returned set is associated
with one object belonging to the "home class"
- An object does not statically belong to a class, but it may be
_views as a member of one or more classes_. For example, in the
circles/ellipse example each of the created objects could be viewed as
a circle (in which case it had radius and area) or viewed as an
ellipse (two radii, area).
- The storage format of each object is independent of the visible
format of each of the classes it belongs to at a particular point in
time.
- Reference fields are used to link one Object to another. Each
reference has a particular Class where the object it points to is
supposed to belong.
- The clause analogous to the SQL GROUP BY clause separates fields
used for grouping the return values of the query from fields
containing aggregate functions applied to each group. Seems much
neater that way.

Regards,
Seun

Reply With Quote
  #16  
Old   
Bernard Peek
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 10-15-2003 , 02:59 PM



In message <ba87a3cf.0310091820.50180857 (AT) posting (DOT) google.com>, Seun Osewa
<seunosewa (AT) inaira (DOT) com> writes

Quote:
What if an object could be a member of any arbitrary set of classes?
What if this mapping of object to class was totally dynamic?
I asked about such a system a while ago, the concepts you are looking
for are multiple-inheritance and dynamic reclassification. I was pointed
in the direction of Mumps.



--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.



Reply With Quote
  #17  
Old   
Seun Osewa
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 10-16-2003 , 03:15 AM



Thanks. Mumps might has features I would like to integrate but I did
not
find any information about multiple inheritance and dynamic
reclassification. I also could not find your previous post in the
google archives; can you give me a link? Please look at my two
previous posts under this same topic.

Regards,
Seun Osewa

Bernard Peek <bap (AT) shrdlu (DOT) com> wrote

Quote:
In message <ba87a3cf.0310091820.50180857 (AT) posting (DOT) google.com>, Seun Osewa
seunosewa (AT) inaira (DOT) com> writes

What if an object could be a member of any arbitrary set of classes?
What if this mapping of object to class was totally dynamic?

I asked about such a system a while ago, the concepts you are looking
for are multiple-inheritance and dynamic reclassification. I was pointed
in the direction of Mumps.

Reply With Quote
  #18  
Old   
Juergen Kindler
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 11-02-2003 , 12:49 PM





Bernard Peek wrote:

Quote:
In message <ba87a3cf.0310091820.50180857 (AT) posting (DOT) google.com>, Seun Osewa
seunosewa (AT) inaira (DOT) com> writes

What if an object could be a member of any arbitrary set of classes?
What if this mapping of object to class was totally dynamic?


I asked about such a system a while ago, the concepts you are looking
for are multiple-inheritance and dynamic reclassification. I was pointed
in the direction of Mumps.



Sadly enough, Mumps does not support inheritance and also nothing you
call dynamic reclassification. Mumps is a strictly PROCEDURAL language.
I've used it for some years (> 5 to be specific).

There are no classes in Mumps. There is even no schema. All there is
(OK - most notable) is a persistent B* tree that allows for index
entries that are strings, a strong support of string function and
some ways to dynamically interpret strings/variables as code.


Objects and Mumps are two different worlds ...

Just my 2 cents
Jürgen



Reply With Quote
  #19  
Old   
Jeffrey Williams
 
Posts: n/a

Default Re: Introducing PlayDB (The Model, The Language, The DBMS) - 11-02-2003 , 01:06 PM



Juergen,

Since I have been working with Mumps now for quite a while (> 10 years) I
can agree with you. Standard implementations of Mumps (e.g. DSM, MSM, DTM,
GT.M, etc...) are as you describe.

But, I have to say that although Mumps itself does not have objects - this
does not prevent you from using either Intersystems Cache or ESI Objects as
the DBMS layered on top of Mumps. Cache and ESI Objects both provide Object
access to a Mumps global.

In fact - if you have not looked at Cache, you might be surprised at the
capabilities of this system. Using this system, you can now provide both
Object and SQL access to your database quite easily. It is - IMHO, worth
looking at...

"Juergen Kindler" <jkindler (AT) freenet (DOT) de> wrote

Quote:

Bernard Peek wrote:

In message <ba87a3cf.0310091820.50180857 (AT) posting (DOT) google.com>, Seun Osewa
seunosewa (AT) inaira (DOT) com> writes

What if an object could be a member of any arbitrary set of classes?
What if this mapping of object to class was totally dynamic?


I asked about such a system a while ago, the concepts you are looking
for are multiple-inheritance and dynamic reclassification. I was pointed
in the direction of Mumps.




Sadly enough, Mumps does not support inheritance and also nothing you
call dynamic reclassification. Mumps is a strictly PROCEDURAL language.
I've used it for some years (> 5 to be specific).

There are no classes in Mumps. There is even no schema. All there is
(OK - most notable) is a persistent B* tree that allows for index
entries that are strings, a strong support of string function and
some ways to dynamically interpret strings/variables as code.


Objects and Mumps are two different worlds ...

Just my 2 cents
Jürgen




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.