Which is better saving data inside a class or JSON file?
I want to save user data e.g- Id : Long , name : String, url : String, . There are more than 50k entries. Which is better saving data inside a data class or JSON file ? Just want to…
I want to save user data e.g- Id : Long , name : String, url : String, . There are more than 50k entries. Which is better saving data inside a data class or JSON file ? Just want to…
Im developing a web application. I have Django for my backend and using PostgreSQL for my database. I am not sure if this is the best approach or not but: I want to create a database for each company and…
I showed users(roles) with dg and du, then there were the same results as shown below: postgres=# dg List of roles Role name | Attributes -----------+------------------------------------------------------------ anna | john | postgres | Superuser, Create role, Create DB, Replication, Bypass RLS…
How to order by timestamp and group based on score Entities starting with a prefix (say a1 are similar), but we need to pickup the one with the highest score, in this case a1-1 For a2 it should pickup a2-1,…
I was asked to add a column containg the bonuses of salary of employees, examples of this values were give such as: 1099.99 or 2.00. Task also asked me to add appropriate data type but I was confused which one…
I'm trying to make an API that uses PostgreSQL to store shortened links. However, when trying to execute a query to the database, postgreClient is undefined every time. short.controller.ts: import { Request, Response, NextFunction } from "express"; import client from…
I have got the following Postgres table: create table test ( id serial, contract varchar, amount0 int, amount1 int, price double precision ); I would like to insert 100 rows of dummy data that conforms to the following: – In…
I'm trying to save all the information inserted by user into database, all the info are able to save except the pdf file. My code: usermanual.php <div id="usermanualModal" class="modal fade"> <div class="modal-dialog"> <form method="post" enctype="multipart/form-data" id="usermanualForm"> <div class="modal-content"> <div class="modal-header">…
I have tried to select a list of databases and select all tables from each database, ordering the first ten tables by their size - including their indexes- through PL/pgSQL, but I have had a problem to join the query…
I have table like this: news_to_category news_id category_id 1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 4 1 4 2 4 4 5 2 5 3 5 4 And now I need…