我有两张桌子:
script:
- idScript (Primary Key)
- idEnvironment (foreign key)
UAA:
- idUser (Primary Key)
- idEnvironment (Primary key)
- idPaper (Primary Key)
所以,我之间有一个mxn关系,得到这个表:
UAAwithScript:
- idUser (Primary Key)
- idEnvironment (Primary Key)
- idPaper (Primary Key)
- idScript (Primary Key)
如何确保脚本和UAA中的idEnvironment
相同?提供它的最佳方式是什么?