Avatar of blacknight-rh
Recommends
on
JavaScriptJavaScript

am not familiar with webflow, but is there any error that appears in ur console? r u sure u imported all files correctly?

READ MORE
6 upvotes·1 comment·27.7K views
gia benezis
gia benezis
·
August 6th 2022 at 9:07PM

Thanks. Sure (

·
Reply

I have a project (in production) that a part of it is generating HTML from JSON object normally we use Microsoft SQL Server only as our main database. but when it comes to this part some team members suggest working with a NoSQL database as we are going to handle JSON data for both retrieval and querying. others replied that will add complexity and we will lose SQL Servers' Unit Of Work which will break the Atomic behavior, and they suggest to continue working with SQL Server since it supports working with JSON. If you have practical experience using JSON with SQL Server, kindly share your feedback.

READ MORE
5 upvotes·55.1K views
Replies (2)
Software Engineer III ·

I agree with the advice you have been given to stick with SQL Server. If you are on the latest SQL Server version you can query inside the JSON field. You should set up a test database with a JSON field and try some queries. Once you understand it and can demonstrate it, show it to the other developers that are suggesting MongoDB. Once they see it working with their own eyes they may drop their position of Mongo over SQL. I would only seriously consider MongoDB if there was no other SQL requirements. I wouldn't do both. I'd be all SQL or all Mongo.

READ MORE
4 upvotes·32.1K views
Principal Software Engineer at Accurate Background·

I think the key thing to look for is what kind of queries you're expecting to do on that JSON and how stable that data is going to be. (And if you actually need to store the data as JSON; it's generally pretty inexpensive to generate a JSON object)

MongoDB gets rid of the relational aspect of data in favor of data being very fluid in structure.

So if your JSON is going to vary a lot/is unpredictable/will change over time and you need to run queries efficiently like 'records where the field x exists and its value is higher than 3', that's a great use case for MongoDB.

It's hard to solve this in a standard relational model: Indexing on a single column that has wildly different values is pretty much impossible to do efficiently; and pulling out the data in its own columns is hard because it's hard to predict how many columns you'd have or what their datatypes would be. If this sounds like your predicament, 100% go for MongoDB.

If this is always going to be more or less the same JSON and the fields are going to be predictably the same, then the fact that it's JSON doesn't particularly matter much. Your indexes are going to approach it similar to a long string.

If the queried fields are very predictable, you should probably consider storing the fields as separate columns to have better querying capabilities. Ie if you have {"x":1, "y":2}, {"x":5, "y":6}, {"x":9, "y":0} - just make a table with an x and y column and generate the JSON. The CPU hit is worth it compared to the querying capabilities.

READ MORE
2 upvotes·1 comment·43.3K views
Yves Basquet
Yves Basquet
·
January 29th 2022 at 6:38AM

Hi Blacknight. If your single motivation is to store JSON, don't bother and continue with SQL Server.

When it comes to MongoDB, the true power is getting out of the standard relational DB thinking (a MongoDB collection is very different to a SQL Server table).

It takes a while to shift, but when you have and you realise the power and freedom you get (to basically store the data in the most adhoc form for your need), you'll never go back to SQL Server and relational.

·
Reply

Which option do you prefer to go with (considering scalability, and a limited budget):

Technologies in use: Angular / .NET Core 6

What do we want to achieve?

We want to create simple near-time web notifications, those notifications can be categorized into 2 sections:

  • User notification: which represents user activities and engagements.

  • System notification e.g release notes and maintenance time. The notification object is too simple just a title, body, userId, notificationStatus, and readAt. notification status is an enum with 3 values: unread, menuOpened, Read.

Options:

  1. use Firebase Realtime Database for user notifications and Microsoft SQL Server for system notifications (maybe using long poling or so to frequently call the getSystemNotification API ).

  2. use SignalR to push new notifications along with the SqlServer database and store both user and system into one table (as they almost have the same attributes)

READ MORE
4 upvotes·157.7K views
Recommends
on
GolangGolangPythonPythonRubyRuby

it is highly recommended to take a look at that survey

https://survey.stackoverflow.co/2022/

READ MORE
2 upvotes·1 comment·59.7K views
Juri Hahn
Juri Hahn
·
October 18th 2022 at 4:03AM

Ruby is definitely alive and well and still a joy to write :)

As a Rubyist I’d say, if you’d like to upskill to increase your job chances in general go with Python due to its wide use in many fields. If, however, you’re planning on building a web app Ruby (on Rails) is still one of most productive language + framework combos despite of what some other language communities want us all to believe. Of course it depends on what you’re building so YMMV. For instance, if performance is of utmost importance or you’re memory constraint then Go and even more so Rust will be the better choices. Personally, I’d look at stacks of companies I’d like to work for, though.

·
Reply