[TML] Back to the 21st century SQL question.
Christopher Hilton
chris at vindaloo.com
Mon Sep 17 12:16:14 MDT 2007
garry.e.ward at worldnet.att.net wrote:
>
> -------------- Original message from Christopher Hilton <chris at vindaloo.com>: --------------
>
>
>> Christopher Hilton wrote:
>>> Short: I want to build a sql database to represent an arbitrary number
>>> of sectors as described in Book 5 Scouts using the expanded star system.
>>> Has anyone already done this and if so are you willing to share what you
>>> came up with?
>>>
>> On the fourth attempt I came up with a basic structure for describing n
>> sectors. The structure contains six partially normalized tables:
>>
>> sector --
>> star_system --
>>
>> all_star --
>> all_gas_giant --
>> all_world --
>>
>> orbital_body --
>>
>> The difficulty that I found was in the orbital_body table which must be
>> self referential and must be able to reference any object in the
>> all_(star|gas_giant|world) tables.
>>
>> +----------------------+
>> | orbital_body |
>> +======================+
>> | |
>> | +------------------+ +
>> | | all_star | |
>> | +------------------+ +
>> | |
>> | +------------------+ +
>> | | all_gas_giant | |
>> | +------------------+ +
>> | |
>> | +------------------+ +
>> | | all_world | |
>> | +------------------+ +
>> | |
>> +----------------------+
>>
> Huh?
>
> OK; I think you may be over analyzing.
>
> There is no need for an all gas giants table; a gas giant is a world like any other world, why segregate it into its own table?
>
Just a justification: 1. In Traveller gas giants can only have one
attribute (small or large). 2. In Traveller as in the real world gas
giants can have moons.
> Being at work, I can't take time to review your SQL, will try to to that tonight, but the tables I've been playing with to try and create a navigation database haven't yet run into a need for self referential entries.
>
Thanks, you may want to pull it again later. After lunch I should have
the data domain consistency check stuff in.
-- Chris
--
__o "All I was doing was trying to get home from work."
_`\<,_ -Rosa Parks
___(*)/_(*)___________________________________________________________
Christopher Sean Hilton <chris | at | vindaloo.com>
pgp key: D0957A2D/f5 30 0a e1 55 76 9b 1f 47 0b 07 e9 75 0e 14
More information about the TML
mailing list