I have a data modelling question. I have a table like this:
create table foo_vf (
id integer primary key,
from_v not null references user_groups,
to_f not null references f,
default_q references foo_vf_quantity,
selected_q references foo_vf_quantity,
unique (from_v, to_f)
);
create table foo_vf_quantity (
id integer primary key
quantity number not null,
cost number,
notes varchar(2000),
vf not null references foo_vf,
last_user_modifying not null references users,
last_modified date not null
);
Obviously, this doesn't work. I can't create the first table because
it references the second table, and I can't create the second
table because it references the first.
Is this bad practice?
Should I create the table, and then alter it to add the additional columns?
BTW, I know this isn't in normal form, etc... In this particular application, it seems appropriate.
Perhaps I should put the selected_f and
default_f columns in another table?
What do you recommend?
Request notifications