I'm dealing with a set of tables in a database that appear to have a circular relationship (see image). This is the ARTS database if that is of any help to anyone.
A user signing on:
- a) must create a (insert into) session, which in turn needs a SessionStartTransactionID (=SignOnTransaction)
- b) a SignOnTransaction is a type of ControlTransaction
- c) a ControlTransaciton is a type of Transaction
- d) a Transaction needs a reference to an existing Session (along with Operator, etc.)
Note: The Transaction.SessionStartTransactionID,Transaction.OperatorID, and Transaction.WorkStationID (thoese 3 are the composite primary key in Session) cannot be NULL in the Transaction table.
I can't figure out how to create (insert into) SignOnTransaction, or insert into any of the tables mentioned above.
How do you do that in SQL Server? Is that even possible? Where would I start? Thanks!