Many-to-Many relation - Mailing list pgsql-sql

From Mukta Telang
Subject Many-to-Many relation
Date
Msg-id 3ED20C8D.6EE46DFF@darya.nio.org
Whole thread Raw
Responses Re: Many-to-Many relation
List pgsql-sql
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 authorwith 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


pgsql-sql by date:

Previous
From: Mintoo Lall
Date:
Subject: Using UPPER and TRIM (INDEX usage)
Next
From: "alexandre :: aldeia digital"
Date:
Subject: timestamp field - select error