1

We have an application in which we have privacy settings custom for field wise. So if we have three fields namely Address,Email,Contact then on each there is privacy setting either public or private . Now of course there are many fields around 10. I am thinking about storing data in one table and permissions in another.

So what is the most suitable of way of storing permissions ?

uselpa
  • 18,732
  • 2
  • 34
  • 52
Sachin Sharma
  • 407
  • 5
  • 20

1 Answers1

1

You should create a meta table of three columns where first is identity column, second would be with all the above column names as values and third one with privacy as flag field.

Later you can use that identity column to reference for values of those columns in another table.

Ex:

table(Id , fieldName, privacy)
Muhammad Muazzam
  • 2,810
  • 6
  • 33
  • 62