convert database entrys

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Nov 24 12:49:26 CST 2003


on 11/24/03 11:24 AM, Jonathan Fiagbedzi at j.fiagbedzi at e-novum.com wrote:

Hi Jonatan,


>>     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.

You need write own import function that will parse your cvs file.

May be you can write function that will transform db FROM one table to 4
tables.

IF you will need import cvs file often,
May be you can even in your db have 4 tables, PLUS that 5th ONE table.
At first you import cvs into table using Valentina Import.
Then on second step move new records from 5th table to that 4 tables.
5th table become empty.

All up to your fantasy and tasks.


> In the table "tblLink" i have now numeric repetitions. Isnt it the same
> problem only with numbers?

No, this is NOT the same problem.

The main is that ENTITY of REAL WORLD -- "Car BMW" is stored just once in
the database. You can easy find and modify it.

Numbers are just POINTERS.


> 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?

> And how i mark that product in his Table that it is an Product of "BMW;
> Wheel; Tire"?

Do you mean that also in this db should be stored some info about N REAL
WORLD cars BMW, Audi?

For example BMW of Jon, BMW of Bill ?

Then you need more tables.

       
I think you really need find some good book and spend 2-4 hours to read it.
May be find info on inet how build good relational tables.

-- 
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