I'm trying to store stock data in a data base. All stocks will store the date, open, high, low, close. Some stocks may also have additional information stored such as P/E ratios and Debt/Equity ratios. When I first thought of this, I figured I would store the data in a few tables and have it without nulls
Table: DataTypes (this would be Open, high, low, close, p/e, ratios, etc)
SQLDataType (stores if the data is a VARCHAR, INT, etc)
Value (VARCHAR(20) that has to be converted each time I want to access it)
So, in this case, only the data that is available for each stock is stored. However, the more I look at this design, the more I think it is stupid. Having nulls in a table is not such a bad thing. Does something like this flat table make more sense?
Table:ExtendedQuotes (all possible values that may be stored for the stock. Some will be null)
Note that new quotes will come in many times each day.