Questions tagged [json]
JavaScript Object Notation (JSON) is an open, human and machine-readable standard that facilitates data interchange, and along with XML is the main format for data interchange used on the modern web.
671 questions
1
vote
1
answer
39
views
Is it possible to use scientific notation to display large numbers in psql?
I have tables with very large numbers, which are entered using scientific notation (e.g. 1e100). But when in the PostgreSQL's psql client (as of 18.x), they get expanded into the full length:
# SELECT ...
1
vote
1
answer
57
views
Safely update parts of JSON data stored in SQLite, OCC
So I’m experimenting with a lightweight way to track and safely update parts of JSON data stored in SQLite, using Python.
The main goal is to:
Keep JSON documents inside an SQLite database (in a TEXT ...
2
votes
0
answers
33
views
Usage of JSON in mySQL [duplicate]
In the project I am working on, there is a Booking table.
There are 8 types of Bookings.
I have elected to have just one table
There are 12 common fields
I could store the rest of the fields as ...
3
votes
1
answer
401
views
Why does a Json Path inequality over an array not work?
Given the following jsonb array, I want to filter it only for certain objects.
[
{
"id": "123"
},
{
"id": "456"
},
{
"id": "...
0
votes
2
answers
291
views
Grouping and arranging data using FOR JSON PATH and INCLUDE_NULL_VALUES
I'm having an issue with my T-SQL script. I am thinking about and working on how to produce the expected output from it.
Here's my T-SQL script:
DECLARE @user_id VARCHAR(50) = 'UGUID-2025-01-27-14-09-...
1
vote
1
answer
69
views
Storing Application Options
I have always stored Application Options as an Ini file on windows as it has been faster to access than the database. Also, sometimes, you need to read some of them before accessing the database.
The ...
6
votes
2
answers
351
views
Can a JSON array be sent as a stored procedure parameter in a streaming fashion?
With the database setup
CREATE TYPE dbo.TableType AS TABLE (
prop1 int,
prop2 datetime2,
prop3 varchar(1000)
);
GO
CREATE OR ALTER PROC dbo.TestTableTypePerf
@Data dbo.TableType READONLY
AS
SELECT ...
1
vote
2
answers
219
views
How to concatenate multiple JSON arrays into a single array in MariaDB?
I'm working with a MariaDB database where I have a table with two columns: id and values, where values contains JSON arrays. Here is a simplified example of the data:
id
values
1
"[1, 2, 3]"
...
0
votes
1
answer
138
views
Using KingswaySoft JSON Destination component, how do you make one node of the prepared request repeatable and the other node not?
I am using Visual Studio 2022 to develop SSIS 2022 packages, creating a data flow from an OLEDB source (SQL Server query) into a KingswaySoft JSON Destination to post to a data entry endpoint. The ...
4
votes
1
answer
394
views
Do handling of JSON-format or anti-pattern (comma-delimited values etc.) in relational database introduces performance and maintainability issues
If...
INSERT INTO TABLE_NAME
SELECT
STRING_AGG(COLUMN_NAME, ',')
FROM
TABLE_NAME
introduces an anti-pattern (i.e., can cause poor performance, incorrect results (kindly verify ...
0
votes
1
answer
80
views
Normalizing row with sets of columns, handle all nulls?
I want to say up front, I know this is crazy.
I inherited an app I have to maintain from somebody that had denormalized 6 sets of columns into a single row (e.g. some core columns, like ID, 00_c1, ...
2
votes
1
answer
50
views
JSON_CONTAINS in HAVING clause adds extra closing brace to JSON_OBJECTAGG
I have a table with data we've collected from various sources. It's got the item name, the source and the source's value.
The table looks like the following:
id
name
source
value
1
abc
web
1
2
abc
...
0
votes
0
answers
91
views
Where should **potentially** large JSON be stored?
For context, I am building a tracking database for the construction of a particle detector at CERN (my first database ever! Using postgresql with SQLAlchemy and a flask app for the upload). There will ...
5
votes
1
answer
715
views
PostgreSQL json testing (`is json`) and casting with null character (`\u0000`) work unexpectedly
I know something about null characters in PostgreSQL text types. But I cannot understand the strange behavior of json testing and casting:
select '{"foo":"bar\u0000"}' is json; --...
0
votes
1
answer
198
views
How to structure a database with multiple 1-N relationships?
I'm looking for advice on how to model the tables for the following entities. The main concept is a Job. There are two Job types, regular ones, and case studies. This question is about case studies.
...