my SQL teacher doesnt like identifying relations, he prefers to create a unique ID for each table
what is the benefit?
using a child-parent relation would perform better
my SQL teacher doesnt like identifying relations, he prefers to create a unique ID for each table
what is the benefit?
using a child-parent relation would perform better
he prefers to creat an unique ID for each table
I'm guessing you mean each record, not each table.
The critical issue for me is natural vs. surrogate keys.
can anyone clarify this for me?
Yes, your SQL teacher can explain his/her preference.
Personally I prefer natural keys over surrogate keys. If data already has a unique identifier then adding a surrogate key means you potentially have 2 versions of the truth, and you also need to do a join to resolve information about related entities - and that is expensive. There's also locking issues if you try to scale this to large systems (even before clustering).
However...