94
votes
Accepted
Why is using MySQL for a dictionary website a bad idea?
I can't tell you why it's a bad idea. I can tell you a bunch of reasons why a relational database is a good idea though.
Remember that not everyone consults a dictionary for a definition. More times ...
84
votes
Storing a re-orderable list in a database
Same answer from here https://stackoverflow.com/a/49956113/10608
Solution: make index a string (because strings, in essence, have infinite "arbitrary precision"). Or if you use an int, increment ...
27
votes
When should we use MongoDB?
Basically:
If you can represent your data in a form of a bunch of documents, MongoDB could be a good choice.
If you would rather imagine your data as a bunch of interconnected tables, MongoDB may not ...
27
votes
Why is using MySQL for a dictionary website a bad idea?
If you go with the key-value store (which offers you a more impoverished programming model) and it turns out you need more structure (in your case, say, adding a third language), or you need to do ...
15
votes
Storing a re-orderable list in a database
I have seen people using a self-reference to refer to the previous (or
next) value, but again, it seems like you would have to update a whole
lot of other items in the list.
Why? Say you take a ...
13
votes
Storing a re-orderable list in a database
OK I face this tricky problem recently, and all the answers in this Q&A post gave many inspiration. The way I see it, each solution has its pros and cons.
If the position field has to be ...
12
votes
When should we use MongoDB?
Each technology has its advantages.
The advantages of relational databases is that the RDBMS does some things for you, like:
Enforcing referential integrity ( not allowing the insertion of an ...
11
votes
Why is elastic search popular?
MongoDB is a database. Elasticsearch is a search engine. Since their aims are different, they have different priorities. MongoDB is focused on storing data consistently with good performance and to ...
10
votes
Why is using MySQL for a dictionary website a bad idea?
For a database this small, it's probably not going to make much difference for performance. A standard RDBMS isn't a terrible idea here because presumably, there should be far more reads than writes ...
10
votes
OLTP vs OLAP - MongoDB
With NOSQL dbs you have a completely different paradigm from the way people expected to use relational databases.
NOSQL is very much designed as a persistence layer for an application. So access is ...
9
votes
Accepted
Should backend IDs be public or not on a REST API?
I'm exposing the backend id to the public
What other means do you have to identify your entities when they're returned through a request? That's perfectly legitimate and safer than SSN or similar ...
9
votes
Should backend IDs be public or not on a REST API?
No, as far as the database goes, nothing about the internal structure is exposed to the outside API. ID's have no intelligence. They're not even unique in the real world. ID: 47 is everywhere. There ...
8
votes
Why does MongoDB check for order of keys when matching embedded documents?
Why is this the behavior in MongoDB?
MongoDB documents are stored on the server in a binary format called BSON (short for "Binary JSON"), which is a JSON-like format that supports additional data ...
8
votes
Accepted
Using a relational and a non-relational database in the same project?
For example if I go on a run three times a week for 1 hour there will be 10'800 new records per week, now imagine this with 1000 active users for a year.
Well, let's not imagine, but actually ...
8
votes
Using MongoDB for not scalable application?
Your only(main - post edit) plus for mongo seems to be "So application developers straightaway can start writing the code"
But this must be caused by your current development practices rather than ...
8
votes
Isn't data migration a major benefit of MongoDB compared to the commonly used relational databases?
First, I’d like to rescope the migration benefit that you attribute to nosql in general to the sole segment of document-stores. Because migrating from anything to a row store, a graph database or a ...
7
votes
Inserting JSON document with `.` in key to MongoDB
There are a few alternatives:
1. Replace dots by a dash.
This would be my favorite approach, as it keeps the structure explicit enough.
Since according to you, “it is pretty much a one time ...
7
votes
How do I represent a schema diagram of my MongoDB database?
I would model the schema as a UML class diagram. Class diagrams are not specifically aimed at relational databases, but rather at object oriented environments. In my opinion, MongoDB conceptually ...
6
votes
When should we use MongoDB?
For your particular case, MongoDB sounds like a good choice, but there are plenty of scenarios (probably most of them) where it wouldn't be the best choice.
MongoDB is more suited in scenarios that ...
6
votes
How to handle UI updates dependent on slow API responses
You don't have to block the complete UI before the response comes back. You only have to disable the parts of the UI which allow to make another API call before the first one is processed completely (...
6
votes
generate unique sequential IDs in microservices architecture
Have the microservice that owns the document creation generate the IDs. Having multiple services all accessing the same data-store directly means that they’re not individually deployable and scalable. ...
6
votes
Implementing tags in object
Short answer
It depends on what you intend to do with the tags from an application point of view. If it's just for searching in a single user language, and if the accuracy of the tag is not critical, ...
6
votes
Accepted
Is it necessary to run tests in all environments?
You create tests to prove that something works correctly, and you re-execute those tests to prove that it still works correctly.
For determining if it makes sense to run a particular set of tests in ...
6
votes
Accepted
Isn't data migration a major benefit of MongoDB compared to the commonly used relational databases?
Both processes' simplicity and complexity have been greatly exaggerated, I'm sure the first one (RDBMS) can be both more complex or simpler, depending on a range of factors.
I believe the "every-...
5
votes
How to make a basic database application, previously developed for 500 records, ready for 1 million records?
OK, so answering your question literally, You don't need to make any changes.
The volume of data on the database isn't usually a scaling issue for webpages. Any given webpage will only be looking at ...
5
votes
Accepted
Should I use NoSQL (MongoDB) or SQL (postgresql) database for my application?
There are plenty of questions to consider when choosing the DBMS technology at the beginning of a project. Here are the first two that come to my mind:
How easy can the data be modelled ?
How will ...
5
votes
Accepted
Is it recommended to use schemas on non-relational databases?
Schemaless is a misleading term:
On one side, a SQL database always has a well-defined schema. This schema is fixed. If you want to put more information in a "record", you'd have to alter the ...
4
votes
How to model hashtags with nodejs and mongodb
Store hashtags in an array within a document.
That's the benefit of having documents: you can simply nest them. And, in this particular case, it's trivial:
{
"_id": 123,
"file": "c43a5f46-...
4
votes
Storing a re-orderable list in a database
Yes, the question is rather old and already has a couple of answers. Still, all of the solutions offered here are pretty complex. How about some simpler ones?
The original question is about Wish List ...
4
votes
How to properly store messages in a webservice?
This sounds to me like the same problem you would have storing sub classes in a relational database.
ie. you have an abstract Message class with some common fields, Id, SenderId etc and then ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mongodb × 200database-design × 41
database × 38
node.js × 36
nosql × 34
design × 18
architecture × 15
javascript × 12
mysql × 12
elasticsearch × 11
document-databases × 10
sql × 9
redis × 9
schema × 8
java × 7
mongoose × 7
c# × 6
api × 6
json × 6
postgres × 6
php × 5
python × 5
api-design × 5
microservices × 5
rdbms × 5