Storing arrays in tables is a good programming practice?
Database does not save Array, but String, such as JSON
. Then see that it gives in the same as saving as string. The problem is in maintenance and not in performance. If it is a good practice of programming, nay, as it mainly damages documentation, and therefore maintainability. But each case is a case, sometimes the information of the Array is little reusable in the system and divide it in the database, could overload the database with tables.
If I make a table and it has say 500,000 lines, it will cause some delay when sql goes through it to return me the data?
It is logical that a database tends to get slower as the amount of record, this is inevitable. But you can reduce the amount of SELECT attributes by making the transfer process faster. But this is not possible if the data is inside a ARRAY
.