Re: Invoice Table Design

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Invoice Table Design
Date: 2016-11-24 16:11:05
Message-ID: alpine.LNX.2.11.1611240802320.16527@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 24 Nov 2016, Robert Heinen wrote:

> A quick intro -- I'm helping a company switch from a mongo database over
> to postgresql (yay!). The company is a marketplace app for musicians and
> hosts. The basic idea is that a host can book a musician for an event,
> like a wedding or a birthday. Also, an artist and a host can be either
> basic or "pro" accounts -- if they're "pro" then they pay a little bit
> more and get some extra features.

Bob,

I suggest you go back to first principles of database design. Start with a
list of all the information needed by the company, artists, audiences, etc.
Just list every item, regardless of type or to whom it belongs. Forget the
original database as it will only continue to confuse you.

One you have listed every item of information, start normalizing by
collecting similar items into a group. As examples, account type (pro,
amateur); musicians (name, account_type, contact_information), hosts (name,
perferred_music_type, contact_information); musician_rates (many-to-many
table of musician name, account_types, and rates); etc. You can find good
references in books or on-line on how to normalize data. Look at Joe Celko's
books; they're very helpful.

Only you and your client know just what's needed. This approach will open
your client to data/information they need that is not provided by their
current software and will provide you the basis for designing the postgres
schemas.

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vladimir Rusinov 2016-11-24 16:19:03 Re: Extension compatibility between postgresql minor version
Previous Message Melvin Davidson 2016-11-24 15:50:24 Re: Invoice Table Design