Re: Design
Date: 20 Oct 2001 21:46:37 -0700
Message-ID: <a6e74506.0110202046.3a20188a_at_posting.google.com>
> Some tables in a database are needed to keep track of four physical
> objects. One of these objects can come in one of three shapes.
> Shape A has three attributes, shape B two and shape C has only one.
> Itīs about how and where they are stored.
> Is it better to have one mothertable for Object and three childs for
> the different shapes, or can I have one for all of them wiht some
> fields optional?
As you described, a normalized solution would look like the 1 mother table with 3 children tables. Whether it is better than a one table solution, depends on your specific needs.
In XDb, the solution would look very similar. First make classes similar to those shown below and then make instances as needed.
Shape
.Property0
ShapeA [Shape]
.Property1 .Property2 .Property3
ShapeB [Shape]
.Property4
.Property5
ShapeC [Shape]
.Property6
XDb is an object-oriented database for Windows & Pocket PCs. Instantiate, reference, cut, copy, paste, delete, query objects via File Explorer like GUI. Download your free copy (260 KB) from http://www.xdb1.com Received on Sun Oct 21 2001 - 06:46:37 CEST