Wolfgang Meiners schrieb:
[... example of a simple sql-database and relating questions ...]
so after reading the hints of Peter Otten and Bryan i played around a
bit and got the following solution. Of course it would be much simpler
following Bryans idea of natural keys but i think, i will go ste
Bryan schrieb:
> Wolfgang Meiners wrote:
>> one to many relationships are fairly common, i think. So there should be
>> a recommended way to insert data into such a relation using python.
>>
>> Given the following programm, what is the recommended way to insert the
>> list of NewEmployees to the da
Peter Otten schrieb:
> Peter Otten wrote:
>
> If you create indices for floors (and rooms)
>
> cur.execute("""create unique index room_index on rooms (fid, number);""")
> cur.execute("""create unique index floor_index on floors (floor);""")
>
> the addition of missing rows can be simplified to
>
Wolfgang Meiners wrote:
> one to many relationships are fairly common, i think. So there should be
> a recommended way to insert data into such a relation using python.
>
> Given the following programm, what is the recommended way to insert the
> list of NewEmployees to the database?
>
> ==
Peter Otten wrote:
If you create indices for floors (and rooms)
cur.execute("""create unique index room_index on rooms (fid, number);""")
cur.execute("""create unique index floor_index on floors (floor);""")
the addition of missing rows can be simplified to
missing = c2.execute("""select distin
Wolfgang Meiners wrote:
> Hi,
>
> one to many relationships are fairly common, i think. So there should be
> a recommended way to insert data into such a relation using python.
>
>
> Given the following programm, what is the recommended way to insert the
> list of NewEmployees to the database?
Hi,
one to many relationships are fairly common, i think. So there should be
a recommended way to insert data into such a relation using python.
Given the following programm, what is the recommended way to insert the
list of NewEmployees to the database?