Re: postgresql vs mysql
От | Mark Walker |
---|---|
Тема | Re: postgresql vs mysql |
Дата | |
Msg-id | 45DE1957.6040108@omnicode.com обсуждение исходный текст |
Ответ на | Re: postgresql vs mysql ("Brandon Aiken" <BAiken@winemantech.com>) |
Список | pgsql-general |
>>>If you don't know something, why are you trying to record it? From a strict relational sense, the existence of NULL valuesin your fields indicates that your primary keys are not truly candidate keys for all your fields. That means your database isn't [BCNF] normalized.<<< I agree that there are very few times when NULL is appropriate in a database. I can't think of a single concrete exampleto use it in a database field. It has its use in programming, mainly as a memory management/trash collection mechanism. Basically, you don't want to deletesomething that doesn't exist. For example: Statement *st = NULL; ResultSet *rs = NULL; try { st = prepareStatement("select * from customers"); rs = st->executeQuery(); while (rs->next()) { do something } delete st; delete rs; } catch (Exception e) { if (st != NULL) delete st; if (rs != NULL) delete rs; }
В списке pgsql-general по дате отправления: