Most voted "database" questions
A database (its abbreviation is BD, DB, database) is an organized collection of data typically used to model certain situations. Use this tag if you have questions about designing a database. If this is a specific database management system, like Mysql, for example, use this tag instead.
Learn more…3,414 questions
Sort by count of
-
0
votes1
answer80
viewsTo return the result of a query in Influxdb with the "time" column as number
I am doing tests in Influxdb (inside a Docker container) and for that I ran the code below: # criando a imagem do influxdb docker run -d --name influxdb -p 8086:8086 influxdb # acessando o terminal…
-
0
votes2
answers865
viewsCalculate total amount and total SQL Server value with three tables
Sds, I have a problem, I am not able to group the municipalities in my SELECT. Even with the group by the municipalities are separated. There are three different tables, municipality, product and…
-
0
votes0
answers47
viewsSqldatareader does not return database information
This Datareader below when you type the product code it shows the name of the product in another textbox, works ok, but when instead of searching for the code search by the codebar it does not bring…
-
0
votes1
answer191
viewsArduino + SIM800L Connect to Firebase
Galley, I’m putting together a project and I need to connect my companion to firebase. For this I am using a SIM800L, however my code return the error below in the compiler, someone has already gone…
-
0
votes0
answers96
viewsThe column '<column name>' is invalid in the selection list because it is not contained in an aggregation function or in the GROUP BY clause
Hello! In the system there is data collection for some questions and the answers are 0-100. My database has the following tables: Person, Question, Personal. I’m trying to get a select where to…
-
0
votes1
answer32
viewsFunction does not modify variable value
I’m trying to make an App that modifies a DB Redis, but when I send the function connect to a user he should do Conectado = true and UsuarioConectado = UsuarioQueConectou. But when the function…
-
0
votes1
answer41
viewsLogica in SELECT, display either record
I need to use the rule that is in the if within my select. Main rule is if you have the purchase and the purchase has the approved status I must bring the field with the url of the final product if…
-
0
votes1
answer95
viewsI need to update the value of one SQL table with the sum of the values of another
I need to update the value of the column total_services of a certain number with the value (value value value * quantity) of the table nfpse_detail The command I’m using to try to do this is this…
-
0
votes0
answers45
viewsDAO method returning attributes of more than one object
I have a question in the use of DAO. If I need to return a set of attributes of 2 objects? Let’s say I have a DAO category that has a method that in addition to the category attributes needs to…
-
0
votes1
answer38
viewsGuys, I have a question with Mysql about Procedures. Is it possible to save their return in a BD variable?
I have a repetitive process in BD that is validate the user for each request, so I decided to create a process for this and call inside the others when necessary. However I have the need to save the…
-
0
votes0
answers627
viewsQuery Mysql: Error Code: 2013. Lost Connection to Mysql server During query
I have a Mysql Query that only returns me Error Code: 2013. Lost connection to MySQL server during query. Follows the same: select log_logradouro.ufe_sg, log_localidade.LOC_NU,…
-
0
votes0
answers53
viewsMysql & Node - Error: ER_NOT_SUPPORTED_AUTH_MODE
When I try to login to my site, I get the error: ER_NOT_SUPPORTED_AUTH_MODE From what I’ve seen I think it has to do with the database connection, which is not correct. var pool = mysql.createPool({…
-
0
votes1
answer25
viewsMysql - Cross-table information (Selects)
I am trying to make a table that presents a set of elements, where if a given id is in another table, then that element cannot be in the first. Albums | id1 | id2 (Foreign Key)| Capas| id2 |…
-
0
votes0
answers16
viewsMysql - Added Password Generated Separately
I’m trying to insert Customers but with a password that is generated by a code but I’m not quite sure how to implement the use of this. site.get("/processa_InsereCliente", function (req, res) { //…
-
0
votes1
answer65
viewsAccess denied there mariadb database on linux python3
good afternoon, I was doing some tests and I decided to try using python3 to manipulate databases but I can never connect with the database with python because the same error always happens:…
-
0
votes0
answers50
viewsError when grouping per month with INNER Join using Postgres
Good morning! I’m trying to group my table by month but it’s not working.. I’m using this query: SELECT "Boleto"."id", sum("valor_parcela") AS "volume_operado", sum("spread") AS "spread",…
-
0
votes1
answer74
viewsInsert data into the database with foreach
I have an array that receives data from a session and I am trying to insert it into the database using foreach but nothing happens. What may be wrong? Follow an example of the array: array(3) {…
-
0
votes1
answer46
viewsFirestore Cloud emulator not running properly
I am testing a post request for login in the firebase database using the cloud firestore emulator with the command firebase serves in the terminal and the expected response in the 'Postman' would be…
-
0
votes0
answers21
viewsProblem when trying to link bd to index
I created an html file just to learn a little bit. I also created a css. Only, when trying to link a database so that you can register with e-mail and password on the site, I could not do, because…
-
0
votes1
answer84
viewsMysql key creation error
I’m making the following mistake: Error Code: 1005. Can’t create table bravo.tb_gerenciador (Rrno: 150 "Foreign key Constraint is incorrectly Formed") follows the script: -- MySQL Script generated…
-
0
votes2
answers295
viewsPerform SQL query with two foreign keys from the same table?
I’m creating a recognition system for the company and it was almost over, it’s been some time that I’m trying to carry out this consultation but not getting. I have the following tables:…
-
0
votes1
answer41
viewsSQL Server Order Allocation
It is possible for me to relocate this latest product with ID 21, to the field I have drawn in red? Actually, look at that. It is not by TOC, but something functional, in our site where it is taking…
-
0
votes2
answers44
viewsHow can I check if two values of two matrices are in the same position?
I am trying to create a mini login system using python, where a login and password are requested, and if the two match, for example: the login is at position 2 and the password is also at position…
-
0
votes3
answers401
viewsCheck CPF and Email fields before sending to the database (PHP)
Good night! I would like to know how I can implement a function (maybe?) or some method to check if the fields Cpf and e-mail in my code already exist in the bank before registering them, and if it…
-
0
votes1
answer440
viewsCan I work with array in SQL SERVER?
Hello fellow collaborators... I have a server that has more than 100 banks, and most are of the same structure. I would like to create a function, process or whatever. That could expedite my…
-
0
votes1
answer258
viewsRun laradock (Docker and Laravel) with mysql local
I had my Laravel environment working at XAMPP. However, given some needs, I had to switch to Docker. For that, I started using Laradock. However, I only want to run php and apache on Docker and not…
-
0
votes0
answers28
viewsFK Ismatch sqlite
Good afternoon I have an error of FK Ismatch on Sqlite that is already bothering me but I can not see the problem, follows the skeleton of the bank: CREATE TABLE CEST_Item ( CIT_ID integer primary…
-
0
votes1
answer65
viewsHow not to allow the user to create HTML using input text?
I am relatively beginner in programming, I am 17 years, 2 years with programming but no experience in the job market and recently I started working more actively with HTML. My problem is with regard…
-
0
votes0
answers24
viewsUnion of more than one table
In my database there are two tables: cde_usuario cde_venda_detail I will begin to introduce a part of Notifications system. The record must have some column indicating whether the notification has…
-
0
votes1
answer475
viewsDate filter in a table with javascript
Notice now that for my question, I will use only focused data for the problem, without having to put all the fields of a table and the whole HTML body. It took me a long time to elaborate on this…
-
0
votes0
answers135
viewsFirebird - Concatenating fields that return from a case
SELECT DP.DATA AS DATA, S.DESCRICAO, COUNT(P.CODIGO) AS QNTD, (CASE WHEN (CAST(SUBSTRING(P.HORAFIM FROM 1 FOR 2) AS INTEGER) = CAST(SUBSTRING(P.HORAINI FROM 1 FOR 2) AS INTEGER)) THEN…
-
0
votes1
answer58
viewsWorking with two different Datasets - Filter the data
Dataset - Players Dataset - Results Good night, I’m stuck in a data wipe. I am working on a project to predict the winners of a particular Counter Strike Global Offensive match, for my final course…
-
0
votes1
answer141
viewsHow to reference multiple foreign keys in a MYSQL field
I have a problem that I can not find a solution, I am making a database for a school system, in this system there is the table of materials, which has an ID and a NAME, and teachers who have an ID a…
-
0
votes1
answer47
viewsHow to convert UNIQUEIDENTIFIER to INT?
So quiet people? I’m beginner with SQL SERVER and I’m in a situation where I don’t know how to proceed anymore. I have 2 banks on a server here at the company, and I need to replicate some data that…
-
0
votes1
answer62
viewsHow to place the value of an input inside a "cell" of a SQLITE3 table, with Python?
Hello, I’m a beginner in programming and, learning about the SQLITE3 library, in Python, I came across a problem and even after a lot of research I did not find the solution. I would like to be able…
-
0
votes0
answers34
viewsClass byte for C#Image Storage
I am new in programming I am creating an application for Hotels and in this application we will have several images for each hotel, I created the following code: public class hotel : BaseClass…
-
0
votes2
answers58
viewsError when registering.php with mysql (final step) "INSERT"
follows below the code of the register that I made. In thesis it is working perfectly, but at the end of the moment it is to give the INSERT, it ends up falling in LSE (ie, the registration was…
-
0
votes1
answer69
viewsFind a best-selling item along with another
Find a best-selling item along with another. Sql server TABLE SALE CAMPOS = ttcupomfiscalitem PRODUCT TABLE FIELDS = ( tcproducts) I tried to make the following sqlserver query SELECT TOP (10)…
-
0
votes1
answer14
viewsWhat is the best approach for entities with similar and different information?
I’m doing a project that consists of two entities: student and psychologist. Both have information in common, such as: login, first name, last name, age, contact, address. Both entities also have…
databaseasked 4 years, 1 month ago Enzo Matheus 11 -
0
votes0
answers43
viewsMysql optimize Query
SELECT data_envio, nota_fiscal, nome_cliente, modelo.nome, conteudo.quantidade FROM conteudo, equipamento, caixa, pedido, cliente, modelo WHERE pedido.numero_pedido = conteudo.numero_pedido AND…
-
0
votes1
answer41
viewsGet value for select JS/PHP
I’m in doubt. I have a questionnaire where the user will evaluate some sectors. I have for example: <label>Higiene</label> <select class="form-control" required > <option…
-
0
votes1
answer53
viewsFilter Dataset from a groupby
I have the following dataframe (df_reviews) and need to remove the App versions that were downloaded less than 10 times and tried to do the steps below and a for to perform the filter on the…
-
0
votes0
answers45
viewsCreate function within MYSQL to change data in the same table
Hello. I have an application that inserts data into a table positions, in several columns, I need to take this data work them and write a new value in the column odo, that column the application…
-
0
votes1
answer58
viewsDE_PARA SQL | Change table values based on information from another table
Good morning guys. Can you help me? I have previously researched elsewhere but could not find a viable solution. I need to change the data in the table below according to the new information. Data…
-
0
votes0
answers113
viewsQuery in a SQL SERVER table
Hello, people. I need to make a query in SQL SERVER but the same is returning incorrect values. I have the following tables. In the proposed exercise I must return the following information: Extract…
-
0
votes0
answers40
viewsHow to verify if a value exists in an Oracle Process input parameter and make a decision?
I have a trial that has a type VARCHAR2 of entrance parameter: PROCEDURE PRC_MINHA_PROCEDURE ( PI_ID IN TB_1.ID%TYPE PI_ID_ATRIBUIDO IN VARCHAR2 DEFAULT NULL, PO_TP_RESULT OUT t_cursor ) AS…
-
0
votes0
answers33
viewsAutomatic filling of the seat
Hello, I have a java project and I’m having a hard time. The project is based on creating the functionalities of a bank, I have done everything of the accounts and customers. I already created the…
-
0
votes1
answer50
viewsAdd a column where its values are already the result of another sum
I have 2 tables in a database, one contains the purchase orders, another contains the items of these purchase orders, this data is obtained from an import from another system so I do not have…
-
0
votes1
answer47
viewsIf you click on the displayed ID, it opens another page with a pre-filled form with the information
Good afternoon to you all! I am a beginner in WEB programming and I have a big doubt, I created a previous form where the person type the data and is saved in the database, I also created another…
-
0
votes1
answer279
viewsSql Server - Time Conversion (HH:mm) to Decimal
Hello, I am working on a system that requires conversion of hours to decimal and is showing error conversion from HOUR (HH:mm) to decimal when total hours exceeds 23:59. For better understanding if…