10

Why do some developers cut corners and add 20 extra fields just in case the customer wants to add extra data? What happens when the customer needs 21 fields. Just spend slightly more time and implement a custom field system that can extend to any amount of data it's not that difficult and you won't have to add a new field every time a customer needs more then you expected.

Comments
  • 3
    The fields in question are not static or defined in any useful way they are named custom1-20 and are all varchar(200) no indexing and they can contain anything the customer wants. A better solution would be to create a table for the declaration of a new field and another for storing the value linked to the owning row in the table allowing for any degree of customisation in the structure maybe not the most queryable but effective and extendable.
  • 1
    @centralhez, absolutely we have a similar system built into our cms at work - I've recently been extending it so it can be nested infinitely. it's really just a case of using relational databases they way they're supposed to be.
  • 1
    Bad design for a db. Use relationships and normalize. Otherwise it can get ugly real fast.
Add Comment