-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
Affects Version/s: 3.0.5
-
Component/s: Sharding
-
Cluster Scalability
-
(copied to CRM)
Hi Team,
Say, we are having two collections named "Students" & "Department" and in "Students" collection we are having the reference of department using the departmentID and each department is having more or less equal number of students. As "Students" collection is having more number of data, I am planning to shard/partition the same with respect to departments to maintain equal distribution and my queries will be modified to include the shard key also. In this case anyhow, I need to maintain uniqueness of "studentID". But unfortunately, currently our MongoDB is not supporting the same. We need to handle the same through application.
Please consider this scenario in your future builds.
Adding to this point, the following comments from your Chairman (Dwight Merriman) regarding maintaining the referenceIDs as the shard keys in both the collections to enable join-like sementics in future, clearly indicates that we need this option.
"It's possible there will be some join-type features in mongodb in the future that have a restricted scope – for example if you sharded all the customer data and orders on customer id, and all those documents are on the same partition, the problem then goes away for that scope."