9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Interested in improving networking in Plan 9
Date: Thu,  3 Sep 2009 12:29:45 -0400	[thread overview]
Message-ID: <921d908f106bdfc911f699738c0ff1dd@quanstro.net> (raw)
In-Reply-To: <509071940909030913q24d0da62x13daa9c04494964f@mail.gmail.com>

> [...] but... SQL is really ugly. it's
> not hard to construct something that provides the same functionality
> in a much more palatable form. aesthetics aside, if you're dealing
> with a database-heavy app, it can make the code much easier to read.

could you explain what in particular is objectionable about
sql?  i wrote about 100k lines of sql and pl/sql for a 1tb database
in the late ninties.  (doesn't sound very big anymore.)  i found
it easy to develop, read and maintain.  it almost felt like cheating.

there was about 100k lines of application / web stuff that went
along with it.

> not any harder but a lot less general is the option of wrapping the
> database around a higher-level abstraction. you can do things like
> data constraints and validations in the application code, rather than
> in the sql database itself, which always feels like this random
> bolt-on to the application logic.

of course this is a difficult roe to hoe.  the database can change
table.name from varchar(10) to varchar(32) without consulting
the application code, or vice versa.  seperating the constraining
fact from the constraint seems like a fundamental error to me.

alternatively, one can just as easily use stored procedures to validate input.
then the validation can work against the live constraints.  checks
like "the document.id must be a valid document.id" can be done
race-free in a stored procedure without doing a dance between
the application and db while holding a transaction lock.

- erik



  reply	other threads:[~2009-09-03 16:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-30  7:21 Vinu Rajashekhar
2009-08-30 14:21 ` ron minnich
2009-08-30 16:19   ` Eric Van Hensbergen
2009-08-30 17:07   ` erik quanstrom
2009-08-30 17:40     ` Venkatesh Srinivas
2009-08-30 17:53       ` erik quanstrom
     [not found]   ` <c81a07350908300842w3df8321aidf55096b65eb9b77@mail.gmail.com>
2009-08-30 18:17     ` ron minnich
2009-08-30 18:35       ` ron minnich
2009-08-31  3:34         ` erik quanstrom
2009-08-31 12:45           ` Eric Van Hensbergen
2009-08-31 12:51             ` erik quanstrom
2009-08-31 12:59               ` Vinu Rajashekhar
2009-08-31 13:05                 ` erik quanstrom
2009-08-31 13:48                   ` Anthony Sorace
2009-08-31 14:51                 ` Devon H. O'Dell
2009-08-31 15:03                   ` Vinu Rajashekhar
2009-08-31 13:42               ` Eric Van Hensbergen
2009-08-31 14:04                 ` erik quanstrom
2009-08-31 14:25                   ` Eric Van Hensbergen
2009-08-31 14:36                     ` erik quanstrom
2009-08-31 14:57                       ` Eric Van Hensbergen
2009-08-31 15:52                         ` erik quanstrom
2009-08-31 16:12                           ` Eric Van Hensbergen
2009-08-31 14:55                     ` Francisco J Ballesteros
2009-08-31 15:09                       ` Eric Van Hensbergen
2009-08-31 15:56                         ` erik quanstrom
2009-08-31 16:16                     ` Bakul Shah
2009-08-31 16:33                       ` Eric Van Hensbergen
2009-09-02 16:50                         ` Bakul Shah
2009-09-02 17:10                           ` Robert Raschke
2009-09-03 11:21                           ` matt
2009-09-03 12:50                             ` erik quanstrom
2009-09-03 16:13                               ` Anthony Sorace
2009-09-03 16:29                                 ` erik quanstrom [this message]
2009-09-03 16:34                                 ` Robert Raschke
2009-09-03 21:50                                 ` Daniel Lyons
2009-09-03 19:08                               ` Steve Simon
2009-08-31 17:09                       ` Devon H. O'Dell
2009-08-31 17:20                         ` erik quanstrom
2009-08-31 17:32                           ` Devon H. O'Dell
2009-08-31 18:00                             ` erik quanstrom
2009-08-31  4:17 ` Federico G. Benavento
2009-08-31  4:53   ` Vinu Rajashekhar
2009-08-30 17:22 erik quanstrom
2009-08-30 17:36 ` Vinu Rajashekhar
2009-08-30 17:56   ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=921d908f106bdfc911f699738c0ff1dd@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).