Hi. This is just some thoughts about database design.
I often find my self having to do this
update table_XY set x=..., y=... where x=... AND y=;
if not found then
insert into table_XY (x,y) values (...,...);
end if;
Is this normal or are there something else I could do so I don't have
A B wrote:
Or is there some more general problem with the table design?
table_XY is in this case (and most cases) a table like this
create table table_XY (
x int references table_X,
y int references table_Y
);
Without knowing what XY are and what you are using table_XY for it's
Is this normal or are there something else I could do so I don't have
to check if it exists?
I would say that it is normal.
For the developers: a combined insert/update command would be nice
:-)
Mysql has such a beast along a some other non SQL compliant extensions.
One possible approach
On Jul 25, 2008, at 11:46 AM, Francisco Reyes wrote:
Is this normal or are there something else I could do so I don't have
to check if it exists?
I would say that it is normal.
For the developers: a combined insert/update command would be nice
:-)
Mysql has such a beast along a some