From: Mukta Telang <mukta@darya.nio.org>
To: pgsql-sql@postgresql.org
Subject: Many-to-Many relation
Date: Mon, 26 May 2003 12:46:05 +0000
Message-ID: <3ED20C8D.6EE46DFF@darya.nio.org> (raw)
Hi,
I am designing a database of paper publications.
A paper has one or more authors and an author has one or more papers.
In this way there is many-to-many relation.
An author of a paper has a "level", that is an author of a paper of
level one is the main author of the paper and the author
with level two is the second author of the paper and so on.
So we have following tables:
1. author
2. paper
3. author_paper
The attributes of author are:
1. author_id
2. name
The attributes of paper are:
1. paper_id
2. journal
3. year
4. volume
5. issue
The attributes of author_paper are:
1. author_id
2. paper_id
3. level
Now I want to create a view which displays all the information about
every paper.That is title,year,journal,volume, issue and all the authors
of the paper sorted according to their level.
How to do this?
Thanks in advance,
Mukta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mukta@darya.nio.org
Subject: Re: Many-to-Many relation
In-Reply-To: <3ED20C8D.6EE46DFF@darya.nio.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox