Use an ID card identification number or a generated ID from MongoDB to identify users?

I am developing a schema for a simple MongoDB database where there will be a collection for clients.

A natural way to identify a client will be to use their identification number (6 numbers and a letter unique to each person in the country). Another way to do this is to let MongoDB select the value of the _id field and use the map identifier as another field.

Any suggestion on the advantages / disadvantages of selecting a single line with 6 numbers and a letter like _id or a choice and ObjectId created by Mongo?

+4
source share
1 answer

, " () " ". ...

, (.. ObjectIds) - . "" ( ) :

  • . ( ), ? , . .
  • . ,
  • , MongoDB, / API
  • , / . , amazon .

... MongoDB

  • ObjectId : , - . .
+4

Source: https://habr.com/ru/post/1537758/


All Articles