I have been evaluating Instant DB and have come across a few problems.
1. Primary Keys
When you define a primary key on a column in the CREATE TABLE syntax or
as an ALTER TABLE clause the column will accept NULL and non unique
values. I have used the workaround of UNIQUE NOT NULL on the column at
CREATE TABLE time. (i still use ALTER TABLE ADD PRIMARY KEY as well
which i think is not supposed to be allowed with UNIQUE see SQL92).
2. CONSTRAINTS
This is a much greater problem, when i use ALTER TABLE to add a FOREIGN
KEY constraint IDB alows the foreign key column to be violated. This can
be worked around by putting it into the CREATE TABLE syntax on the
column, however this now means you can not have the situation where A
references B and B references A (see below), which would not be a
problem if you had the ALTER TABLE. It also causes a problem if you
require a FOREIGN KEY over multiple columns which can only be done from
the ALTER TABLE clause
e CREATE TABLE A
(
uuid_sk VARCHAR2(2000) UNIQUE NOT NULL,
b VARCHAR2(2000) REFERENCES B(uuid_sk)
);
e CREATE TABLE B
(
uuid_sk VARCHAR2(2000) UNIQUE NOT NULL,
a VARCHAR2(2000) REFERENCES A(uuid_sk)
);
--
Regards
Paul Gallagher
Prism Technologies Ltd.
Tel. +44 0191 497 9900
Fax. +44 0191 491 9901
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.
|