Skip to main content

Document Versioning for MongoDB

  • Conference paper
  • First Online:
New Trends in Database and Information Systems (ADBIS 2022)

Abstract

Data versioning is required in various business and science contexts, including governance, risk and compliance (GRC) and is essential for security audits, legal compliance and business strategy development. We present a data versioning library for MongoDB to support an innovative enterprise resource planning (ERP) system for small and medium enterprises (SMEs) which aims to be flexible and adapt to changing business needs. We exploit the fact that the volume of archival data is orders of magnitude larger than of the currently valid documents and that historic data is rarely accessed. Experiments with eight sets of 1 million mutations/queries on 100K of valid documents (average size 2.3 kB), carried out over a period of 60 h on a local PC show stable average versioning write/read operation performance per document in the range of 12.3/1.2 ms which proves that the solution is viable in an SME scenario.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. pier4all AG (Ltd.): enablerr - the revolutionary business solution (2021). https://www.enablerr.ch/en/

  2. Amazon Web Services, I.: Amazon simple storage service user guide, API v. 2006–03-01 (2006). https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-userguide.pdf

  3. Bayoudhi, L., Sassi, N., Jaziri, W.: A survey on versioning approaches and tools. In: Abraham, A., Piuri, V., Gandhi, N., Siarry, P., Kaklauskas, A., Madureira, A. (eds.) ISDA 2020. AISC, vol. 1351, pp. 1155–1164. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-71187-0_107

    Chapter  Google Scholar 

  4. Bernstein, P.A., Goodman, N.: Multiversion concurrency control-theory and algorithms. ACM Trans. Database Syst. 8(4), 465–483 (1983)

    Article  MathSciNet  Google Scholar 

  5. Chien, S.Y., Tsotras, V.J., Zaniolo, C.: XML document versioning. . SIGMOD Rec. 30(3), 46–53 (2001)

    Article  Google Scholar 

  6. Cioranu, C., Cioca, M.: Database versioning, a transparent SQL approach. J. Mobile Embedded Dist. Syst. 5, 1–5 (2013)

    Google Scholar 

  7. Cioranu, C., Cioca, M., Novac, C.: Database versioning 2.0, a transparent SQL approach used in quantitative anagemment and decision making. Proc. Comput. Sci. 55, 523–528 (2015)

    Google Scholar 

  8. Coupal, D., Alger, K.W.: Building with Patterns: The Document Versioning Pattern (2019). https://www.mongodb.com/blog/post/building-with-patterns-the-document-versioning-pattern

  9. De Espona, L.C.: Data Versioning Experiment Repository (2021). https://github.com/pier4all/data-versioning

  10. De Espona, L.C.: Versioning Module MongoDB (2021). https://www.npmjs.com/package/mongoose-versioned

  11. De Espona, L.C.: Versioning MongoDB Repository (2021). https://github.com/pier4all/mongoose-versioned

  12. Felber, P., et al.: On the Support of Versioning in Distributed Key-Value Stores. In: IEEE International Symposium on Reliable Distributed Systems- SRDS, pp. 95–104 (2014)

    Google Scholar 

  13. Ferrada, H., Navarro, G.: A lempel-Ziv compressed structure for document listing. In: Kurland, O., Lewenstein, M., Porat, E. (eds.) SPIRE 2013. LNCS, vol. 8214, pp. 116–128. Springer, Cham (2013). https://doi.org/10.1007/978-3-319-02432-5_16

    Chapter  Google Scholar 

  14. ISO: Industrial automation systems and integration - Part 2: Data model, ISO 15926–2:2003. ISO (2003)

    Google Scholar 

  15. Jin, X., Agun, D., Yang, T., Wu, Q., Shen, Y., Zhao, S.: Hybrid Indexing for Versioned Document Search with Cluster-Based Retrieval. In: CIKM 2016, pp. 377–386. ACM (2016)

    Google Scholar 

  16. LearnBoost: Mongoose (2010). https://www.npmjs.com/package/mongoose

  17. Maddox, M., Goehring, D., Elmore, A.J., Madden, S., Parameswaran, A., Deshpande, A.: Decibel: the relational dataset branching system. Proc. VLDB Endow. 9(9), 624–635 (2016)

    Article  Google Scholar 

  18. Mitchell, S.L.: GRC360: a framework to help organisations drive principled performance. Int. J. Discl. Gov. 4(4), 279–296 (2007)

    Article  MathSciNet  Google Scholar 

  19. MongoDB I: BSON Types (2021). https://docs.mongodb.com/manual/reference/bson-types

  20. MongoDB I: MongoDB (2021). https://www.mongodb.com

  21. OpenCollective: Mongoose API model (2022). https://mongoosejs.com/docs/api/model.html

  22. OpenCollective: Mongoose API Query (2022). https://mongoosejs.com/docs/api/query.html

  23. Phungtua-Eng, T., Chittayasothorn, S.: Slowly changing dimension handling in data warehouses using temporal database features. In: Nguyen, N.T., Gaol, F.L., Hong, T.-P., Trawiński, B. (eds.) ACIIDS 2019. LNCS (LNAI), vol. 11431, pp. 675–687. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-14799-0_58

    Chapter  Google Scholar 

  24. Planz, T.: Vermongo: Simple Document Versioning with MongoDB (2012). https://github.com/thiloplanz/v7files/wiki/Vermongo

  25. Poess, M., Floyd, C.: New TPC benchmarks for decision support and web commerce. SIGMOD Rec. 29(4), 64–71 (2000)

    Article  Google Scholar 

  26. Pustulka, E., von Arx, S., Espona, L.: Building a NoSQL ERP. In: ICICT 2022. Springer (2023). https://doi.org/10.1007/978-981-19-1610-6_59

  27. Roddick, J.F.: Schema versioning. In: Liu, L., Ă–zsu, M.T. (eds.) Encyclopedia of Database Systems, 2nd edn. Springer, Cham (2018). https://doi.org/10.1007/978-1-4614-8265-9_323

  28. Schüle, M.E., Schmeißer, J., Blum, T., Kemper, A., Neumann, T.: TardisDB: extending SQL to support versioning. In: SIGMOD/PODS 2021, pp. 2775–2778. ACM (2021)

    Google Scholar 

  29. Sevilla Ruiz, D., Morales, S.F., García Molina, J.: Inferring versioned schemas from NoSQL databases and its applications. In: Johannesson, P., Lee, M.L., Liddle, S.W., Opdahl, A.L., López, Ó.P. (eds.) ER 2015. LNCS, vol. 9381, pp. 467–480. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-25264-3_35

    Chapter  Google Scholar 

  30. de Sompel, H.V., Sanderson, R., Nelson, M.L., Balakireva, L., Shankar, H., Ainsworth, S.: An HTTP-based versioning mechanism for linked data. In: Workshop on Linked Data on the Web, LDOW, vol. 628. CEUR-WS.org (2010)

    Google Scholar 

  31. Soules, C.A.N., Goodson, G.R., Strunk, J.D., Ganger, G.R.: Metadata efficiency in versioning file systems. In: FAST 2003, pp. 43–58 (2003)

    Google Scholar 

  32. Staff, C.: A Second Conversation with Werner Vogels. Commun. ACM 64(3), 50–57 (2021)

    Article  Google Scholar 

  33. Stonebraker, M., Rowe, L.A.: The design of POSTGRES. In: SIGMOD 1986, pp. 340–355. ACM (1986)

    Google Scholar 

  34. Störl, U., Klettke, M., Scherzinger, S.: NoSQL schema evolution and data migration: state-of-the-art and opportunities. In: EDBT 2020, pp. 655–658 (2020)

    Google Scholar 

  35. Sutunc, M.: Vermongo Mongoose Plugin (2016). https://www.npmjs.com/package/mongoose-vermongo

  36. Team, C.: How to : Implement Document Versioning with Couchbase (2013). https://blog.couchbase.com/how-implement-document-versioning-couchbase/

  37. TPC: TPC BenchmarkTM H Standard Specification Revision 3.0.0. TPC (2022). https://www.tpc.org/tpc_documents_current_versions/pdf/tpc-h_v3.0.0.pdf

  38. Vogt, M., Stiemer, A., Coray, S., Schuldt, H.: Chronos: the swiss army knife for database evaluations. In: EDBT 2022, pp. 583–586 (2020)

    Google Scholar 

Download references

Acknowledgements

We acknowledge funding from www.innosuisse.ch, grant 44824.1 IP-ICT.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lucia de Espona Pernas .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

de Espona Pernas, L., Pustulka, E. (2022). Document Versioning for MongoDB. In: Chiusano, S., et al. New Trends in Database and Information Systems. ADBIS 2022. Communications in Computer and Information Science, vol 1652. Springer, Cham. https://doi.org/10.1007/978-3-031-15743-1_47

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-15743-1_47

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-15742-4

  • Online ISBN: 978-3-031-15743-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics