On Sun, May 25, 2008 at 8:29 AM, Will P. [email protected]
wrote:
Soo so so much simpler.
If the shoe fits. I would use SQLite more if it had proper relational
algebra under its hood.
Would you mind explaining what you mean my that?
No solid constraints for data integrity. Like foreign key
constraints, for example. Somebody mentioned on this list in a
different thread, though, that this will change in the future. Here’s
a contrived example without caps…
sqlite3 --version
=> 3.4.0
sqlite3
create table food (
ingredient varchar not null primary key
);
create table measurements (
measurement varchar not null primary key
);
create table preparation (
measurement not null references measurements (measurement),
ingredient not null references food (ingredient),
primary key (measurement, ingredient)
);
insert into food values (“garlic”);
insert into measurements (“clove”);
insert into preparation (measurement, ingredient) values (“garlic”,
“clove”);
insert into preparation (measurement, ingredient) values (“clove”,
“garlic”);
select * from preparation;
=> garlic |clove (yes, the result has that space after garlic)
=> clove|garlic
Sort of a bandaid on logic, especially considering that the above code
complies with the SQL92 standard. Hey, but it’s small, fast, and
works for some things.
Sorry for the bad vibe, but people need to be aware that they are not
working with an RDBMS.
Todd