Is storing arrays in tables a good programming practice?
Database does not save Array, but String, like JSON
. Then look at the same as save as string. The problem is maintenance rather than performance. If it is a good programming practice, no , as it mainly damages documentation, and therefore maintainability. But each case is a case, sometimes the Array information is little reusable on the system and split it into the database, could overload the database with tables.
If I make a table and it has 500,000 lines, will it cause some delay in the time of the sql to go through it to return the data to me?
It stands to reason that a database tends to slow down by the amount of registration, this is unavoidable. But you can reduce the amount of SELECT attributes, making the transfer process faster. However this can not be done if the data is within ARRAY
.