I am developing a contact manager / address book application, but I canβt design the database design.
In my current setup, I have a Contact that has Addresses, Phonenumbers, Email and Organizations. All contact properties are currently separate tables with fk in the contact table. Needless to say, a contact can have any number of these properties.
Now that I want to read contacts in the application, I join all of these tables. Since filters, callbacks, sorting, etc. are not performed in linked tables, isnβt it better to simply or simply save the linked fields as json-encoded lists according to the direct properties of the contact table?
For example, instead of contacting fk in a phonenumber name table with 3 entries, just encode all the numbers and save them in the contact table field?
Any ideas really appreciated! (fyi I am using Django, although this does not really matter)
sql django-models database-design denormalization
Dick
source share