I have an event organizer where a user can create one or several custom excel-like spreadsheets associated with an event. The event will also have some notes, and dates, and other basic info that fits well into a SQL databse. Obviously, I can’t create a table for each user’s spreadsheet. The data in the spreadsheet will NOT have to relate to anything in the database. The sheet itself will relate to the user and the event, but the data inside is self-contained with no strict data types.
- So is it bad to just have a column with XML if it doesn’t have relations?
- Is there a better place to store it besides local storage?
Well, it’s not necessarily bad. It’s just that when you store a blob of XML or JSON to a field, you can’t do anything to it, except for reading and overwriting. No queries, joins, grouping on items within this blob.
If you’re fine with this and you do all your processing in the app anyway, then go ahead, store XML in the database.