0

Suppose I have a table in which I have a column which is multi-valued, these values are primary key of another table, now I could normalize this by making it single-valued column and repeating the same row for each value that occurs to be in the column, but I guess this is so redundant, note that this column can have up to 100 values(which are foreign key derived from another table). Now if I make it single-valued column then obviously my rows will be multiplied by the number of keys I take from the foreign table, what is the best practice to normalize this kind of scenario in the most optimized way?

Table-1( pk, column-1, column-2)

Table-2( pk, column-1, column-2, FK(Table-1))

Here my FK can relate to more than one item of table-1

philipxy
  • 14,867
  • 6
  • 39
  • 83
MK Patel
  • 1,354
  • 1
  • 7
  • 18
  • Hi. You are just asking for us to rewrite a textbook with a bespoke tutorial. Also you tagged this with "database normalization" so you at least know a term that is relevant that you can research. Please see [ask] & the voting arrow mouseover texts re research & see hits googling 'stackexchange homework' & show the steps of your work following a published academic textbook (dozens are free online in pdf) & explain about the first place you are stuck. PS There is no point in worrying about vague terms or notions just because you heard rumours about them. – philipxy Feb 11 '19 at 23:05
  • Possible duplicate of [Is storing a delimited list in a database column really that bad?](https://stackoverflow.com/questions/3653462/is-storing-a-delimited-list-in-a-database-column-really-that-bad) – philipxy Feb 11 '19 at 23:06

0 Answers0