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
votes2
answers57
viewshow to consult by month?
In the BD table I have a column "day" type "date" keeping "yyyy-mm-dd", I’m trying to make a query that returns me the current month, I’ve tried many ways and nothing. <?php session_start();…
-
0
votes1
answer112
viewsProblems to close communication with the database
I have some applications consuming data from the database, but for a while now the applications are not able to close the connection, when I give a conexao.close(); Java says it cannot close because…
-
0
votes0
answers452
viewsGroup by month or week with Laravel eloquent
I have a project that has managed my investments, that is, it takes my daily statement and saved in my project so that I can see how much it is yielding, in short I have a table that are daily these…
-
0
votes3
answers91
viewsHelp with SQL query with COUNT in multiple rows
Hello, I’m doing the following consultation SELECT p.id, c.nome, v.titulo, count(v.titulo) FROM passageiros AS p LEFT JOIN clientes AS c ON c.id = p.id_cliente LEFT JOIN viagens AS v ON v.id =…
-
0
votes1
answer44
viewsInserting Id of a Foreign Key into a Relational Database
Good morning. I am beginner in Database and programming and have a question, which query to recover the id to insert in a table with foreign key? I am using the MYSQL database. Example, I have the…
-
0
votes1
answer26
viewsUnidentified syntax error
Good afternoon. I’m trying to program in php (I’m new), and I created a connection with the bank, but when I try to download a data in my bank through my system, it presents the following error:…
-
0
votes1
answer60
viewsJS variable for PHP or direct in BD
Good morning. I am a beginner programmer, and I am developing a sales web app, which sums up all prices of products dynamically included by javascript: <script> function somaTotal() { var…
-
0
votes2
answers150
viewsError in primary and secondary keys
Well, I tried to normalize this data table as much as I could, but I failed to get the code, where I’m not identifying the user error: Table: Error: Error 2: -- Geração de Modelo físico -- Sql ANSI…
-
0
votes1
answer30
viewsRegister exact time in the comic
Good morning, I’m a beginner programmer, and I’m developing a sales web app, where I need to insert in the comic the exact time of sale, but I’m not getting. Javascript code that generates real-time…
-
0
votes1
answer86
viewsHow do I view a Firebase database drive?
I am having trouble recovering the drive content that is stored in Firebase, which has in turn user dHJldml6YW5AZ21haWwuY29t and email, and inside the email is organized by date of movement, for…
-
0
votes0
answers52
viewsMultiply product price by quantity
Good morning. I am a beginner programmer and I am developing a sales app, where the system includes the products dynamically in the sale. The products are already registered in the database, and…
-
0
votes1
answer172
viewsHow to insert data into an N:N Table
I’m having trouble inserting data into an N:N table. The two tables in question are: Course and Subject. The relationship between them forms a table called tbMATERIA_CURSO which stores the primary…
-
0
votes1
answer27
viewsRecover Varbinary Asp
Good afternoon, I wonder how I can recover an image saved in a database like varbinary for an img tag on Asp. My code is as follows: <% dim objCmdI, RsImage, vsImage call AbreConexao() Set…
-
0
votes1
answer70
viewsRelational Model of a Bank
The question is this, I have the following situation: On the right side I have the mathematical knowledge - MK and on the other side Conhec. Didactic - PCK, let’s call them Domain, and in each of…
-
0
votes2
answers518
viewsFirebird perform automatic reset on Generator
Environment : Linux server running Firebirdcs 2.5 Superclassic ; desktop application Delphi 7 Dbexpress; hundred of machines consuming. Dear friends, In the database there is an order table where…
-
0
votes3
answers131
viewsHow to relate questions to a question
This question is not directly linked to code, but and the basic part of my project, I am currently divided into 2 options (which I will describe in detail below). Currently the UML is this way,…
-
0
votes1
answer50
viewsJava spring: error removing model listing object
I am having problems in the construction of the relations between the models of a project, I have a document that has several subcategories. When I save a document I want to do a validation, which…
-
0
votes1
answer294
viewsError inserting BLOB type into Oracle Bank
I’m having a problem inserting a javascript signature into the database. You’re making me wrong again: oci_execute(): ORA-01704: too long string literal I don’t know what it might be, I’ve been…
-
0
votes1
answer63
viewsEntity Framework (Populating tables)
What is wrong with my project? When I try to give an Update-Database error message appears (The underlying provider failed on Open). When I remove the items I want to add, for example,…
-
0
votes2
answers231
views -
0
votes1
answer99
viewsCodeigniter/PHP - Problem sending Model Data to View
Good night, I am using Codeigniter 3.1.10. I have a problem sending a specific data from the Model database to the Controller: var_dump($data) returns me only the array I passed that would be the…
-
0
votes2
answers766
views2 Foreign keys in the same key
good afternoon! I am doing a Database exercise and came across a problem. I am registering a BD of an airline company. In one of the tables called flight need to register the code of an airport of…
-
0
votes1
answer25
viewsPHP ERROR - On the Database Connection
Connection to phpmyadmin HOST (n code wanted to go): connection code to send to the databank: <?php include_once("conexao.php"); $usuario = $_POST['usuario']; $senha = $_POST['senha']; $email =…
-
0
votes1
answer28
viewsSum of values in Mysql
Good evening. I have to add the natures according to each sector of the company, but it is not going with Count. SQL: SELECT examefuncionario.exameFunc_Natureza, setor.setor_Nome FROM `funcionario`…
-
0
votes3
answers298
viewsCreate table in Mysql using Laravel
I need to create a table with Laravel using the migrate command, the table would currently only have id. Normally two tables would be created, one with the name of the database I put containing the…
-
0
votes1
answer515
viewsMysql and python error when entering data
I have the following code: #encoding: utf-8 from django.utils.encoding import smart_str import mysql.connector mydb = mysql.connector.connect( host="localhost", user="[--CENSURADO--]",…
-
0
votes3
answers70
viewsSQL with two different information
I have two queries in the database that work independently, but now the need to join them in a single script. I made some attempts, but without success. Who can help me, I would very much…
-
0
votes2
answers121
viewsArithmetic operations in PHP or Mysql?
What would be the good practice when doing arithmetic operations that come from a database query, for example: SELECT valor_bruto_atual, valor_investido, (valor_bruto_atual / valor_investido) AS…
-
0
votes1
answer34
viewsError handling of special characters when sending to iso-88591 and utf-8 database
Good evening friends, I have a problem where I can’t send data correctly to the database, when this data goes with special characters, name like D'vila always give errors. Has anyone ever had this…
-
0
votes1
answer33
viewsSelect help in two columns
I have the following select command: SELECT pa_coduni, pa_proc_id, sum(case when substr(pa_cmp, 1, 4) = 2017 then pa_qtdapr else 0 end) a2017, sum(case when substr(pa_cmp, 1, 4) = 2018 then…
-
0
votes0
answers87
viewsINSERT taking SELECT from two tables with WHERE - MYSQL
Hello! Follow my Insert and below I explain what is happening: INSERT INTO tab_relatorio_ext SELECT t1.CODIGO_EXT, t1.TIPO_EXT, t2.NOME_SITUACAO_EXT FROM Tab_Coletados_Ext as t1 JOIN…
-
0
votes2
answers65
viewsHow does this Join look properly?
I’ve been doing a lot of research on this Jay and I can’t seem to fix it: SELECT tbEquipamento.TIPO_EQUIPAMENTO, tbEquipamento.NUMERO_SERIE, tbEquipamento.COD_SITUACAO_FK,…
-
0
votes4
answers288
viewsWhat’s this Join’s syntax error?
When do I use this join, appears that there is a "missing operator" syntax error, someone can tell me where it is and why this error occurs? SELECT tbEquipamento_Movimentacao.NUMERO_ATIVO_FK,…
-
0
votes1
answer505
viewsCheck if date is valid in Mysql database
Good afternoon programmers, I have a problem in the trial where I need to print all the dates of the month, I created a loop until the day 31, but there is month that is less days that gives error,…
-
0
votes0
answers53
viewsinsert data into a table with PDO
Hello, I’m doing my first PDO code but when I am running the code, it brings me a mistake that I have no idea what it is, I appreciate the help from now. <?php session_start();…
-
0
votes1
answer26
viewsI am trying to pass my database id to call an image in another directory
I’m having some problems to insert an image on the site, I already uploaded but I’m not able to call it from the directory with php. I’m getting two errors: 1-Notice: Undefined index: file in C:…
-
0
votes0
answers30
viewsDefine foreign key between tables
I need to make a Mysql database, Escola, with entities aluno, professor and disciplina, linked via foreign key. I made mine script, but it’s making a mistake. Could you help me? Follow what I did:…
-
0
votes1
answer271
viewsconcatenate a variable to call a php image
Hello, I’m trying to call a direct image of a folder created dynamically with php but the code returns me this error: Recoverable fatal error: Object of class mysqli_result could not be converted to…
-
0
votes1
answer59
viewsAdd data from two tables with same parameters
I have two tables, titlospagar and titlosavulsos and in both I have the field scoreMotorista and I would like to add up the values of each I would like to do a query, gathering their data in a…
-
0
votes1
answer77
viewsGet free hour ranges with SQL only
I am creating an agenda and need to perform a consultation of the interval between scheduled times. Example: Tabela: HORARIO_ATENDIMENTO INICIO: 08:00 FIM: 18:00 Tabela: Agenda ID: 1 HORA_INICIAL:…
-
0
votes0
answers33
viewsSelect list to db import problem
Well I’m having trouble importing a select list to db, I configured but still gives error, no matter the selected item follows the codes: <?php session_start(); ?> <!DOCTYPE html>…
-
0
votes1
answer109
viewsReplica Mongodb Set Does Not Connect
I’ve climbed a cluster with Docker, and I’m having trouble connecting to the replicaset. The Docker-Compose is on the github and the instructions that surround it in the readme. Remembering that I…
-
0
votes1
answer144
viewsHow do I connect a Heidisql database to Visual Studio using Report Viewer packages?
Follow the code of my comic book from Heidisql: CREATE DATABASE ProdPacote; USE ProdPacote; CREATE TABLE Produto( ID_Produto INT PRIMARY KEY AUTO_INCREMENT, Nome VARCHAR (200) NOT NULL, Descricao…
-
0
votes2
answers265
viewsORDER BY Mysql - Reporting organisation
I have a chat and would like to display the contacts according to the date of the last message, I thought of many ways to do this but it is not working in any way. How could I bring this data…
-
0
votes1
answer28
viewsModal view with mysql database list
Hello, I have a database that is being displayed in a list on my site but I want to put a button to open a modal and display the information of each db line but whenever I open the modal it only…
-
0
votes0
answers50
viewsProblem with database connection
My group are doing a Java project with database and while continuing the project on other machines only appeared problems only in mine that is giving the following error when trying to make the…
-
0
votes0
answers24
viewsRepeat parent group to each child group interaction
I have the following situation. I have a data structure that follows the following hierarchy. 1 Ship has N exporting companies 1 Enterprise exporter owns N export notes 1 Export note has N product…
-
0
votes0
answers955
viewsImport Excel data to Mysql
I am trying to make an import of an excel spreadsheet with 536 thousand records by mysql Workbench I saved the spreadsheet as csv but at the time of import it can import all lines but it pulls only…
-
0
votes3
answers81
viewsHow do I resolve this error by trying to delete a specific node from a chained double list?
In my project, I am making a double-padlock list in C, where it has simple objectives, such as adding at the beginning or end, removing a specific or zeroing. I took a shallow code and was adding…
-
0
votes2
answers995
viewsis not a GROUP BY expression
Hello . I am trying to execute a certain Query on Oracle and I am getting the following error : "is not a GROUP BY expression". Below is the list of tables and query: BILL NRO_CONTA|COD_AGENCIA|NOME…