Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Simon Slavin
On 9 Sep 2009, at 9:15pm, Stef Mientki wrote: > 1 type of car can (and will) be owned by many persons. Oh, so these are not specific cars, these are descriptions of cars. Yes, in this case you need now what is asked for in the subject-header "one to many" but "many to many". And the

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Stef Mientki
Shaun Seckman (Firaxis) wrote: > It seems like the more ideal solution would be to create a third table for > ownership that contains a person ID and a vehicle ID. thanks Shaun, but that's what I (i'm not a database expert) call the Bind table. I read some articles about normalization, and I

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Stef Mientki
Simon Slavin wrote: > On 9 Sep 2009, at 5:15pm, Stef Mientki wrote: > > >> The situation is like this (simplified): >> >> I've a table with persons: name, address, phone, etc. >> I've another table with vehicles: car_or_bike, brand, type, build- >> year, etc. >> The 2 tables are bounded by

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Simon Slavin
On 9 Sep 2009, at 6:58pm, Shaun Seckman (Firaxis) wrote: > It seems like the more ideal solution would be to create a third > table for ownership that contains a person ID and a vehicle ID. I thought that a third table was what you proposed in the first place. I was telling you you didn't

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Stef Mientki
Igor Tandetnik wrote: > Stef Mientki wrote: > >> I'm just an amateur struggling with databases, >> so forgive if I ask a question every database user should know. >> >> The situation is like this (simplified): >> >> I've a table with persons: name, address, phone, etc. >>

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Shaun Seckman (Firaxis)
It seems like the more ideal solution would be to create a third table for ownership that contains a person ID and a vehicle ID. This will result in more tables (significantly more if you're trying to migrate object oriented data into a relational model) but is that really a bad thing? I

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Igor Tandetnik
Stef Mientki wrote: > I'm just an amateur struggling with databases, > so forgive if I ask a question every database user should know. > > The situation is like this (simplified): > > I've a table with persons: name, address, phone, etc. > I've another table with vehicles:

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread P Kishor
On Wed, Sep 9, 2009 at 12:32 PM, Simon Slavin wrote: > > On 9 Sep 2009, at 5:15pm, Stef Mientki wrote: > >> The situation is like this (simplified): >> >> I've a table with persons: name, address, phone, etc. >> I've another table with vehicles: car_or_bike, brand,

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Simon Slavin
On 9 Sep 2009, at 5:15pm, Stef Mientki wrote: > The situation is like this (simplified): > > I've a table with persons: name, address, phone, etc. > I've another table with vehicles: car_or_bike, brand, type, build- > year, etc. > The 2 tables are bounded by bind table: person_ID, vehicle_ID

[sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Stef Mientki
hello, I'm just an amateur struggling with databases, so forgive if I ask a question every database user should know. The situation is like this (simplified): I've a table with persons: name, address, phone, etc. I've another table with vehicles: car_or_bike, brand, type, build-year, etc.