William Blunn writes:
> On 07/11/2013 13:03, Smylers wrote:
>
> > That is, if there is a record for document_id = 3846, version = 6
> > then there should also be records for version 1 to 5 of that
> > document ID. Is there a way of enforcing that at the DB level?
> > We're using Postgres,
William Blunn writes:
> On 07/11/2013 13:03, Smylers wrote:
>
> > A purchase consists of ordering one product from a supplier. Each
> > product is only available from a single supplier. So a record in
> > the purchase table just needs to store a product ID, and by
> > linking through the
On 07/11/2013 13:03, Smylers wrote:
A purchase consists of ordering one product from a supplier. Each
product is only available from a single supplier. So a record in the
purchase table just needs to store a product ID, and by linking
through the product table that defines the supplier t
I don't know much about Russian.
But I have heard about Ruski's Tavern re-opening, so if you fancy some Russian
flavour, you can try there, =).
www.ruskis.com
1 Kensington High Street.
On 07/11/2013 13:03, Smylers wrote:
That is, if there is a record for document_id = 3846, version = 6
then there should also be records for version 1 to 5 of that document
ID. Is there a way of enforcing that at the DB level? We're using
Postgres, if that makes a difference.
Instead of
On Postgres and triggers. You can have them to run at any time you want:
http://www.postgresql.org/docs/9.1/static/sql-createtrigger.html
On 11/07/2013 01:28 PM, Abigail wrote:
I'm not familiar with Postgres, but I've used triggers to enforce
business rules like this in the past (using Sybase). In Sybase,
triggers are run before a transaction is committed, and you can
rollback a transaction frow within a trigger.
On an insert, yo
On Thu, Nov 07, 2013 at 01:03:00PM +, Smylers wrote:
> Hello. I'm designing a database schema, and am interested in any wisdom
> folk can share over a few aspects of it:
>
> • A document can have versions. There's a document table and a
> document_version_contents table, where each document_
Hello. I'm designing a database schema, and am interested in any wisdom
folk can share over a few aspects of it:
• A document can have versions. There's a document table and a
document_version_contents table, where each document_version_contents
record references document.id and has a version