Questions tagged [database]

A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects. The data are typically organized to model aspects of reality in a way that supports processes requiring information. Use this tag if you have questions about designing a database. If it is about a particular database management system, (e.g., MySQL), please use that tag instead.

0
votes
0answers
4 views

Update MongoDb version using Codio platform

I need to update MongoDB on Codio from version 2.4.9 to 3.2.5. I have been able to do this using the terminal but the shell version will not update. Tried removing all relations to MongoDB and ...
0
votes
2answers
24 views

Limit certain attribute on an SQL query

I am building a library database. I want to write a query that returns the top 5 books for each category, which means that it has to return the 5 books that are borrowed the most times for each one of ...
-1
votes
0answers
13 views

User registration limit and registered user confirmation not working. What do i do? [duplicate]

I am trying to limit user registration in my database and also check if user already exists in the same script. Here is what i have below, I have tried to put the code in diff ways but nothing works. ...
0
votes
0answers
20 views

How to link multiple rows within a single table - MySql

I'm looking into a way on how I can link multiple rows within a single table. In short, this is a system in which users can add messages. Messages are linked to a division. A user can post a message ...
0
votes
0answers
18 views

How to filter comboboxes based on the selections in other comboboxes?

I have 3 tables: 1) House: | ID_house | House_names | num_region | --------------------------------------- | int | names | int | num_region - a foreign key, which equals to a ...
0
votes
1answer
12 views

Trying to understand how Consistent Hashing works better on database servers

Regarding Twitter or Instagram design Sharding based on UserID: We can try storing all the data of a user on one server. While storing, we can pass the UserID to our hash function that will map the ...
0
votes
0answers
11 views

How to optimize handling `bytea` in Postgres

I'm working on a Bitcoin Indexer that dumps blockchain data into Postgres. I had a previous DB schema design that used SERIAL IDs, but I'm now playing with db schema in which primary keys/IDs are ...
0
votes
0answers
11 views

Connecting to Informix with NodeJS in MacOS - IBM Driver Issues

I am attempting to connect to my Informix database via NodeJS on MacOS, something I would have thought was reasonably simple. However, after Googling the issue, it seems that I am required to download ...
0
votes
1answer
32 views

Update of JPA Entity with composed PrimaryKey leads to duplicate entry error

Update of JPA Entity with composed PrimaryKey leads to duplicate entry error When I try to store the same entity using the spring JpaRepository multiple times in parallel I get a Duplicate entry for ...
-4
votes
0answers
21 views

Is there a way to update a SQL database with real-time data from API? [on hold]

I want to update my SQL database with data from making API calls. How can I do this real time? I was thinking of setting up a Python Cronjob.
-1
votes
0answers
31 views

Execute a DB query every 30 mins in the database

As part of my job I have to periodically check for failed items in the database. I have the query with me. Instead of manually executing the query every now and then I want to execute it in a ...
0
votes
1answer
38 views

How to check if ONLY a combination of values exist in a column?

