1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Databases: was Re: skill system -->
<!--X-From-R13: "Xba O. Znzoreg" <wyflfvapNvk.argpbz.pbz> -->
<!--X-Date: Tue, 7 Jul 1998 23:29:44 &#45;0700 -->
<!--X-Message-Id: 199807080629.BAA16326@dfw&#45;ix14.ix.netcom.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: jlsysinc#ix,netcom.com -->
<!--X-Reference: 199806300655.BAA10217@dfw&#45;ix9.ix.netcom.com -->
<!--X-Reference: 199807012045.NAA08482#under,engr.sgi.com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: Databases: was Re: skill system</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:jlsysinc#ix,netcom.com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00075.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00077.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00013.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00326.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00076">Author</A>
&nbsp;|&nbsp;<A HREF="#00076">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00076">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Databases: was Re: skill system</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: Databases: was Re: skill system </LI>
<LI><em>From</em>: "Jon A. Lambert" &lt;<A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A>&gt;</LI>
<LI><em>Date</em>: Wed, 8 Jul 1998 02:30:28 -5</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
Merged several messages together here. :)

On 26 Jun 98, J C Lawrence wrote:
&gt; On Sat, 20 Jun 1998 04:17:25 -5 
&gt; Jon A Lambert&lt;jlsysinc#ix,netcom.com&gt; wrote:
&gt; 
&gt; &gt; RDBs are ideal for mapping objects with static runtime attributes.
&gt; &gt; In order to succesfully map an object with dynamic runtime
&gt; &gt; attributes to an RDB, the object must be reflective.  That is it
&gt; &gt; must be at all times self-aware of it's attributes.  In addition
&gt; &gt; the RDB ideally is designed in such a way as to implement object
&gt; &gt; reflectivity instead of the object directly.  This requires an
&gt; &gt; interface or translator module.  One can certainly map an object
&gt; &gt; directly to an RDB using what static properties are known to all
&gt; &gt; objects and putting the dynamic properties into a binary blob.
&gt; &gt; This is quite similar to the conventional use of dbm and related
&gt; &gt; implementations.  
&gt; 
&gt; Quite, and is so far the approach I am considering taking.  While
&gt; I'm not entirely clear on your use and definition for "reflective"
&gt; and "self-aware" above (please expound), your mention of a
&gt; translator module would seem to suggest that you are looking at the
&gt; same type of model I am: various meta tables (mostly containing the
&gt; names of other tables) which are used to define the structural
&gt; relationships and their significance between the tables.

Err, rather the RDB should be reflective of the softcode OO model, 
not the object itself. 

In a static model, the RDB is reflective of the actual objects.  For
instance, class Room maps to table Room and object instances of Room
map to rows of table Room.  One-to-one and one-to-many associations
between instances of Room and other classes like Exits or Persons are
mapped to columns which are foriegn keys into the Exit or Person
tables.  Inheritence can be mapped in almost the same way, although it
is interpreted differently.   The database is a direct mapping of the
objects and their relationships.  It is reflective of the application
intent of the objects.

All of this is quite useless in a dynamic model.   But instead of even
attempting to map mud objects directly, one might do better in mapping
the abstract softcode OO model.  Just as most rdbms contain system
tables that describe a relational model of themselves, one can create
tables that contain a relational model of a OO model.  Just as UML can
create an object model of an application, it can also be used to
diagram an object model of UML itself.   Um, perhaps this analogous to
compilers that will compile themselves.

With this in mind:

Classes have 0 or more Parent classes.
Classes contain 0 or more Object Instances.
Objects Instances contain 0 or more Attributes.
All Objects have OIDs.
All Classes have names.
...and so on..

Map the abstraction relationally instead. :)


&gt; On  1 Jul 98, J C Lawrence wrote:
&gt; On Tue, 30 Jun 1998 02:57:01 -5 
&gt; Jon A Lambert&lt;jlsysinc#ix,netcom.com&gt; wrote:
&gt; 
&gt; &gt; On 25 Jun 98, J C Lawrence wrote:
&gt; &gt;&gt; On Thu, 25 Jun 1998, Jon A Lambert wrote:
&gt; 
&gt; 
&gt; So far I've been very effective in convincing myself that an SQL
&gt; base is not well suited for a runtime morphic and irregularly
&gt; patterned (at least as a class heirarchy) MUD.

Right.  Then again the same problems rear there ugly heads in using
OODBMSs.  Most of these critters are as static as RDBMSs.  Runtime 
dynamism is rather unique to our problem.  I don't believe many 
persistent storage mechanisms even recognize runtime dynamism.  A 
good place to look for mechanisms may well be in Smalltalk 
literature.      

&gt; &gt; Although I cannot fathom a mud having 1000+ tables.  
[snip]
&gt; 
&gt; Think one table per object class and a fairly well developed object
&gt; heirarchy (free user programming).

Nod. This is exactly why traditional methods of OO to relational 
mapping will not work.  There's quite a few "patterns" out there, but 
I have not seen this problem addressed.
 
&gt; &gt; Construct an abstract object model of the object model that the
&gt; &gt; softcode follows.  Even if you not using relational technology, I
&gt; &gt; think this is the way to go.  
&gt; 
&gt; Already done.  Thus the map for ObjectID to method list, to
&gt; containment directives list etc.  The structure is actually very
&gt; simple: just four lists (of lists) with an ObhectID tag at the top.

