I'm really interested in knowing what the best way to structure relational database tables in the following scenario is.
Let's say the table is recording cryptocurrency prices. There are four important aspects:
1. An ID 2. The date and time 3. What cryptocurrency it is 4. The price
I'm thinking of two possible ways to structure the resulting table, either:
ID Date Crypto Price 1 2018-01-01 12:00:00 BTC 100000 2 2018-01-01 12:00:00 ETH 1234
ID Date BTC_Price ETH_Price.... 1 2018-01-01 12:00:00 1000000 1234
Is there a "best practice" to structure these kind of tables? One consideration that I have is I might want to add more types of currencies in this case. I can do this with the ALTER command, but in that context the first layout makes more logical sense to me.
What are your thoughts?