I am working on transferring data from an old system based on IBM Universe to a new enterprise-level data and information management system and studying database design in the process.
I looked at the basic database structure of the new system (this is MS SQL DB, about 100 tables) and found some things rather strange. But I do not know if my inexperience is the reason why I think this is standard practice, or if these oddities are really just a poor database / application design.
For instance:
- Some date fields are varchar (20)
- The fields in which the measurements are stored are varchar (50), not something like a decimal and an enumeration for storing units of measure.
- ISBN field numbers 10 and 13 are varchar (50)
- The lookup foreign keys are varchar (100), although the primary key of the primary primary table is int
- Some fields: varchar (0)
- Additional separate fields for storing the month and year, each of which is varchar (250) - I do not know which design solution will require a maximum of 250 characters per year if they really have not overloaded their Y2K or decided to use the seconds from the beginning of the universe to store datetime
And many others. The database looks more than half of the varchar fields.
I should also note that all varchar fields in the database are actually n -varchar - so all Unicode, even fields that store only numbers.
- , varchar , ? (... ...?)