AW: convert database entrys

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Nov 24 12:42:09 CST 2003


on 11/24/03 12:07 PM, Florian Bogeschdorfer at fb at memedia.de wrote:

>>>     tblDetail       TblDetailKind       tblCar
>>>      Wheel              Tire            BMW
>>>      Window             Rim             Audi
>>>                         Front
>>> 
>>> 
>>> 
>>> And now you need have 4th table that link all 3 tables:
>>> 
>>> 
>>>                 tblLink { ptrCar, preDetail, ptrKind, }
>>> 
>>>                            1        1           1
>>>                            1        1           2
>>>                            1        2           3
>>> -                          2        1           1
>>>                            2        1           2
>>>                            2        2           3
>> 
>> 
>> I see that this is a better solution.
>> But it is very hard for me finding the right way to create
>> that database structure aut of my .csv file.
> 
> But this is a lingo problem. Infact you will need to write your own csv
> import routine. I can give you a start if you want with this.
> 
>> In the table "tblLink" i have now numeric repetitions. Isnt
>> it the same problem only with numbers?
>> 
>> How do i now search for an product which is in "BMW; Wheel;
>> Tire" for example and i only know that the user has clicked
>> on the path BMW\Wheel\Tire?
> 
> Again, this is lingo. You'll need to extract BMW, WHEEL and TIRE from that
> string (look at the itemDelimiter from Director)
> 
>> And how i mark that product in his Table that it is an
>> Product of "BMW; Wheel; Tire"?
> 
> Jonathan, I think no matter if you use one or more tables. If you want to
> show BMW/WHEEL/TIRE,FELGE,WHATEVER and AUDI/WINDOW/FRONT,REAR,WHATEVER you
> will need to do more than one SELECT command, e.g.
> 
> SELECT detail FROM myTABLE WHERE car=BMW AND part=TIRE
> 
> Then put this in your display.
> 
> Then SELECT detail FROM myTABLE WHERE car=AUDI AND part=TIRE
> 
> ...
> 
> Or is there a neater SQL syntax, Ruslan?

I have not understand problem.

Having 4 tables, it is easy show "original" table using JOIN on 4 tables


    SELECT Car.*, Detail.*, Kind.*
    FROM Car, Detail, Kind, Link

Even there is no need specify WHERE links for join if to use ObjectPtr
fields.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list