Table structure?

Joakim Schramm joakim at astrocalc.com
Sat Apr 29 00:04:37 CDT 2006


 

> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of 
> Ruslan Zasukhin
> Sent: 28 April 2006 23:36
> To: valentina at lists.macserve.net
> Subject: Re: Table structure?
> 
> On 4/28/06 11:31 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:
> 
> > 
> > This is an "Atlas" database (none graphical, just data) so I have 
> > following, in a relational schema:
> > 
I actually forgot, there is one more table.
Table0 (this loaded in a combo, with CountryID as ItemData)
CountryName|
CountryID << Key

> > Table1 (A place in the world)
>  Place| << Key
>  LatDeg|
>  LatMin|
>  LatSec|
>  LatCompass|
>  LongDeg|
>  LogMin|
>  LongSec|
>  LongCompass|
>  Country| << Foreign key of CountryID in Table0
>  TimeZoneID << Key
> 
> 1) where is KEY field in this table ?
>  

> > Table2 (Timezones in the world)
>  DateTimeOfChange|
>  ChangeVal|
>  Ptr_Country|           << this is Foreign Key?
>                              It point to T1.Country field?
No, FK to CountryID in T0

>    
>  Ptr_TimeZoneID         << this is another Foreign Key ?
>                              it point to TimeZoneID ?
> 
>    so this is 3 Foreign Keys?
>     or single Foreing key
> 
Now I am not really sure about keys, as before all was in 3 tables, which
actually was 3 databases as engine not is relational. So I am now poundering
on which is K and which is FK

> Can you give first of all CONCEPTUAL diagram, i.e. Which 
> Objects you have and which links between them exists?
> 
> Something like:
>     Person  has  Phones
>        M           M
> 
I will try

Country has Places
   1          M
Country has Zones
   1          M
Places  has Zone(s)
   M           1

   /--T1 
  /   |
T0    |-- Result
  \   |
   \--T2

In words it's like, a place is located in country (we know), most country
has normally just one zone but some has many. Each place is located in 1 of
countries zones. App lookup place and get country and which zone in country
it's located. Each Zone has different DateTimes for change of zone hour, in
relation to GMT (=0) if not SDT.

Is it understandble?

Joakim


>  
> > I know how to set this up in a "traditional" way, but I 
> wanted to use 
> > unique features of Valentina, preferably BinaryLinks as 
> they seem very 
> > clean and simple to me, and probably the fastest. I am not 
> sure though 
> > if BinaryLinks are usable here, but maybe ObjectPtr?
> > 
> > How it works in practice in program is, a place are picked, either 
> > from returned SearchCollection or from List. Next, based on country 
> > AND ZoneID (most countries have just 1 but some have over 300) a 
> > timezone value are returned with passed DateTime as criteria. Quite 
> > simple yes in Relational, but I like to learn and use something new 
> > and is still unfamilar with Valentina. My way of thinking 
> though is if 
> > I learn and understand something difficult, then I 
> understand everything, sort of...
> 
> --
> Best regards,
> 
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
> 
> Valentina - Joining Worlds of Information http://www.paradigmasoft.com
> 
> [I feel the need: the need for speed]
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 



More information about the Valentina mailing list