[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [OT] PostgreSQL many-to-many relationship
- From: Brian Ashe <rhlist dee-web com>
- To: Chad Skinner <redhat-list redhat com>
- Subject: Re: [OT] PostgreSQL many-to-many relationship
- Date: Mon Jul 1 21:19:05 2002
Hello Chad,
Monday, July 1, 2002, 7:53:41 PM, you textually orated:
CS> I am trying to create a database that has a many-to-many relationship. We
CS> can build the tables without any problems, but I am trying to find out if it
CS> is possible to cascade delete the items in the related fields.
CS> Tables:
CS> a - column_1 (Primary Key)
CS> b - column_2 (Primary Key)
CS> c - fk_a_column_1 (Foreign key to a column_1)
CS> fk_b_column_2 (Foreign key to a column_2)
CS> Is it possible to setup a relationship so that when a record in table a is
CS> deleted its related records in b are deleted as well.
Yes. Look into "Create Trigger" http://www.postgresql.org/idocs/index.php?sql-createtrigger.html
Have fun,
--
_________________________________________________________________
Brian Ashe CTO
rhlist dee-web com Dee-Web Software Services, LLC.
http://www.dee-web.com/
-----------------------------------------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]