I am stuck with database design of holiday package inventory project which contains a main table packages
for storing package information.
Here is the fields
- id PK
- package_name varchar
- attractions json eg-field: ['super','funny'],
- inclusions json eg-field: ['hello','cool']
One package may have many attractions and inclusions so that's why i choose a json
field.
So is this a slandered way or keep the attractions and inclusions in another table with foreign key relation??.
if i choose second method(ie different tables for attractions and inclusions) what about searching a package with particular attraction think that search requires a join query (Search with join is a bad practice??.).
But in the first method we can apply a json search (MySQL-version >5.7 supports json search).
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire