MEAN Technology(mongodb,express js,angular js,node js) -


in mean technology,i need develop payroll application,in have 2 fields code , name,but code , name should unique,how code in mongodb?

are serious?

but still, mean code , name should unique individually or mean combination of code+name should unique.

there difference, if code , name should unique individually means there cannot same code in 2 different db. if combination should unique means 1 code there different names , vice versa.

i going provide subjective answer haven't shown have tried or wish try.

either user _id code+name making sure unique.

or can have different key code , name in document having unique key indexing on both of them. or in second case having compound unique indexing.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -