http://media.sugarcrm.com/developer/tutorials/Sugar6.0.0_CE_Schema_Diagrams.pdf
I'm looking at the schema for SugarCRM, an opensource CRM application.
While the column design and table layout is pretty self explanatory, I'm curious about the actual data types used.
It seems that rather than using specific data types, 'char' and 'varchar' were used for everything, even the ID fields. I'm wondering if there are any reasons for that? Would it be so it's easier to use the schema on different RDMS systems since char/varchar are pretty standard? Or was someone lazy? I would expect some columns, such as ID columns, to use INT or a variation.
Another thing I'm wondering about is why char was used in some places, and varchar in others. For instance, if you look at the last page, the 'users' table is CHAR(36), as well as the 'opportunities' table. However, the rest of the tables on that page use VARCHAR (36). Not sure what the difference/reason is.
Thoughts?
I'm looking at the schema for SugarCRM, an opensource CRM application.
While the column design and table layout is pretty self explanatory, I'm curious about the actual data types used.
It seems that rather than using specific data types, 'char' and 'varchar' were used for everything, even the ID fields. I'm wondering if there are any reasons for that? Would it be so it's easier to use the schema on different RDMS systems since char/varchar are pretty standard? Or was someone lazy? I would expect some columns, such as ID columns, to use INT or a variation.
Another thing I'm wondering about is why char was used in some places, and varchar in others. For instance, if you look at the last page, the 'users' table is CHAR(36), as well as the 'opportunities' table. However, the rest of the tables on that page use VARCHAR (36). Not sure what the difference/reason is.
Thoughts?