Re: Data Types

Поиск
Список
Период
Сортировка
От Lew
Тема Re: Data Types
Дата
Msg-id ib3s1g$ud8$1@news.albasani.net
обсуждение исходный текст
Ответ на Re: Data Types  (ALT SHN <i.geografica@alt-shn.org>)
Список pgsql-novice
ALT SHN wrote:
> The reason why I don't want to create separate tables to deal with this
> issue is because this is a provisional information. I'll explain. The

BRAAAAAPPP!

Red herring.

> table "paleosites" is in fact a Shapefile that was imported via PostGIS.
> The column "species" it's only the first impression gathered on field
> work. The real species might take years or even decades to fully
> determine. For example we know that from paleosite "x" we have remains
> of dinossauria but what group? what species? Only laboratory work will
> be able do determine this...

This has nothing to do with normalizing your table to eliminate the array column.

> The column "species" is, therefore, intended to give a first hint. The
> real species- that are fully studied are on a table called "specimens"
> wich is linked to table "species" in a relation 1:m.

So you reassign the species when you get the new data.  Simple.  You're
complicating things unnecessarily.

> Do you thing that even though this issues I'm still modeling the wrong
> way? If I stick to the original idea (enumerating all the species in
> column "species" with datatype text) maybe I could eliminate the spaces
> (DinossariaCrocodilia) or that's just irrelevant?

Yes, you are modeling it the wrong way.  Read up on relational database
normalization.

The notion that the species assignment might change has no relevance to the
flaw in your design.  You still face that issue with a bad design, but you add
the additional problems of the bad design.  Normalize your database and you'll
still have the "problem" that species assignment might change, but it will be
much, much easier to handle correctly.

--
Lew

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: COPY command and serial columns
Следующее
От: Gregor Novak
Дата:
Сообщение: migrating from linux to Windows