I have an SQL application where I need to store different kinds of data. The structure is
- id: string
- value: string or number
It seems I have 2 choices. Either keep all id/string pairs in one table (say TabS) and all id/number pairs in another (say TabN), or else convert numbers to strings and store them all together. There will be another table that gives the type of each id.
I'm inclined to the second alternative (convert to strings) but wanted to see if there's something I'm missing. The solution needs to be compatible with MS SQL Server and with MySQL.