There are lots of things to think about when you design a physical database. What data types should I use? What column is appropriate for the primary key? Are there particular indexes that I should use to improve performance? How should I implement data integrity rules? This list goes on and on. In this article I will be exploring different physical database design elements. These design elements should help provide you some guidance to ensure you make the right design choice for your database design.
Picking the Right Data Type
When it comes to deciding which data type you should select for a column in your database it’s easy right? Well this is not always the case. Sometimes you have to decide whether or not to support fix length or a variable length column value. Other times you might need an integer column value, but what is an appropriate size for that integer column. You may also find that you need to support a different character set because you want to support those special accents characters above some letters, like the “e” in the name José, or a more exotic character set that support symbols like Chinese. There are a number of design decisions you need to make when it comes to selecting the right data type for a database column. In the next few sections I will be reviewing different data types and giving you some ideas to help you make good physical database design choices when it comes to picking the right data type for a particular column.
Variable Length Verses Fix Length Character Data