-1

I am going to create a table with fields like ID, Name, Email ID, Phone, Designation, Department and Institute. In this regard, I believe making the fields like Designation, Department and Institute as foreign key is an efficient one (as it have redundant values). Am I correct? or suggest some better ideas.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Udhaya
  • 121
  • 1
  • 14
  • It all depends on the requirement. For a small table, it may seem ok. But for a big table (millions of records), at the first glance, maybe it seems inefficient. But consider if you need records of a department, using where on an indexed integer column (foreign key) is much faster than a varchar column! – Morteza Rajabi Oct 01 '17 at 07:33
  • 4
    Your question is not clear. You write strangely about FKs & "redundant values" and "efficient". What are you trying to do and why you are calling it normalization? What exactly is your homework/assignment? What is your reference for doing design & normalization? – philipxy Oct 01 '17 at 07:41
  • 1
    Looks like you might be suffering from misconceptions addressed in [this answer](https://stackoverflow.com/a/44539858/3404097). *Please* clarify your question. It seems extremely likely that you have a lot of misunderstandings. – philipxy Oct 02 '17 at 11:49

1 Answers1

-1

Yes you are correct, redundancy is one of the things you should avoid. And i encourage you to read more about normalization because you will find more things that will not only make your database more efficient, but easier to use / understand when it grows and gets complicated.

And as the example in the reply above, you should also pay attention to the tables / columns names.

So instead of

Designation, Department and Institute as foreign key

You should follow a pattern and name them like table name + id, so you know just by looking at it that it is a foreign key and it's referencing that table.