Re: Table Relationships

Поиск
Список
Период
Сортировка
От Victor Yegorov
Тема Re: Table Relationships
Дата
Msg-id 20030530101009.GD23596@nordlb.lv
обсуждение исходный текст
Ответ на Table Relationships  (Jeandre du Toit <jeandre@itvs.co.za>)
Ответы Re: Table Relationships  (Andreas Kostyrka <andreas@mtg.co.at>)
Список pgsql-performance
* Jeandre du Toit <jeandre@itvs.co.za> [30.05.2003 12:57]:
>
> What are the advantages to having a database relational? I am currently
> discussing the design of a database with some people at work and they
> reckon it is best to create one table with and index and all the data
> instead of normalizing the database. I think that they think that joining
> tables will slow down retrieval, is this true?
>

Take a look at situation from another side.

Let's say: You own a store and have 3 customers and 5 products on your
store. All you going to keep in DB is track of all purchases.

So, each time a customer will by a product, an new record will be added.
What this means:

1. Customer's name will be repeated as many times, as many purchases he had
   made. The same for each of products. In real world, you'll have about
   10,000 customers and about 100,000 products. Do you have enoght space on
   your disks to store all that stuff?

2. Some of your customers decided to change it's name. What you're going to
   do? If you're going to insert new purchases of that customer with he's new
   name, then in all turnover reports you'll have to specify both:
   old name and new one. If he will hange his name again - again, all
   reports are to be updated.

There is much more stuff to read about Relational Data Model in books.

About slowing down retrieval of data: all efforts today are put to speed up
things. You should think about your convenience in data manipulation.


I suggest you should try both: one huge table, and a set of normalized
tables and compare, what is quicker and what is easier to use.

--

Victor Yegorov

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

Предыдущее
От: Jeandre du Toit
Дата:
Сообщение: Table Relationships
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Table Relationships