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
-
-1
votes1
answer45
viewsSelect to calculate all records and total record by one condition
I have a sales table per user, which connects user_id, product_name and sales value. I would like to make an inquiry to return how many products were sold per user and how many products with more…
-
-1
votes1
answer28
viewsI need to condition to bring in group by only the data that do not have a condition
I have the following query: SELECT id_grupo, id_analista FROM tb_grupo_analista GROUP BY id_grupo, id_analista; there is a third column called tp_controle, where I need to condition the query from…
-
-1
votes1
answer21
viewsHow to list tables that contain null values in an oracle database?
Which tables contain null values? My logic was: SELECT * FROM all_tables; WHERE table IS NULL;
-
-1
votes2
answers919
viewsExchanging column values in Mysql
I have a Mysql table with coordinates, the column names are X and Y. Now I want to change the column values in this table, so that X become Y and Y become X. The most apparent solution would be to…
-
-1
votes1
answer38
viewsPymysql - What is . cursor() for
I am learning database through Pymysql in Python, but many videos only talk about how to do but do not speak because... I wanted to ask what . cursor() in Pymysql is for?
-
-1
votes2
answers58
viewsDoubt about database
Can anyone tell me what the double quotes are for in the table name in a query? for example: select * from "student" Where name= 'Stefany' what the two quotes of the student table do differently?…
databaseasked 3 years, 3 months ago Stefany Jenifer 7 -
-1
votes0
answers22
viewsHow do I invert a dataframe?
How do I display this df in reverse order ? I did the inversion by the index, but only the index reversed, the data of the dates without inversion remained in the same position. Basically I want to…
-
-1
votes0
answers15
viewsI installed Mysql Workbench in Ubuntu but I click on the local server it gives this message of the figure below. In the terminal I can see the database
Guys I’m having a problem with my Ubuntu in the database. Someone to help me ? I installed Mysql Workbench but I click on the local server it gives this message of the figure below. However in the…
-
-1
votes0
answers9
viewsPlace size on the product fixed until the end of the purchase at Hostinger
I have Hostinger put size in the product but is not selected fixed until end of shopping cart website I need help
-
-1
votes2
answers542
viewsInsert multiple records into Mysql using NODEJS
How do I add multiple records at once in Mysql by passing an array of, for example, products? HTTP-POST request, where products is an array with an x number of products. FRONT-END…
-
-1
votes1
answer1299
viewsProcedure in Mysql to clone products, Using CURSOR FOR SELECT
I need to clone the data from an EST_PROD_PRECO_CUSTO_EMPRESA table of id x company for the same table but of the company with id y. in Pl/Sql I did so. DECLARE CURSOR v_precos IS SELECT ID_PRODUTO,…
-
-1
votes1
answer626
viewsTreat error when connecting to Mysql with PDO
People would like to treat the error that occurs if the Mysql server is not running, I want only one message to appear so I made the following code: function mensagemErro () { throw new…
-
-1
votes1
answer39
viewsTrigger SQL Server
I have this Trigger in Postgresql and I’m having a hard time turning it into SQL Server. -- Trigger -- CREATE TRIGGER livro_original BEFORE INSERT ON tabela FOR EACH ROW EXECUTE PROCEDURE…
-
-1
votes1
answer181
viewsHow to generate a Javascript Object Array dynamically
I want to "assemble" a JSON object array with data from the database, but some challenges have arisen. I have the following selection field with a method that is called every time the value is…
-
-1
votes1
answer89
viewsProblem insert into Mariadb database images
I am using Mariadb and a LONGBLOB field to store my images, when I have insert small images (300KB or less) normally inserts, however larger images that this gives this error here: Mariadb [-1]…
-
-1
votes1
answer29
viewsQUERY MARIA DB TO FILTER CURRENT TIMESTAMP ONLY
The query: SELECT DISTINCT hosts.name as "Unidade de Negócio", CASE WHEN services.acknowledged = 1 THEN acknowledgements.comment_data ELSE 0 END AS "Análise", hosts.last_state_change*1000 as…
-
-1
votes2
answers158
viewsSELECT COUNT with low performance in mysql
I use a query within PHP to display the list of related categories and subcategories, get back more than 10,000 results (right) in 3 seconds on average, but after I implemented a subquery to check…
-
-1
votes2
answers114
viewsmysqli_connect does not connect
I’m having difficulty solving the connection with php and BD On the page of my project he presents the following message: Warning: mysqli_fetch_assoc() expects Parameter 1 to be mysqli_result,…
-
-1
votes1
answer153
viewsI’m using JSON database and I have a question?
I have a JSON database of users, for example, if I update my username via AJAX POST, click update and call AJAX exchange the value based on my ID with PHP, all right. Ai enters the doubt in PHP…
-
-1
votes1
answer34
viewsCombobox already selected with database value
I have some combobox in the area of editing user information and I need to pull the data already selected previously by the user at registration time. I tried to do with the foreach but it didn’t…
-
-1
votes1
answer32
viewsI can’t send my App data to the database
Ola I have had some problems with my Sqlite database in Android Studio when I try to add a new user it does not insert and presenting the error message when inserting users. According to what I…
-
-1
votes1
answer173
viewsAssociative table in Laravel 5.8 (Migrate)
I am making a system for a school in the automotive sector that offers courses, this system the user will be able to register the courses and view them, in general, will be a panel for him to…
-
-1
votes1
answer88
viewsPopular table using two that has no link
Guys I’m having a little problem I have the following situation: table escritorio where I have a field called id that I’m gonna need table etapas where I have the fields id that I’m gonna need; I…
-
-1
votes2
answers73
viewsCalculating balance and separation by currency
I am in need of help to do a function that I can know the balance of customers' invoices and that the value is separated by coins of invoices (for example 250 USD | 340 EUR) because there are…
-
-1
votes2
answers266
viewsHow to store the values of a phpMyAdmin table in a variable/array/array and use it in Arduino code?
My school work consists of a basic security system using card frequencies, in a similar way to buses: passes card in the reader, if the frequency is X releases the ratchet, if it is non-X the…
-
-1
votes1
answer214
viewsC Language Database
I’m trying to solve this question: But I’m not getting the proper compilation done. My code is this: #include <stdio.h> typedef struct{ int idade; char nome[50]; char sexo[2]; char…
-
-1
votes1
answer1038
viewsError connecting to bank!
I made a page to register information of a student in the mysql database, but when sending the form data, it returns these errors: Notice: Undefined variable: mysqli in C: xampp htdocs Easytec…
-
-1
votes3
answers212
viewsRelational Algebra - Query in 3 tables
Good afternoon,I’m having a hard time returning a value from my bank when it has two attributes, I’m starting from this statement. Select the names of the parts that use the materials with the names…
-
-1
votes1
answer195
viewsGroup two columns into two mysql tables
I have two tables that I am joining to recover the related data in this way: Tabela Processos: Tabela Anexos id | processos processoid | titulo 1 | Processo 1 1 | REQUERIMENTO 2 | Processo 2 1 |…
-
-1
votes1
answer81
views -
-1
votes1
answer322
viewsInsert data into a foreign key database
I am doing a database course and we have made a database with several tables with Foreign key below. I would like to know how to enter the data correctly in this table, because when inserting the…
-
-1
votes1
answer25
viewsHow to update a column of data each time someone enters a page? This is so they can show in the table
The error is in the code snippet where there is the $update variable below. I use Mysql and have this table and the goal is to show in an html table the totalranking points. When someone earns…
-
-1
votes2
answers87
viewsInsert Widget into a list with Defaultlistmodel [JAVA]
all right? I am creating an application that needs to show some elements registered in a list, which I will show through Defaultlistmodel. Unfortunately within the application it recognizes the…
-
-1
votes2
answers65
viewsSearch multiple tables at the same time Mysql
Well, I’ve got the tables professores, materias, turmas. To make it easier and simpler (because all I need is that data), say that there are the following data: turmas (2)…
-
-1
votes1
answer207
viewsRender images from a category in React-Native
I’m starting in React-On and I’m trying to make an application to divide images into categories, I wanted to click on an image and so it rendered on screen all images that belonged to that category…
-
-1
votes1
answer98
viewsSearch for two columns in the database
I need help on how to do a two-column search, I’m a beginner. If I type a category it finds, if I type a city it finds, however, if I type category and city ex: agencies são paulo he returns…
-
-1
votes1
answer89
viewsNodejs + mssql how to do a search sequence
I’m starting with nodejs and I came across a problem that I’ve been a few days resisting not posting here, but it seems I don’t have enough knowledge and I can’t find material when searching for…
-
-1
votes2
answers217
viewsMigrate data from one table column to another table column
I work in a company where we implement a new functionality in our system, but previously a field of our table was bug_passos varchar(500), now with the new implementation, we create a new table with…
-
-1
votes1
answer139
viewsHow do I bring records from the database by clicking on the checkbox using jquery and ajax?
Well, I can bring you data from the bank using ajax, but I want you to click on input of the kind checkbox, he performs the database query and shows me the data inside a flexbox. I have 10 checkbox,…
-
-1
votes1
answer39
viewsHow do I print data by data in sql?(selects all data, but only prints one by one in array format)!
$sql = "SELECT * FROM perguntas ORDER BY id_pergunta"; $execsql = mysqli_query($conn, $sql) or die("Erro"); while($row = mysqli_fetch_array($execsql)){ # code... …
-
-1
votes1
answer475
viewsSequelize Create method does not insert an object field
I am making an application with Sequelize, and when I run the model.create({obj}) function, one of the fields is not inserted in the database. The field in question is a Foreign key from another…
-
-1
votes1
answer93
viewsError deleting a BD widget from a column
I’m trying to create a Postings in Node. A post can be created, shown or deleted. For this I created a table called posts with the following fields : table.string('category').notNullable()…
-
-1
votes2
answers107
viewspython cleaning raw data manually
import pandas as pd data_r = open('rosalind_gc.txt', 'r') data_r1 = data_r.readlines() data_r2 = [] data_r3 = [] #tirar os \n do texto for i in data_r1: data_r2.append(i.rstrip()) data_index = []…
-
-1
votes2
answers31
viewsCode problem probably coming from Sqlserver
I’m trying to create a very simple login system, I’m new to programming and I’m still learning and I came across a mistake, The compiler does not present any errors however when running and trying…
-
-1
votes1
answer29
viewsAzure connection - SQL Server 2005
I’ve been trying to connect on the Microsoft Azure database server to an application encoded in . Net Framework that is running on a windows server 2003. The problem is that only this server is…
-
-1
votes1
answer145
viewsReturning Firebase data in an Array
So I have a little problem that I can’t solve at all. I’m using the firebase database in conjunction with an ESP8266 microcontroller. The ESP8266 sends the sensor data to the firebase, and through…
-
-1
votes1
answer36
viewsPHP cannot pull data from the database using Bootstrap
I have a form in PHP where presents the data of the logged in user. Follow code: Precisa de troco?<br> <input name="troco" type="text" id="troco" value=" Nenhum"…
-
-1
votes1
answer37
viewsAdd values from a column in the table
I need to select the 3 users with the highest revenue. Before in the table cde_usuario there was a column called scythe, being very simple to make this query, used this sql: $sql = "SELECT * FROM…
-
-1
votes1
answer39
viewsHow to use the required and check if the data has already been entered?
How can I make it mandatory for the user to fill in all the form fields? I tried to put required in the code but for some reason there is no message that usually appears when I put the same code in…
-
-1
votes1
answer123
viewsI can’t start Xampp
While trying to start Mysql in xampp as usual, this error occurred: Error: MySQL shutdown unexpectedly. 14:04:23 [mysql] This may be due to a blocked port, missing dependencies, 14:04:23 [mysql]…