I have a list of values and i want to get only the rows where the column has ONLY a combination of values: Ex: >CREATE TABLE User_Group( [id] [int] NOT NULL, [names] [varchar](255) ...
-1
votes
0answers
10 views

Full-text search (FTS) in databases, which database is the best for it?

I have problem, I consider database(MS SQL SERVER, ORACLE, POSTGRESQL) for full text search. I saw that MS has it, POSTGRESQL too, but ORACLE not. Can you advice me which database will be the best?(...
0
votes
0answers
20 views

com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type com.studentcornerapp.studentcorner.Posts.Posts

I want to show all users posts using firebase recycler adapter.But I got Firebase Database Exception error and my app crashed. I don't know what am i doing wrong? I was initially doing everything ...
0
votes
0answers
32 views

How to support multiple databases (postgresql) with Sidekiq server for the same project?

I want Sidekiq to support multiple dynamic databases for the same project desc "Start sending the client invitation" task "sidekiq:start", [:database] => :environment do |task, args| database = ...
0
votes
2answers
20 views

Nested FutureBuilder vs nested calls in database

I need to choose best approach between two approaches that I can follow. I have a Flutter app that use sqflite to save data, inside the database I have two tables: Employee: +-------------+---------...
-3
votes
0answers
28 views

How do I pull data by an x amount instead of the whole list, and then later continue refreshing more x amount?

Lets say this is my example data: { "b-0001":{ "title":"Batman", "time":1558556303855 }, "a-0001":{ "title":"Hello", "time":1558556340110 }, "c-0001":{ "title":"haha1", ...
1
vote
1answer
27 views

ElasticSearch terms aggregation but need other fields in the output

My Elastic search docs looks like below. { doc_id: 1, type: "type-1", user: "user1", color: "red", timestamp: epoch time here }, { doc_id: 2, type: "type-2", user: "user2", color: "blue", ...
0
votes
1answer
27 views

How to fix row with null value showing up in query when it is supposed to be filtered out by WHERE Clause?

I am trying to filter out certain rows that have an EqSt of '1D' or EquipmentStatus. However when I do, on SQL Server, it filters out the rows that have a EqSt of NULL as well. But on Access however, ...
0
votes
0answers
11 views

What would be a good database to store Bloomberg Bulk Data which consists of hundreds of millions of records?

I'm looking for performance for inserting the data but especially to query the data.
0
votes
1answer
22 views

Recursive call in stored procedure raises error

I have created a simple tree relation in postgres. A father node can have n-nodes. To get all childs from a father node I want to write a stored procedure that calls itself recursivly. This is the ...
0
votes
1answer
27 views

An easy way to write INSERT INTO table VALUES (value1, value2, …valueN)

I need to insert values from an array using PHP into my database. The array has 40 positions, each position is a value I have to insert into a table of my database. I need a quick way to write it ...
0
votes
0answers
15 views

How to use swing worker while working with database [duplicate]

when requesting data from database I can't interact with the swing components, I've read some solutions about using swingworker but I don't really understand how should I use it, I want to display a ...
0
votes
0answers
7 views

How to merge two Firebird databases

I need to merge two Firebird databases. The first one contains data from 2014 to 2016 and 2018 to 2019. The second one from 2014 to 2017. I would like to have all data from 2012 to 2019 in the same ...
0
votes
1answer
19 views

Several simulated connections on a database impact

I created a little Php API that connects to my db with PDO with a code that looks like this one: $bdd = new PDO('mysql:host=localhost;dbname=' . $dbName . ';charset=utf8', $username, $password, array(...
-3
votes
1answer
21 views

How to create a new database in symfony for each user who registers?

Using symfony4 i have a form registration and i want to create a database after every registration. For example : i've name - company - email inputs. After submitting i'll insert the data (ex : Jack,...
-4
votes
0answers
15 views

Macro for creating database [on hold]

I want to write a macro that will send my table in Excel to the server and create a database automatically. For example, this is my Excel: Arry Excel A1 A2 A3 name Column Shahin ...
0
votes
0answers
10 views

Null pointer exception when inserting data into Android SQLite Database

I'm just starting an Android Studio project and Ive created a small player database and I have been trying to add player details into the database. However each time the program crashes with a null ...
0
votes
0answers
11 views

Archiving, handeling related deltions

I am always stuck in the following type of situation: Say I have a model/database table Product. The product is produced in a ProductionLine. so the product has a Foreign key to the ProductionLine. ...
0
votes
1answer
15 views

what is difference between primary and unique key?

What is the difference between Primary and Unique key (in MySQL)? How these can be considered as a foreign key? please explain. I tried creating a database table and don't know how to make a primary ...
0
votes
0answers
43 views

How can I ensure the DELETE method executes before POST?

I have this code that is supposed to first delete what's in a database before it loops through an HTML table and inserts each row into the database. However, sometimes the POST method executes once ...
0
votes
0answers
12 views

How can i export the database which is used by MoodleWindowsInstaller after installation?

I installed MoodleWindowsInstaller (moodle.exe) on my machine, so now i want to upload moodle to an online server, i have already uploaded the files but i cannot access phpmyadmin on the local machine ...
0
votes
0answers
50 views

SQL query to select from a multiple to single and single to single relationship

I am trying to create a role based access where a User can have one or more UserGroups and that maps to Roles. I have the following tables: UserRole CREATE TABLE [User_Role]( [id] [...
0
votes
0answers
4 views

Compatibility of Apache Cassandra with YugaByte

Do the drivers and cqlsh that come with Apache Cassandra work with YugaByte?
0
votes
2answers
40 views

MySQL query really slow as loading benchmark

I'm experiencing a very slow loading benchmark from this MySQL query with some WHERE and HAVING conditions: SELECT * FROM test p WHERE p.brandid=636 AND DATEDIFF(p.registration, '2019-...
0
votes
1answer
15 views

external GUID to satisfy unique constraint in mysql

I have a MYSQL 8.x table, each row is unique since the PK is auto incremented. A column transactionID is used to store an external transactionID that needs to be coupled with the row/record. However ...
0
votes
0answers
8 views

how do I get the response of the rest call which I made in a loop “only after the looping is over” in grails2.4.4?

I store a large amount of data into the database, I make some rest-calls depending upon the record, and have wait for the request to update another field, I want to do all the rest call at once and ...
0
votes
0answers
18 views

mongodb: Create view of 2 most recent documents from historical collection

I have a historical collection, each record represents a device with a hostname and contains metrics at that time about that device. A new record is created every ~5mins and added to this collection. ...
0
votes
1answer
75 views

Hashing text file line by line

I am trying to hash a text file that contains 19 lines of student personal information. There is a case based system that I can choose what action I want to do like Insert in Hash, Display, etc. The ...
0
votes
2answers
24 views

Why should we not include business logic in database triggers?

The business side of my company would like to implement 20 new triggers with very specific business logic. They are also constantly coming back with changes to old triggers. The logic is just group ...
0
votes
2answers
36 views

How to sum column in database using php

i'm trying to sum a column name "total". and i want to display the total sorting by id. if user A login he can see total booking in his account. I keep get the error: "Notice: Array to string ...
0
votes
1answer
31 views

Trying to get username from one database and paste it with a message to another database

I'm currently trying to set up a chat. It works fine on its own, however when I try and get the username from another database for a log in system I have instead of having people choose a username ...
0
votes
0answers
13 views

asyncpg - Connect to server and create database if not exists

Is there a way to create a database in a PostgreSQL server using asyncpg like you can in Hibernate, using: jdbc:mysql://localhost:3306/db_name?createDatabaseIfNotExist=true flags in the uri. Is ...
0
votes
0answers
11 views

Multi threaded database fuzzy match

Problem: I have a huge database with users and there are a lot of duplicates (25 million entries). I need find these duplicates and write them to a new lookup table (I am using SQL) So for example: ...
0
votes
0answers
14 views

NHibernate dynamic connection string .net core

I have question related with properly configuration NHibernate for dynamic connection string in .Net core app. I created FluentConfiguration as Singleton: services.AddSingleton<...
0
votes
0answers
13 views

JDL: Multiple Menu

I trying to create multiple menu category using JDL. In one CategoryItem have parentID. I already created JDL like: microservice * with Category entity CategoryItem{ name String required } ...
0
votes
0answers
8 views

Can you create a range partition table in hive?

I create partitions in hive using static partitions or dynamic partitions. Hive: create table employees ( name string, salary float, subordinated array<string>, deductions map<string,...
1
vote
0answers
17 views

Oracle Query is not executing for Large volume without Stat Gathering even if the plan is good

Im processing a large volume using batch process ,Batch got stuck at particular query which involve a table (table is permanent but using for holding data temporary, table data will clear after ...
0
votes
2answers
11 views

Display correct format of Data in php

Below is my code of display of value in the database. I want the output be like: 21 July 2019 and not like 2019-07-21 . Any ideas and help? <?php $servername ="localhost"; $username ="...
0
votes
0answers
21 views

Change status, Using javascript controller, and calling the auto change status from the database

Good Morning. Maybe someone can help with this logic and code, I have written a controller where it calls the database settings and then tries to find a ticket that is older than 1 month, if that ...

http://mssss.yulina-kosm.ru