Skip to main content

All Questions

Tagged with
0 votes
1 answer
41 views

Does a compound index where the prefix field is unique make any sense?

Let's take the field _id, which is unique across the collection. Does it make any sense to have any compound index where _id is the prefix eg: { _id: 1, A: 1 } Would the index above be any more ...
Bear Bile Farming is Torture's user avatar
0 votes
2 answers
764 views

Is $lookup from MongoDB slower than a join in a SQL database, with indexes involve?

db.inventory.aggregate( [ { $lookup: { from: "order", localField: "_id", foreignField: "item_id", as: "...
Bear Bile Farming is Torture's user avatar
0 votes
1 answer
84 views

Data modelling - Nested object vs Separate DB Table

I'm designing Sticky notes Management Application (CRUD), where StickyNote has 3 attributes, heading, summary and task list. The task has 2 attributes - heading and summary. A sticky note can have ...
Caffeine Coder's user avatar
1 vote
2 answers
2k views

The best choice for database for large datasets [closed]

I'm about to start a new project which should have a rather large database. the records have roughly up to 10 fields , these datas will have following specifications : Only insert and read records ...
Amir Doreh's user avatar
  • 1,429
0 votes
0 answers
27 views

If ObjectId is stored in _id field, is there any reason to still have a timestamp field?

THe ObjectId captures the date and time the document is created. So what reason is there to still have the timestamp field?
Bear Bile Farming is Torture's user avatar
-1 votes
1 answer
138 views

Draw ERD for a project using SQL + NoSQL databases [closed]

For my graduation project, I need to draw a ERD to combine 2 databases, SQL for authentication and NoSQL for other data like articles and posts and tasks. How can I specifically display relationships ...
heehounknown's user avatar
1 vote
1 answer
267 views

How can I find matching elements in an array using CouchDB's Mango selector?

How can I find selected only elements included value during array elements using CouchDB's Mango API? I tried $elemMatch, but I didn't get the result I wanted Document { "id": &...
K JH's user avatar
  • 29
0 votes
1 answer
125 views

How do these database management systems practically behave during a network partition?

I am looking into deploying a database management system, replicated across regions (various data centers across a country). I am currently looking into the following candidates: MongoDB (NoSQL, CP ...
mitchkman's user avatar
  • 6,570
0 votes
1 answer
27 views

How to optimize this query in mongodb?

I have a query like below in MongoDB. a = xml_db.find( { 'crawl_id': crawl_id, 'low_performer': { '$nin': [source] } } ).hint('crawl_id_low_performer_index') print(a.count()) ...
Ahasanul Haque's user avatar
0 votes
1 answer
33 views

Which database should I use to store in real time my exact location from an Android application and then display it in my website (tracking system)?

I'm kind of new at backend development, and I should to create a website (tracking) display the location of my phone, this location I have to retrieve from an android application. My question is which ...
salsabil otaku's user avatar
2 votes
1 answer
174 views

In MongoDB, what is the purpose of embedded documents if the same thing can be achieved without using them?

For example Instead of a field named, COLUMN_1, that holds an embedded document with fields A, B, and C. Why not 3 separate fields with names COLUMN_1_A, COLUMN_1_B, COLUMN_1_C.
Bear Bile Farming is Torture's user avatar
0 votes
1 answer
84 views

Query free booking based on time window and duration from MONGODB

I have the following problem for which I am looking for a solution. I have a table in my database with the following structure: id Date 07:00 07:30 08:00 08:30 09:00 09:30 10:00 10:30 1 2022-02-01 0 ...
schwaluck's user avatar
  • 145
-1 votes
1 answer
22 views

How does MongoDB keep a numeric column, which is indexed, always sorted if the column is constantly updated?

What happens after an update to this column is made? What does MongoDB do? What is the time-complexity to keep this column sorted after each update?
Bear Bile Farming is Torture's user avatar
0 votes
0 answers
125 views

In MongoDB, What is the time complexity of this query?

There is a table of M rows, with a column which records the date and time the row was updated and a numeric column to record the SCORE of this row. QUERY: Find the X most recently updated rows and ...
Bear Bile Farming is Torture's user avatar
0 votes
1 answer
807 views

Is the time complexity of querying an indexed column O(1)?

Let's suppose that table A has a column named X which is numeric and indexed. If the query is something like: find all rows where X is greater than some value Is the time complexity of retrieving the ...
Bear Bile Farming is Torture's user avatar

15 30 50 per page
1
2 3 4 5
11