The inserted data is new and will not be overwritten. However, if the primary key is set to be unique, an error will be reported when inserting the same primary key. When the auto-incrementing primary key is not used, in order to ensure uniqueness, UUID/GUID is usually used instead
1. The primary key is unique. If they are the same, an error will be reported when inserting data. 2. You can use a composite primary key. I suggest you read a book on databases.
The inserted data is new and will not be overwritten. However, if the primary key is set to be unique, an error will be reported when inserting the same primary key. When the auto-incrementing primary key is not used, in order to ensure uniqueness, UUID/GUID is usually used instead
1. The primary key is unique. If they are the same, an error will be reported when inserting data. 2. You can use a composite primary key. I suggest you read a book on databases.