MySQL best approach for db normalising, relationships and foreign keys

前端 未结 3 1265
感情败类
感情败类 2021-01-26 04:04

There is an username/password verification step first then the database has following structure

^ is primary key

* uses foreign key


1.StudentDetails table
===         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-26 04:25

    option 1:
    enter the adress data first, and use that id when createing the row in StudentDetails

    option 2:
    change the field StudentDetails.Address so its allow NULL valus, enter the StudentDetails, then the adress, and then update the StudentDetails.Address

提交回复
热议问题