Why can't there be a Database tool that has the best of everything?

  • Thread starter SlurrerOfSpeech
  • Start date
  • Tags
    Database
In summary: Cosmos DB does not have that luxury. So if you want to represent one-to-many relationships in documents, you'll need to come up with a way to do that. Document sizes are capped at 2MB. This means I can't represent one-to-many foo-bars in documents unless I'm sure there aren't too many bars with each foo.This is not an issue with Cosmos DB, but with most other databases. If you need to store more data than is allowed, you'll have to find a way to store the data elsewhere.
  • #1
SlurrerOfSpeech
141
11
Having worked with both SQL Server and Cosmos DB (more the former), the following are the biggest pain points I've experienced with each.

SQL Server:
  • Complicated to make it work. There are 100+ different ways to authenticate, for example. All this complicated User-Role mapping, Managed Identity, Multiple Activity Result Sets, blah blah.
  • Syntax is bulky and complicated, even for simple things. Inserting test data means I have to examine the schema, triggers, constraints, etc. of multiple tables, then insert into each one in a specific order, sometimes temporarily dropping constraints, etc.
  • Lots of annoying things about working with it locally. Like if you have both SQL Server 2016 and Sql Server 2012 installed, you have to figure out which one is localhost, and stuff like that.
Cosmos DB (a schema-less, document database):
  • "Schema-less" is not as practical as it sounds. The business entities you're representing with documents will change over time, so now you have to come up with a strategy to handle missing/extra properties on your documents.
  • Document sizes are capped at 2MB. This means I can't represent one-to-many foo-bars in documents unless I'm sure there aren't too many bars with each foo.
  • The "DB" itself is not infinitely scalable. You can scale up Collections finitely (up to 10k requests/second) and scale them out infinitely. But you have to come up with a strategy and write code to create new collections on-the-fly and balance the load. I don't understand how this is any different than scaling SQL Server by creating new databases.
A DB I would like to have:
  • Simple plug-and-play
  • I can define an entity in JSON and it can be arbitrarily large and I can insert it to this DB
  • I can query entities of a specific type (I don't require that it needs to be fast)
  • I can keep throwing entities at it and it will do any scaling automatically
Why doesn't something like this exist? CAP Theorem limitation?
 
Last edited by a moderator:
Technology news on Phys.org
  • #2
Well you could try H2 Database? Its designed to be more an application specific database and supports SQL pretty well.

h2database.com

It can run standalone with a sql command session and has a web interface so you can work with your tables too or it can run embedded within an application with other apps able to connect to it.

Some folks have used it in microservice apps with docker.
 
  • Like
Likes QuantumQuest
  • #3
You can use tools to make managing sql much easier. I recommend liquibase.

Also, for test data, wouldn’t it be much easier to create a csv and have a script create the inserts of your test data?
 
  • Like
Likes QuantumQuest and FactChecker
  • #4
It's true that setting up a local test environment for SQL Server can be challenging, but once I get it set up and can do the programming, I've been extremely happy with the T-SQL language and programming environment, expecially with enhancements since 2012 and beyond.

Yes, dealing with triggers and constraints is a little cumbersome when inserting data--but those are what keep your data uncorrupted when there are multiple users who may not understand why those are there. Trust me, you want them. You really do.
 
  • Like
Likes QuantumQuest
  • #5
Syntax is bulky and complicated, even for simple things. Inserting test data means I have to examine the schema, triggers, constraints, etc. of multiple tables, then insert into each one in a specific order, sometimes temporarily dropping constraints, etc.
A comment:
This sounds like more of a schema setup problem. I do not know what you did, but I do not encounter problems like what you describe very often, and I am definitely not a DBA. You probably accidentally violated some basic principles. See if you can find an existing functioning schema for some simple requirements, play with it. Then read through the objects, constraints, etc to see how it was defined.
Here is some help:


PS: there is no "best" db, just the one you can use well and that meets your needs. This is the reason there are a lot of different db's out there.
 
  • #6
SlurrerOfSpeech said:
Inserting test data means I have to examine the schema, triggers, constraints, etc. of multiple tables, then insert into each one in a specific order, sometimes temporarily dropping constraints, etc.
I don't have experience with SQL Server nor Cosmos DB, but that sounds more about a misuse of triggers and constraints.

Why would need to examine triggers & constraints? Their purposes is to automate data manipulation such that you DON'T have to examine multiple columns/tables when inserting, updating or deleting data in one table.

And why would you need to temporarily drop a constraint when inserting data? Then why is there a constraint in the first place? You are either misusing them or you don't insert your data in the proper order.
SlurrerOfSpeech said:
I can define an entity in JSON and it can be arbitrarily large and I can insert it to this DB
With MySQL/MariaDB, you can make routines that will manipulate JSON objects.
 
  • Like
Likes jim mcnamara

1. Why can't a database tool have all the best features from different tools?

Creating a database tool with all the best features from different tools is a complex and challenging task. Different database tools have their own unique features and functionalities, and integrating them all into one tool would require a huge amount of time, resources, and expertise. It is also important to consider compatibility issues and potential conflicts between different features.

2. Can't developers just combine the features from different database tools into one?

Combining features from different database tools is not as simple as it may seem. Each tool is built on a specific framework and using different programming languages, and merging them together can result in a lot of conflicts and errors. Additionally, database tools often have complex and interconnected features, making it difficult to isolate and merge specific features without affecting the overall functionality of the tool.

3. Why don't companies invest in creating a database tool with all the best features?

Developing a database tool with all the best features from different tools is a significant investment in terms of time, resources, and expertise. Companies may not see it as a feasible option, especially if there is already a market for existing tools. Furthermore, there is no guarantee that such a tool would be successful in the market, making it a risky investment for companies.

4. Are there any downsides to having a database tool with all the best features?

While having a database tool with all the best features may seem ideal, there are potential downsides to consider. One major downside is the complexity of the tool, which can make it difficult for users to navigate and utilize all the features effectively. It can also lead to a higher learning curve and the need for additional training, which can be time-consuming and costly.

5. Is it possible for a database tool to have all the best features in the future?

As technology continues to advance, it is possible that we may see a database tool with all the best features in the future. However, it is important to keep in mind that the development of such a tool would still face challenges and limitations, and it may not be a practical or feasible option for companies to invest in. It is more likely that we will see continuous improvements and advancements in existing database tools, rather than one tool with all the best features.

Similar threads

  • Programming and Computer Science
2
Replies
50
Views
4K
  • Programming and Computer Science
Replies
5
Views
2K
Replies
1
Views
3K
Replies
1
Views
788
  • Art, Music, History, and Linguistics
Replies
12
Views
2K
  • General Math
Replies
3
Views
5K
  • Quantum Interpretations and Foundations
Replies
25
Views
997
  • Computing and Technology
Replies
1
Views
2K
  • High Energy, Nuclear, Particle Physics
Replies
4
Views
2K
Back
Top