From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <838f0f5ea30688aae8174b6c42844ef9@quanstro.net> References: <4A9FA6B5.9020302@maht0x0r.net> <838f0f5ea30688aae8174b6c42844ef9@quanstro.net> Date: Thu, 3 Sep 2009 12:13:00 -0400 Message-ID: <509071940909030913q24d0da62x13daa9c04494964f@mail.gmail.com> From: Anthony Sorace To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] Interested in improving networking in Plan 9 Topicbox-Message-UUID: 619f6e6c-ead5-11e9-9d60-3106f5b1d025 i've not used matt's sql module itself (i should check it out) so i can't comment on his implementation, 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. somewhat harder is creating such a module in a way that's not specific to a specific database, or even sql. this is similar (in theory) to what the various php database modules do. this can be important if your application is delivered/deployed in an environment where you don't have control over what database is being used (although if the database is important for your app, i think not having control over the database is a poor position to be in). 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. in the last large database-centered project i was involved in, owing in large part to the lead programmer's linguistics background, we called this the ontology layer: it defined the things that exist. the rest of the app only had to deal with what was in there, and it took care of mapping things to a backing store. at the layer of ontology, a fs-like interface can work pretty well. i'm less convinced it's worth doing much with a lower-level database beyond a slightly smart data channel.