Relationship Issues

G

Guest

Let me be more specific:
Flight Trans Table : Stores Primary Ticket No and values
Ticket Table : Stores more details on primary ticket no
Sub Ticket Table : Stores details on secondary ticket no associated with
primary ticket no but secondary ticket no is created in this table only

Cancellation Flight Trans Table :cancellation of transactions
Cancellation Ticket Table : cancellation of transactions
Cancellation Sub Ticket Table : cancellation of transactions

Relationships are like this :

Flight Trans Table having Reference Integrity and Cascade delete with Ticket
Table
(one to one on flight ticket series)

Ticket Table having Reference Integrity and Cascade delete with Sub Ticket
Table
(one to many on flight ticket series)

Cancellation Flight trans having only reference integrity with Flight Trans
table on Trans No (one to one)
Cancellation Ticket Level havingonly reference integrity with Ticket Level
table on Trans No (one to one)
Cancellation Sub Ticket Level havingonly reference integrity with Sub Ticket
Level table on Trans No (one to one)

Only in cancellation tables transno is primary field. There;s no primary
field in sales tables.
 
P

Peter Sutton

Let me be more specific:
Flight Trans Table : Stores Primary Ticket No and values
Ticket Table : Stores more details on primary ticket no
Sub Ticket Table : Stores details on secondary ticket no associated with
primary ticket no but secondary ticket no is created in this table only

Cancellation Flight Trans Table :cancellation of transactions
Cancellation Ticket Table : cancellation of transactions
Cancellation Sub Ticket Table : cancellation of transactions

Relationships are like this :

Flight Trans Table having Reference Integrity and Cascade delete with Ticket
Table
(one to one on flight ticket series)

Ticket Table having Reference Integrity and Cascade delete with Sub Ticket
Table
(one to many on flight ticket series)

Cancellation Flight trans having only reference integrity with Flight Trans
table on Trans No (one to one)
Cancellation Ticket Level havingonly reference integrity with Ticket Level
table on Trans No (one to one)
Cancellation Sub Ticket Level havingonly reference integrity with Sub Ticket
Level table on Trans No (one to one)

Only in cancellation tables transno is primary field. There;s no primary
field in sales tables.


Is there a question in there? Any reason for having tables joined one
to one on the same key? I'd suggest combining all the fields in one
table.

P
 
G

Guest

Sorry I failed to mention question :
I have 2 tables : Invoice and Cancellation. They have referential integrity
but not cascade update or cascade delete. But surprisingly when i delete
record from Cancellation, it removes data from invoice? Both are linked on
trans no.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top