![]() But if I needed a FE or mid-tier application dev to magically be an infra person, mongodb starts looking good again. ![]() So, mongodb maybe not Obsolete (it's popularity would attest otherwise if nothing else), but id take a better option if I were able. Pg/jsonb is powerful, and if you have someone willing to be a db admin postgres is extremely powerful. The data type JSON and JSONB, as defined by the PostgreSQL documentation, are almost identical the key difference is that JSON data is stored as an exact copy of the JSON input text, whereas. They follow the ordering rules for B-tree operations outlined at. In addition, the usual comparison operators shown in Table 9.1 are available for jsonb, though not for json. The standard comparison operators shown in Table 9-1 are available for jsonb, but not for json. And once you're at medium to large, the mongodb pain of transactions as a second class citizen, lack of data integrity options, schema fluidity, and overall less strict structuring makes Pg much more appealing. Processing and Creating JSON Data Table 9.45 shows the operators that are available for use with JSON data types (see Section 8.14 ). And imo there aren't that many hardcore document only problems at the small or even medium size. That said, for the aforementioned side project, a few nights got me the basic pieces of the API in place (next big step is the aggregation pipeline, which id argue is intermediate for mongodb and much less used), so it's not hard to adapt a codebase to pg/jsonb. Those two things mean you _can_ move faster than with postgres (with the same relative amount of knowledge) ![]() Also, operationally, mongodb is easier to run, between Atlas and having more clustering capabilities available for "easy". This functionality was added in versions 9.2 and 9.4 that are unsupported now. the mongodb API is the defacto "standard" API for document dbs as far as I can tell, and realistically SQL is a notable barrier for application devs. For a long time PostgreSQL supports JSON fields and can even index them. for a problem thats truly document oriented workloads mongodb still seems more efficient, if not in literal performance then in scope and understandability. PostgreSQL has rich, built-in support for storing JSON columns and efficiently performing complex queries operations on them. I guess I've also got a few nights on a project to make a mongodb compliant API for postgres jsonb in python. 1 Postgresql version: PostgreSQL 13.5 alter table accounts add tags jsonb default ' '::jsonb not null select DISTINCT AC. My background here is just a user of both, nothing too deep or profound.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |