sql - Are relationship tables really needed? -
relationship tables contain 2 columns: idtable1
, , idtable2
.
only thing seems change between relationship tables names of 2 columns, , table name.
would better if create 1 table relationships
, in table place 3 columns:
table_name
, idtable1
, idtable2
, , use table relationships?
is good/acceptable solution in web/desktop application development? downside of this?
note:
thank feedback. appreciate it.
but, think taking bit far... every solution works until 1 point.
data storage simple text file till point, excel better, ms access, sql server, than...
honest, haven't seen argument states why solution bad small projects (with db size of few gb).
bad idea.
how enforce foreign keys if idtable1
contain id
s table @ all?
to achieve acceptable performance on joins without load of unnecessary io bring in unrelated rows need composite index leading column table_name
ends partitioning table sections anyway.
obviously pseudo partitioning going on still wasting lot of space in table/indexes repeating table name each row.
Comments
Post a Comment