I want to store a computer’s processor speed in a database. Should I use one column as a varchar and store the number and unit together e.g. “1.3 ghz”
or
should I create two separate columns, one as a decimal for “1.3” and a second column for the units as a varchar “ghz”?
Consider storing the value in this column with a fixed known unit. For example, make this an integer column store all speeds in this column as raw mega-hertz. This would let you write code that formats and presents the value to the user outside of the database.