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
-
-2
votes0
answers34
viewsSelect two tables at once
I got the city and neighborhood tables How do I display the city and neighborhood it belongs to ? tried to use a INNER JOIN but it didn’t work ? in that inner join has a $_GET that should fetch the…
-
-2
votes0
answers11
viewsHow to load database content into Bootstrap modal window?
I am learning php and I ended up getting a question, that I do not know very well solve, my question is the following: How can I pull data from the database to appear in the modal the result of the…
-
-2
votes1
answer31
viewsSQL - COUNT and GROUP BY doubt
I have the following question: Select the first name (first_name) and title of the film (film) of all(s) the actors/actors/actresses (actor) associated(s) with the movies of the (Category) comedy…
-
-2
votes0
answers20
viewsDatabase only retrieves the last form inputs
I have a form where the customer clicking the +button adds 4 more fields in the form. But the database only recovers the last four fields added. How can I resolve this? Follows the script:…
-
-2
votes0
answers15
viewsQuestion about Postgresql 9.5.25 with pgAdmin 3 that comes installed along with it: how to use command line instead of graphical interface?
Use the Postgresql 9.5.25 and along with it comes the pgAdmin 3 installed. However, I don’t want to use the graphical interface of the database. So I go in the same folder as the pgAdmin3.exe is…
-
-2
votes0
answers37
viewssearch image path registered in database
I am trying to display the images of products registered in the database, each product has its own image. <body> <div class="container theme-showcase" role="main"> <div…
-
-2
votes0
answers14
viewsForeign key error
hi my code is giving error #1005 - Can not create table foo.aula (error no. 150 "Foreign key Constraint is incorrectly Formed" DROP TABLE IF EXISTS `aula`; CREATE TABLE IF NOT EXISTS `aula` ( `id`…
databaseasked 3 years, 3 months ago Peniel Henrique 1 -
-3
votes1
answer57
viewsDoubt about file storage on server
How best to store files on a server, such as binary in a database or save it in directories. There is some difference between processing cost in a web application?
-
-3
votes1
answer267
viewsAdd a value to while in php
I have the following code: <?php $con = mysqli_connect("localhost","root","","gibellino"); mysqli_set_charset($con,"utf-8"); $result = mysqli_query($con,"select * from index_img"); while($row =…
-
-3
votes1
answer306
viewsTABLE TUPLA RELATIONSHIP TABLE 1:1
HOW TO CREATE TABLE TUPLA, TABLE WITH RELATIONSHIP 1:1
-
-3
votes1
answer742
viewsVALUES (T_STRING) error in php
I have an error in the variables when trying to call through the database and the following message appears : Parse error: syntax error, Unexpected 'VALUES' (T_STRING) in C: xampp htdocs Site…
-
-3
votes1
answer57
viewsSQL Database
Hello! I am in training in Support and I’m having difficulty understanding the logic of select, I need to make script for example: bring the status of the table Criteria.
-
-3
votes2
answers380
viewsFirebird - Tools
What tools are most used in Firebird management? I know Ibexpert, but he gets paid. There is something similar to Ibexpert, but free?
-
-3
votes2
answers500
viewsHow can I make a C# query in a SQL Server database
I have a project in development in this internship path and therefore I am working on new things. I would like to know how to do in C# a query of data present in SQL Server tables. Sorry if you are…
-
-3
votes1
answer1463
viewsHow to create Trigger postgre
In relation to the table above, 1) Create a Rigger that for each record inserted in tb_move, the account balance is updated in tb_balance. Remembering that if the launch is of the type C' increases…
-
-3
votes1
answer782
viewsRead and insert data into a table via C#
I have this code to insert values in a table column: conn.Open(); comm.CommandText = @"INSERT INTO ArticleBarCode(Code, Code_Article, BarCode, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn,…
-
-3
votes1
answer693
viewsSeveral UPDATES in the Firebird database
I can create a method that performs several updates in the Firebird database? For example, I want to update the following record, but it would have to be one at a time, have to update otherwise?…
-
-3
votes1
answer238
viewsWhy populate a database?
Guys I’m new to DB, do not understand the concept of settlement, my doubt is what is the purpose of the settlement of DB? I need to do this in the construction of a APP but I don’t see the point of…
databaseasked 6 years, 11 months ago Paulo Andrade 33 -
-3
votes1
answer110
viewsCan someone help me find the mistake in this create?
CREATE TABLE PedidoProduto + ProdutoPedido ( Quantidade numeric(50), IDproduto int, IDpedido int, FOREIGN KEY(IDproduto) REFERENCES Produto (IDproduto), FOREIGN KEY(IDpedido) REFERENCES Pedido…
-
-3
votes1
answer546
viewsReturn a single line where it currently returns 2 or more
I’m trying to bring a die, but it doubles when I try to do it. It doubles if the PARC_COD is the same, but should only bring the sum of the return value column in a row indifferent to what is next…
-
-3
votes1
answer173
viewsIn a login system, will all tables be connected with the user table?
I am creating a system for barbershop and would like to make a login system for each user, where the user would register his trade, employees, etc. In my database I have the barber and customer…
-
-3
votes2
answers1875
viewsInsert array into database
I didn’t post the entire code before because it was too extensive (I’ve summarized it by taking some irrelevant data), now it’s the entire code. I’m taking values from the products, I run a foreach…
-
-3
votes1
answer43
viewsReturn dates between number of days
I wonder how I do: I want a variable like days then take the result of this variable and select between the dates counting the number of days Some solution or example?
-
-3
votes2
answers183
viewsWelcome the logged in user
I am creating a database to register users, I would like that after the user shows the login in another Activity one textView with a welcome message of some data entered at the time of registration.…
-
-3
votes1
answer58
viewsScore user who accessed the site 4 days in a row
Every time the user enters the system (logs in), their data is saved in the database, including a Timestamp column. I’m at a loss to solve the following problem: if (usuario entrou 4 dias SEGUIDOS)…
-
-3
votes1
answer122
viewsInsert ID into another field of the same table at the time of INSERT
I’m in the following situation, I’ve been searching the net and found similar aids but not what I really need to know and I don’t even know if it’s possible! Come on! There would be some way for me…
-
-3
votes1
answer1329
viewsError Code: 1064. MYSQL WORKBENCH
Hello I’m trying to create the following table: CREATE TABLE produtos( id integer primary key auto_increment unique , nome varchar(255) unique, descricao varchar(255), preco varchar(10,2) , validade…
-
-3
votes1
answer247
viewsMy first registration and login system does not work, what is the error?
When I go to the page to register, it already displays the message "This login already exists" and does not even let me enter the data. I think the error is in PHP, but I don’t know where. If anyone…
-
-3
votes2
answers1918
viewsWhat is the best database for Python 3?
I am a beginner and in the future I intend to make a management system for small businesses. A local system, which would be the best database learn to do this kind of software in Python 3?
-
-3
votes1
answer134
viewsMy SQL Error 1215: Cannot add Foreign key Constraint!
Well when I’m adding the references he gives this error, the error appears from the 3rd alter table what I do! create database tipoUber_bd; use tipoUber_bd; create table users( CPFUsuario char(11),…
-
-3
votes0
answers34
viewsHOW TO CREATE A WEBSITE OR FORUM THAT HAS ACCESS TO USERS' REGISTRATION DATA
I wanted to know if there is a site/ forum that ADM can access the data of who register (basically the login and password they used to create, only) and that is easy to handle (I am Noob in…
-
-3
votes0
answers16
viewsView SQL codes previously made in Postgresql
I wanted to view the code made in the Query Editor of the Query Tool in Postgresql. In Mysql, for example, every time it opens, the codes made previously appear, already in Postgre after closing it…
-
-3
votes0
answers15
viewsbest way to store user profile images
What is the best way to store a user’s profile image? using python, flask, mysql. I am developing a user registration system and want to store profile photos, I saw that storing the image itself in…
-
-3
votes0
answers30
viewsSQL: I need my 2nd table with FK of the 1st automatically updated
I have a Sales_order table with Order Number and other information and created a table with FK of the 1st. I want every time a new order automatically falls in the 2nd (Requested) with the column…
-
-3
votes2
answers936
viewsjava login screen and Mysql database
I am validating the login of a simple system but giving an error does not login I will send you the code of the class and the moment I try to log in. Lojabd class that validates the user class that…
-
-3
votes1
answer41
viewsLOGIN ROUTE ERROR
Hello, I am a student of programming, and during a project I came across a mistake that I cannot solve. I am basically in the creation part of "login" route, whose purpose is to search in the…
-
-3
votes1
answer41
viewsMysql connects but does not display keys
Good morning my code returns this error Fatal error: Uncaught Error: Call to Undefined Function mysql_query() in /home2/minhap26/public_html/pages/lists.php:8 Stack trace: #0…
-
-3
votes1
answer354
viewsPhpmyadmin gives error when importing SQL file even after changes in PHP.ini
I recently manually installed the PHP, Apache and the Mariadb in Ubuntu 20.04, everything apparently works normal, I can access and modify the databases both by the terminal and by the Workbench or…
-
-3
votes1
answer242
viewsUnable to Import csv file into pandas
Good guys, I’m trying to import a csv file into pandas through the code below: import pandas as pd data = pd.read_csv('pop.csv') He can’t find the file under any circumstances! Note: The file is in…
-
-3
votes1
answer57
viewsI need to present the product with the highest gross sales
SELECT p.descricao_prod FROM produto p INNER JOIN venda v ON v.cod_prod = p.codigo WHERE p.preco = (SELECT MAX(p.preco) FROM produto p) I tried with this code, but, it only presents me the product…
-
-3
votes1
answer28
viewsHow to organize a Mysql table efficiently and scalably?
I am doing a refactoring in a system that has several with many tables that have many columns, that is, up to 148 columns in a table, how to refactor such table? This is the table CREATE TABLE…
-
-3
votes1
answer23
viewsPROCEDURE ERROR PERFORMS ONLY ONCE AFTER GOING MYSQL CONDITION
I have a problem in my past, the scenario is that I have null and not null values that are primary key fields, I am making a Datawarehouse. As all these values need to be calculated, when running…
-
-4
votes1
answer266
viewsIs it possible to take the Foursquare API to see the location of all establishments?
You can get Foursquare API, Google Maps or other site to acquire the location of all the establishments in a city? I would also like to know whether it is possible to filter by a specific branch,…
-
-4
votes2
answers98
viewshow do I save the data entry permanently
I want to create a C program in which the user enters his name and this is saved permanently, but the user name is only saved until the program closes. How do I make the program to leave user data…
-
-4
votes1
answer15542
viewsError "Warning: mysqli_query() expects Parameter 1 to be mysqli, null Given"
I am developing a PHP API, which is hosted on Hostinger. However, when I do the SQL query on Mysqli, I get the same error no matter what changes I make to the code: Warning: mysqli_query() expects…
-
-4
votes3
answers1025
viewsWhat types of data exist in Mysql for storing text and integer numbers?
The attribute I want to store refers to a class, the code of this class must contain integers and letters, and it is a primary key attribute. Example of value I want to store: SI3P39
-
-4
votes4
answers620
viewsHow to round off this number: 3084.08 SQL SERVER?
How can I round this number: 3084.08 to: 3084.09 in sql server?
-
-4
votes2
answers69
viewsHow do I extract the number of orders with 5 different items? I have this query but it is coming out a different result than expected
SELECT DISTINCT(pedidos.id_pedidos),produtos.nome_produto FROM pedidos INNER JOIN itens_dopedido ON itens_dopedido.id_pedido=pedidos.id_pedidos INNER JOIN produtos ON…
-
-4
votes1
answer482
viewsSqlite Database is in 'binary' format in Visual Studio Code
Hello, I’m inexperienced with VS Code yet, and I’m creating a web application, but I’m having a problem and I haven’t found the solution on any other site...(I’m using knex db). I’ve tried to erase…
-
-4
votes1
answer44
viewsHello, guys! I’m new to Database and have a question in Sql Managent Studio. How do I get out of here and proceed?
WHAT I ADD TO 'SERVER NAME'?…