1

I'm new here, so I'll keep my question straight and short. I am building a webapp that lets users select some product, submit their details and place an order.

Currently, my ORDER table contains only one field for the address. I was planning to write code to assimilate all address lines to one, including the state, city, etc. I will then add functions to retrieve the address field and parse it for state, city, etc.

Is this a good approach, or will the database be faster if there is seperate field for states, cities and the like?

Evan Carroll
  • 65,432
  • 50
  • 254
  • 507
user21904
  • 113
  • 4

1 Answers1

3

Separate fields. Every time. String operations are costly, especially cutting them up into bits.

Steve Pettifer
  • 441
  • 4
  • 10