That's where I started.  The only problems come at the point
where dynamic primitives (attributes) are mapped.  They can
be mapped to separate tables by type or to a single table with 
columns for each possible primitive and typing information.  
Either approach makes adhoc native SQL querying more difficult.
Unless you've constructed a query interface that filters attribute 
typing information. :) 

&gt; &gt; How many OO-DBMS's or P-Store systems follow your softcode OO
&gt; &gt; model? Probably none, right!?
&gt; 
&gt; I can't comment on the OODBMS end, but that's *exactly* what
&gt; persistent stores do.  At an idealised level a persistant store is
&gt; rolled into code as follows:
&gt; 
&gt;   class persistent bubba {
&gt;     public:
&gt;       lotsa methods();
&gt;     private:
&gt;       lotsa more_methods();
&gt;   };
&gt;     
&gt; After that all instances of the bubba class are automagically
&gt; persistent, and by their very nature follow your internal model as
&gt; that's what your code-model follows (doesn't it?).  Ideally you
&gt; never see or care about the storage format, indexes, record types,
&gt; tables, joins, inserts, etc.  You just behave as if you had
&gt; unlimited battery-backed RAM.  The peristent store merely adds a new
&gt; flavour modifier to the volatile/automatic/static/const set.

Yes, but they are not runtime dynamic.   Classes/Object attributes 
are fixed at compile time.  :(

&gt; &gt; Perhaps we should be discussing softcode OO models rather than DB
&gt; &gt; implementations.  Is the softcode-OO-model like Java, C++, ColdC,
&gt; &gt; LPC, etc.?  Single or Multi inheritence?  Is there a distintion
&gt; &gt; between object and class?  Are inheritence and attributes dynamic?
&gt; &gt; Are there built-in or native objects?
&gt; 
&gt; The OO model is rather ColdC-like (slightly Python-ish but not
&gt; quite), with multiple inheritance, clear seperation between
&gt; definition and instance (object and class), with inheritance and
&gt; attributes being dynamic.  There are a variety of primitive native
&gt; objects and (currently) no ability to create ad-hoc ADT's (alas).

Do you have singleton instances of class objects, like C++?
Do attributes and method code reside in the class, object or both?   

My model closely reflects C++.  However all inheritence is private 
and thus the softcode model strongly favors composition and 
delegation over inheritance.  Methods and attributes can reside 
both in class instances and in object instances (aka C++ "static").
My native objects could best be described as Java interfaces or
COM objects but they cannot be inherited.  

&gt; &gt; What you (and I) are doing is really designing the architecture of
&gt; &gt; an OO-DBMS.
&gt; 
&gt; &lt;sigh&gt;
&gt; 

&lt;insane cackling&gt;

  
--
--/*\ Jon A. Lambert - TychoMUD     Internet:jlsysinc#ix,netcom.com /*\--
--/*\ Mud Server Developer's Page &lt;<A  HREF="http://www.netcom.com/~jlsysinc">http://www.netcom.com/~jlsysinc</A>&gt; /*\--
--/*\   "Everything that deceives may be said to enchant" - Plato   /*\--


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00326" HREF="msg00326.html">[MUD-Dev] Re: Databases: was Re: skill system</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00013" HREF="msg00013.html">[MUD-Dev] Re: Databases: was Re: skill system</A></STRONG>
<UL><LI><EM>From:</EM> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00075.html">[MUD-Dev] Re: WIRED: Kilers have more fun</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00077.html">[MUD-Dev] Re: WIRED: Kilers have more fun</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00013.html">[MUD-Dev] Re: Databases: was Re: skill system</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00326.html">[MUD-Dev] Re: Databases: was Re: skill system</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00076"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00076"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>[MUD-Dev] Re: 1997 CGDC AI Roundtable Moderator's Report</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00090" HREF="msg00090.html">[MUD-Dev] Re: 1997 CGDC AI Roundtable Moderator's Report</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 08 Jul 1998, 18:39 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00015" HREF="msg00015.html">[MUD-Dev] Summary: "Influence Mapping"</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 01 Jul 1998, 21:25 GMT
<LI><strong><A NAME="00014" HREF="msg00014.html">[MUD-Dev] Elven Language List</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 01 Jul 1998, 21:25 GMT
<LI><strong><A NAME="00013" HREF="msg00013.html">[MUD-Dev] Re: Databases: was Re: skill system</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 01 Jul 1998, 20:47 GMT
<UL>
<LI><strong><A NAME="00076" HREF="msg00076.html">[MUD-Dev] Re: Databases: was Re: skill system</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Wed 08 Jul 1998, 06:29 GMT
<UL>
<LI><strong><A NAME="00326" HREF="msg00326.html">[MUD-Dev] Re: Databases: was Re: skill system</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Fri 24 Jul 1998, 00:25 GMT
</LI>
</UL>
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00093" HREF="msg00093.html">[MUD-Dev] Re: Databases: was Re: skill system</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Wed 08 Jul 1998, 20:06 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00008" HREF="msg00008.html">[MUD-Dev] Re: Levelless MUDs</A></strong>, 
Ling <a href="mailto:K.L.Lo-94#student,lboro.ac.uk">K.L.Lo-94#student,lboro.ac.uk</a>, Wed 01 Jul 1998, 19:39 GMT
<UL>
<LI><strong><A NAME="00027" HREF="msg00027.html">[MUD-Dev] Re: Levelless MUDs</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Thu 02 Jul 1998, 00:32 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>