I am doing this material to create a database for a system where I need to store some arrays of variable length in a mysql database.
The length of the arrays will be (at most) hundreds, if not thousands.
New arrays will be created on a regular basis, maybe tens per day.
- Should I store these arrays in one table, which will soon become gigantic or
- create a new table for each array and will soon have a huge number or tables?
- something else? (e.g. formatted text column for array values)
for clarification, 1. means roughly
CREATE TABLE array (id INT, valuetype VARCHAR(64), ...) CREATE TABLE arr_values (id INT, val DOUBLE, FK array_id)
and 2.
CREATE TABLE array (id INT, valuetype VARCHAR(64),...) CREATE TABLE arr_values (id int, val DOUBLE, FK array_id)
The arr_values โโarguments will be used as arrays, which are requested by attaching to the full array. Any ideas on why some approach is better than others?
sql mysql database-design
Plane
source share