Re: When should stuff be stored in a database?

From: Richard Wheeldon <richard_at_rswheeldon.com>
Date: Mon, 14 Apr 2003 22:29:26 +0100
Message-ID: <3E9B2836.41C6_at_rswheeldon.com>


Paul Linehan wrote:
> Now, it is very unlikely that another form of payment is going to be
> invented any time soon, so I am wondering whether it is better to hard
> code the values for this parameter into the app?

What about Paypal ? Nochex ? Other debit cards ? wire transfer ? standing order ? If you think some set of values is constant it's usually a good sign you haven't thought hard enough about it yet!

I'd go with defining the set in the database in order to allow easy use of referential itegrity constraints. e.g. paymenttype references OigePayment(paymenttype). This is the kind of thing databases are good at, and it can save a lot of hassle later on,

Richard Received on Mon Apr 14 2003 - 23:29:26 CEST

Original text of this message