I am considering creating a MySQL Data Base for a non-mission critical project. I was thinking about a scenario when, in case I had to insert another column in a table, how can I achieve that without compromising data integrity of the pre-existing columns as well as specify the default values of those additional columns? I’d like the answer for both SQL and Java Persistence API (JPA).
In addition, I’d also like to know how to add a table within a cell of a parent table.
The addition of a column should have no effect on pre-existing data, unless you do something that links the columns, such as creating a multi-column index, unique key, or something similar. But if there are no such linkages between the new & old columns, add as many columns as you like. Go crazy!