Suppose I have two tables on a database, and they have 10 columns one and 11 columns the other, where 10 of the columns are exactly the same on both.
What (if any) normalization rule am I violating?
Suppose I have two tables on a database, and they have 10 columns one and 11 columns the other, where 10 of the columns are exactly the same on both.
What (if any) normalization rule am I violating?
Perhaps the rule of avoiding redundant data? (i.e. the same data in two tables)
if 10 of the 11 columns are the same, why can't this just be one table, where the 11th column is left blank (along with a possible 12th column to denote which type of data it is, i.e. which table it would have been in originally)?
You are violating the Third Normal Form (3NF), because if mostly the same data is held in both tables, then every attribute of each table is not directly dependent on the key of its respective table.
It depends what's in the tables.
If no records are related to each other (for instance, if one table is simply archived records originating in but removed from the first table) you're not violating any rules.
But if those are the same records in each table, you have a dependency problem — that eleventh column is dependent only on the key value from the record, not the additional columns. Assuming that all ten columns are not involved in the primary key, you've violated 3rd NF.
If all 10 columns are part of your key, then Second Normal Form: Eliminating Redundant Data. Specifically, this falls under "Nonsurrogate Versus Surrogate Primary Keys" dilemma - to be honest, I don't recall either of those two choices to be "violating" 2NF, but the surrogate key is definitely closer to the spirit of 2NF
Only primary keys may be redundant between tables. Having any amount of non primary key columns in multiple tables violates third normal form.