1998Q2/
<!-- 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: Wed, 24 Jun 1998 22:50:56 &#45;0700 -->
<!--X-Message-Id: 199806250550.AAA27697@dfw&#45;ix8.ix.netcom.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199806200815.DAA06995@dfw&#45;ix12.ix.netcom.com -->
<!--X-Reference: Pine.PMDF.3.95.980624003052.541137071B&#45;100000#nova,wright.edu -->
<!--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="msg01198.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01200.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg01188.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01280.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#01199">Author</A>
&nbsp;|&nbsp;<A HREF="#01199">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#01199">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>: Thu, 25 Jun 1998 01:51:25 -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>
On 24 Jun 98, s001gmu#nova,wright.edu wrote:
&gt; On Sat, 20 Jun 1998, Jon A. Lambert wrote:
&gt; &gt; 
&gt; &gt; Part of the problem is in mapping a mud's objects to storage.
&gt; &gt; 
&gt; &gt; Mush, MOO and LP objects' attributes are runtime dynamic. 
&gt; 
&gt; The first statement is true if you are porting the code bases list in the
&gt; second statement.  We, however, are working on something less ambitious.
&gt; Building a compiler into my code is a bit beyond my capabilities and
&gt; desires ATM.

Yes it poses more problems for these servers.  My other post in 
response to Adam is likely more relevant to your implementation.
  
&gt; &gt; RDBs are ideal for mapping objects with static runtime attributes.
&gt; 
&gt; Bingo.  Not all of us are on the 'fully programable' band wagon.  In fact,
&gt; I think we are not even on the 'completely levelless' band wagon either.

Nod.  You would find me riding on that first bandwagon, but not on 
the second one.  :)

&gt; &gt; In order to succesfully map an object with dynamic runtime attributes 
&gt; &gt; to an RDB, the object must be reflective.  That is it must be at
&gt; &gt; all times self-aware of it's attributes.  In addition the RDB ideally
&gt; &gt; is designed in such a way as to implement object reflectivity instead
&gt; &gt; of the object directly.  This requires an interface or translator 
&gt; &gt; module.  One can certainly map an object directly to an RDB 
&gt; &gt; using what static properties are known to all objects and putting the
&gt; &gt; dynamic properties into a binary blob.  
&gt; 
&gt; Let me attempt to restate the above, to test my understanding.  Please
&gt; correct if I mess anything up.  :)
&gt; 
&gt; There are 2 kinds of objects (to generalize).
&gt; 1) Objects whose properties are compiled in. (A rock is a rock is a rock)
&gt; 2) Objects who can change their properties at run time. (a rock can become
&gt; an intelligent rock on the fly)
&gt; 
&gt; 1 maps nicely to a RDB because each of the objects compiled in simply gets
&gt; its own table, with one column for each property.  

Yes, mostly.

&gt;2 does not map well
&gt; because the setup listed for 1 (one table per object, one column per
&gt; property) will just not work as the properties themselves change and
&gt; changing a table's layout in SQL is ... expensive ... to say the least.

Exactly.  But even that's a relatively minor annoyance compared with
dynamic inheritence.  Changing an objects parentage.

&gt; One suggested solution to mapping 2 into a RDB is to map out the basic
&gt; objects/properties as in 1, and then cram all the changeable ones into a
&gt; Blob field.  The problem is that the blob field then needs to be
&gt; interpreted at run time, essentially recreating a large portion of the DB
&gt; layer in code (storing not only data, but how the data is used).  This, in
&gt; essence, defeats the purpose of using a RDB to begin with.

Right on.  In fact, I think it's a poor solution and wouldn't 
recommend it.   I can't even state with certainty that objects have 
any useful properties in common.  Unless it is assumed they trace 
their parentage to a single root. 
 
&gt; &gt; The simplest and most easily understandable form of reflectivity in 
&gt; &gt; storage that I know about would be the DIF format (VisiCalc anyone).
&gt; &gt; Not that I'm recommending it for use, just for getting aquainted with 
&gt; &gt; the concept.  It's quite limited.  
&gt; 
&gt; Unless I misunderstand, a RDB uses reflectivity, just not as easily
&gt; mutable reflectivity.  You can't just add a new variable on the fly... you
&gt; would have to create a new table, identical to the last + one new column,
&gt; and then transfer all the old data over, adding in the new variable
&gt; somehow.

Yes, but it is reflective of the RDB model; not the OO model.  
That is you see databases containing tables containing rows 
containing columns and tables that have foreign keys to other tables. 
What's not clear is whether these table associations are inheritence, 
aggregation or simple associations.  

If your SQL-RDBMS is ANSI compliant, adding or deleting a column is 
quite easily accomplished with ALTER.  How it is implemented may 
vary.  Usually such a command will escalate locking to the 
table-level, although I've seen RDBMSs which escalate the lock to the
database level. :(
 
&gt; &gt; Diku, Mud++ objects' attributes are runtime static.     
&gt; 
&gt; Yup.
&gt;  
&gt; &gt; I believe these server implementations would greatly benefit
&gt; &gt; from RDBs.  That is if persistence is desired.  
&gt; 
&gt; Yup.  Diku at least has a bit of a DB built in... or at least a chunk of
&gt; code they call a DB, but it hardly resembles any DB I've ever seen.  :)
&gt; 

There is a further distinction here.  Diku contains no notion of 
inheritence, while MUD++ does.    So it is even easier to map.
Perhaps I'll post a DB design for your stock Diku area, mob or
something, just for illustration.  

--
--/*\ 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>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="01152" HREF="msg01152.html">[MUD-Dev] Re: Databases: was Re: skill system</A></STRONG>
<UL><LI><EM>From:</EM> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</LI></UL></LI>
<LI><STRONG><A NAME="01188" HREF="msg01188.html">[MUD-Dev] Re: Databases: was Re: skill system</A></STRONG>
<UL><LI><EM>From:</EM> s001gmu#nova,wright.edu</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg01198.html">[MUD-Dev] Re: Multi-Server games</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg01200.html">[MUD-Dev] Re: Databases: was Re: skill system</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg01188.html">[MUD-Dev] Re: Databases: was Re: skill system</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg01280.html">[MUD-Dev] Re: Databases: was Re: skill system</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#01199"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#01199"><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: Databases: was Re: skill system</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="01200" HREF="msg01200.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>, Thu 25 Jun 1998, 05:52 GMT
<UL>
<LI><strong><A NAME="01212" HREF="msg01212.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 26 Jun 1998, 06:45 GMT
<UL>
<LI><strong><A NAME="01265" HREF="msg01265.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>, Tue 30 Jun 1998, 06:56 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="01188" HREF="msg01188.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 24 Jun 1998, 04:45 GMT
<UL>
<LI><strong><A NAME="01199" HREF="msg01199.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>, Thu 25 Jun 1998, 05:50 GMT
</LI>
<LI><strong><A NAME="01280" HREF="msg01280.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, 01:42 GMT
<UL>
<LI><strong><A NAME="01282" HREF="msg01282.html">[MUD-Dev] Re: Embedded languages was Re: Databases: was Re: skill system</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Wed 01 Jul 1998, 03:17 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="01229" HREF="msg01229.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>, Sat 27 Jun 1998, 02:00 GMT
</LI>
</ul>
<LI><strong><A NAME="01211" HREF="msg01211.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 26 Jun 1998, 06:38 GMT
</LI>
</ul>
</ul>
</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>