Re: Should I use LISP for this?
From: Karl A. Krueger (kkrueger_at_example.edu)
Date: 03/02/04
- Next message: David Steuber: "Re: Why is lisp so weird?"
- Previous message: David Steuber: "Re: off-topic: open challenge to Christian Lynbeck"
- In reply to: Alan Walker: "Re: Should I use LISP for this?"
- Next in thread: Alan Walker: "Re: Should I use LISP for this?"
- Reply: Alan Walker: "Re: Should I use LISP for this?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 2 Mar 2004 06:16:32 +0000 (UTC)
Alan Walker <alan-walker-hater-of-spam@charter.net> wrote:
> Seems more like a database problem. Check out MySQL. If you want data in
> memory, use MySQL Cluster.
MySQL is actually a pretty bad example of an SQL DBMS. It does not
implement many of the "hard" parts of the SQL language, like triggers,
views, and stored procedures -- that is, some of the features that allow
the DBMS to do much of your work for you.
For a very rough analogy: That's kind of like a Lisp with no macros,
and no way of implementing them.
Over time, the MySQL people -have- implemented a lot of those "hard"
features, such as transactions and relational integrity checking, albeit
somewhat more roughly than other open-source SQL DBMSes. But oddly
enough, before they did so, they were telling their own users things
like "integrity checking is for lousy programmers" and "anything you can
do with transactions you can do in the application." And those things
just are not true.
To continue the rough analogy: A "relational" DBMS without relational
integrity checking is like a Lisp without, say, type checking -- one
which will tell you (CAR 'FOO) is 42 via an invalid memory access. One
without transactions is like a Lisp without UNWIND-PROTECT or any
equivalent.
There are a number of other open-source SQL DBMSes, any of which are
more complete than MySQL. PostgreSQL is the best-known, and CL-SQL
supports it. There is also Firebird -- as well as MaxDB, which is also
these days put out by the MySQL company. Unlike MySQL itself, MaxDB is
a regular SQL DBMS which used to be proprietary (as SapDB). (Firebird's
origins are also proprietary; PostgreSQL was originally a research
project.)
MySQL is also missing a lot of useful _little_ features that many are
surprised to find aren't there. It's often considered a useful DBMS for
"Internet-facing" applications ... but it does not have standard data
types for IP addresses or CIDR netblocks, and as a result cannot do real
comparisons on IP addresses.
As a result, many application programmers have had to implement their
own kludgy versions of these, based on long integers or strings, and
reimplementing IP address math in their applications. My partner has
been working to deploy (not write) a network management application with
a MySQL back-end and has encountered many of these kludges in the code
base.
Meanwhile, I'm using PostgreSQL for a different application of my own
design, and can do things like ask the database questions about IP
addresses:
SELECT * FROM hosts WHERE ip_addr << '10.128.128.0/25' ;
... where << is the set-member predicate. (PostgreSQL implicitly casts
the string '10.128.128.0/25' to type 'cidr'.)
For more information on MySQL (and PostgreSQL) odd behaviors:
MySQL Gotchas:
http://sql-info.de/mysql/gotchas.html
PostgreSQL Gotchas:
http://sql-info.de/postgresql/postgres-gotchas.html
"Weird stuff in MySQL":
http://vulcanus.its.tudelft.nl/~acm/got/antimysql.php
-- Karl A. Krueger <kkrueger@example.edu> Woods Hole Oceanographic Institution Email address is spamtrapped. s/example/whoi/ "Outlook not so good." -- Magic 8-Ball Software Reviews
- Next message: David Steuber: "Re: Why is lisp so weird?"
- Previous message: David Steuber: "Re: off-topic: open challenge to Christian Lynbeck"
- In reply to: Alan Walker: "Re: Should I use LISP for this?"
- Next in thread: Alan Walker: "Re: Should I use LISP for this?"
- Reply: Alan Walker: "Re: Should I use LISP for this?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|