Keywords: DataAccWG

Hi Jacek,

A couple of comments:

> All constraints should have names, unique within given table.
> Example:
> CONSTRAINT fk_Filter_id FOREIGN KEY (filter) REFERENCES Filter (id)

I think the constraint names should be unique in whole DB, not just in
table. MySQL is rather forgiving in this regard, but other engines (e.g.
postgresql) are not.

> Primary key name format: pk_<columnName>.
> Example: pk_imageId (assuming imageId is the primary key)
> If composed key: pk_<columnName1>_<columnName2>
> Example pk_fovId_amp (assuming primary key on (fovId, amp)

In light of my previous comment, I suggest we use, for primary keys:

pk_<TableName>_<columnName>

or

pk_<TableName>_<columnName1>_<columnName2>_...

otherwise there can be e.g. multiple pk_imageId's around in DB.

A general comment: these rules will definitely help porting schema from
one engine to another. The issue still remains how to include features
specific to each RDBMS, such as "unsigned" data types, etc., unless we
want to compare "vanilla" versions of each engine. Is there a good
mechanism in EA to capture the engine-specific mods?

Sergei.

_______________________________________________
LSST-data mailing list
[email protected]
http://www.lsstmail.org/mailman/listinfo/lsst-data

Reply via email to