[Lazarus] OOP - where do you start?
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Fri Jun 26 15:03:35 CEST 2015
Graeme Geldenhuys wrote:
> When faced with a new database related project, where do you start? Do
> you first design the database schema, then build the BOM (Business
> Objects) accordingly? Or, do you first design the BOM, then design the
> database schema to fit.
I'd suggest that the answer to that varies, in part depending on the
type of program.
In the case of a business (or logging etc.) program where a database
might have multiple "client" programs, possibly written by different
people in different languages, then the principle of top-down design
suggests that you start with the schema.
In the case of a program which is using a database for private backend
storage and as a configuration registry, then top-down design suggests
that schema design might be an ad-hoc activity at a low priority with
(at least) a UI mockup done first.
However a common feature is that in both cases a developer would do well
to make an early decision as to whether e.g. new rows replace existing
ones or are appended, whether e.g. modifications are timestamped and
branded with a user ID, and so on. Which suggests that there are some
invariant activities which can usefully be done as soon as it's decided
to use a database, and possibly before the database implementation is
even selected.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list