I need to nornalize some data, and i am new to backend/database programming, so this might be pretty obvious but I've searched and couldn't find anything.
I have an 'empires'
table. Each empire can be 'civilization'
one of the following:
- British
- French
- Dutch
- Ottoman
- Spanish
Right now, the empires
table contains a column of type VARCHAR(255) called civilization
and that's where the one of the above strings is stored.
Now ofcourse, later I realized that it's not very scalable and not a good idea, so what I decided to do was to create another table called civilization
which contains 2 columns, id and string which contains it's name.
My questions now is, how do I ensure, for example, that all 'British'
empire will point to the exact same row in civilization
table ?