mysql - database table structure design
習慣沉默
習慣沉默 2017-06-30 09:55:23
0
3
1073

Describe the requirements:
Now we need to design the database table structure. There are many types of rules. How to design tables to store these rules. Each rule has common attributes and different attributes. At present, I have thought of two methods: the first is through foreign keys (common attributes are in one table, and the different attributes of the rules are placed in another table); the second is through wide fields (the different attributes of the rules are placed in a large field Save it);
May I ask the masters if there is a more efficient way.

習慣沉默
習慣沉默

reply all(3)
洪涛

Simple, JSON strings are stored in the database

给我你的怀抱

The person above is right, you can directly save it as a json string! It is also convenient to operate
Now mysql5.7 explains the JSON series operation functions in Mysql in detail

typecho

In short, don’t try to extract what is common. .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template