I've been checking the sqlite file to make pgsql SQL file, and I'm stopped by
lots of problems in the design (I'm still checking the code to be sure about
changes). Some are things seen in lots of places, not making them good
designs, and others are normalizations.
Here are some (if not all) of them:
- Use of '0000-00-00 00:00:00' as a valid timestamp, or as a DEFAULT. This
should be replaced with NULL.
- In the users table, there is a language field (or column) of type
varchar(5). First, the use of a reserved SQL word like language really
bothers me (lang would have been OK, and easier to write ;-)). And second,
for the sake of normalization all posible (or supported) languages should be
in a separate table, referenced from the users table.
- In the identities table there are two fields which names are inside doble
quotes, which may have an unpleseant behaviour in PostgreSQL (it makes it
case sensitive). As they are both in lower case, I'll just take the doble
quotes away.
- The identities table has a "default" field, which once again gives me the
spooks, as it is a reserved word in SQL.
Any comments are welcomed.
--
14:38:21 up 14 days, 3:34, 1 user, load average: 1.12, 1.22, 1.13
---------------------------------------------------------
Lic. Martín Marqués | SELECT 'mmarques' ||
Centro de Telemática | '@' || 'unl.edu.ar';
Universidad Nacional | DBA, Programador,
del Litoral | Administrador
---------------------------------------------------------