[15:45:24] <Peasant65> Hey! I'm trying to dertermine when to use mongo (or other dbms like it) instead of sql (postgre, mssql, mysql etc) and I came across postgre's json datatype.
[15:46:14] <Peasant65> I'm wondering, what's keeping me from using postgre as a document store like mongo, while keeping the referential and integrity functions for schemafull data ?
[15:46:48] <Derick> because PosGreSQLs JSONB type is nowhere near as capable as having native Documents in a database like MongoDB does
[15:47:30] <Peasant65> What do you mean by that? In what aspects is mongo more capable ?
[15:52:45] <Peasant65> Derick: Could you elaborate? :)
[15:54:12] <Derick> MongoDB and JSON go together, it's not bolted on
[15:55:19] <Peasant65> That's definately true, but I'm searching for real-world implications and possibly performance penalties of each
[15:56:01] <Derick> That's a very long answer, which I right now don't have the time for. I am looking for an article that I read on it, but can't find now
[15:57:12] <Derick> the queyring capabilities of MongoDB's documents is a lot more richers than queries into the JSONB PGSQL type
[16:01:17] <Peasant65> Derick: Pls correc me if im wrong, but mongo is built to store schemaless data, or data that we don't know the structure of. Advanced quering features wouldn't be nesseecary in this case. While structured data is better stored in a reletional store like sql.
[16:02:19] <Peasant65> What I read on the net led me to believe that mongo has less query functionality because it's less reletional. Making a tradeoff between speed and function
[16:02:57] <Derick> I find that the MongoDB query language, especially with the Aggregation Framework taking into account, much richer than just SQL
[17:18:28] <bmbouter> I have a document that is > 16MB
[17:20:14] <Derick> bmbouter: you can't store that, so how can you delete it?
[17:21:07] <bmbouter> it thinks it's stored mongodb won't start and emits
[17:21:43] <bmbouter> Assertion: 10334:BSONObj size: 778400609 (0x6173652E) is invalid. Size must be between 0 and 16793600(16MB) First element: nits_repository.$repo_id_1: ?type=117
[17:22:21] <Derick> a document that's 778MB? Do you have any idea how that could have happened?
[17:22:33] <Derick> did you get a sudden disk failure, or power failure or something like that?
[17:23:55] <bmbouter> something like that must have happened
[17:24:34] <bmbouter> I have a duplicated system restored to test on already too
[17:24:58] <Derick> then, you need to repair the database: https://docs.mongodb.com/manual/tutorial/recover-data-following-unexpected-shutdown/#start-mongod-with-repair
[17:25:34] <Derick> and keep fingers crossed it's only one document :-/
[17:25:49] <bmbouter> Derick: thank you, I will try
[21:36:18] <KettleCooked> Hi, need help with a seemingly basic but extremely tricky thing. Using nodejs, mongoose. I have a Schema, "List". Has an array of ObjectId refs to another schema "Level". Now, I want to sort my Levels in the List. So I add property "order" to my Levels, unique index number. Starts at 1 and increments on each Level created.
[21:36:53] <KettleCooked> Since iẗ́s unique, I can't update it to a sibling position. Do I simply have to remove the uniqueness?