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
answer43
viewsCompare tables and add result to row
I have two tables Table 1 N3_FILIAL | N3_CBASE | N3_ITEM | N3_CCDEPR 0N3_FILIAL | N3_CBASE | N3_ITEM | N3_CCONTAB | N3_CUSTBEM | N3_VORIG1 | N3_TXDEPR1 | N3_VRDACM1 0001 BENF000001 0001 12301020014…
-
1
votes1
answer42
viewsHow to auto-complete a value without overloading the database
Well, I’m working with a table with a little over 60,000 records and a situation has arisen in which, through an input the user can search some text that contains in a record. Initially the user…
-
1
votes1
answer49
viewsDatabase and Listview do not work
I’m trying to create an app that records data and displays it in a Listview, and then gradually sophisticate the app, but when it comes to saving the data in the database, it doesn’t save. In Debug…
-
1
votes2
answers97
viewsPulling repeated data from the database to Datagridview
I’m working on a c# project where I have a form TelaInicio where there is a DataGridView where all bank information is loaded and for this I have created a method called CarregarGrid() in form…
-
1
votes0
answers203
viewscloud firestore - Query with Data type fields
In the android application that I’m trying to mount, I have a filter screen by registration date and I need to perform the query in the firestore cloud using this field, in the database it is the…
-
1
votes1
answer114
viewsInsert method does not save data
I have an application where the goal (at the moment) is to take the data typed in a form and save in the Database. And the Insert method of my Datasource always returns me false I do not understand…
-
1
votes2
answers389
viewsSQL - Doubt Query Exists and Not Exists
Guys, I’m a bit of a beginner in SQL Database and I’m having a problem doing a query. I need a light, help because I’m not yet understanding how a query with a exist (has to be exists and exists…
-
1
votes0
answers1407
viewsUncaught Error: Call to a Member Function fetch() on Boolean
I have a problem in a project. I can not solve, was running the same code until yesterday. Simply today, no longer works. I will send here the function that is a select in the database. Thank you.…
-
1
votes0
answers46
viewsPerformance Firebird
I’m trying to make Firebird faster to enter records via Procedure, but I’m not getting it, currently I see that Firebird does not use 100% of the machine’s available resources, I’ve already searched…
-
1
votes1
answer169
viewsHow to make multiple database connections with Laravel 4.2
I have an app written on Laravel Framework 4.2, rotating in the PHP 5.6, in the Operating System Windows 7, connected to a mysql database, there was the need to make additional connection in another…
-
1
votes1
answer274
viewsError inserting data with Spring
I am entering data that the user type in the console, I take these values with the class Scanner of Java and play in the Postgres database using Spring Boot. The problem is when I will insert a…
-
1
votes2
answers68
viewsForeign Key (foreign key) referencing utility in the database
I have a question in jobs with databases. Exemplifying, as the image below: Well, I know I should include in the table agendar_consulta the user who needs a consultation and the doctor who will…
-
1
votes2
answers90
viewsHow can I Create a column in SQL SERVER where, depending on the value, debt or credit appears?
Good friends, I made a program where I import data from an excel file in the sql database, this database is about values, and etc... And wanted to know if you have how to create a column where after…
-
1
votes1
answer89
viewsTake data from a table through an N:N relation
I have a system made in PHP and Mysql where I have two types of registration, teacher and student. On this platform, the teacher can add a student as "friend" and the student can also add a teacher…
-
1
votes1
answer150
viewsMysql - Error performing INSERT with FOREIGN KEY
Hello, when performing an insert in the database Mysql returns the following error: ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`tb_hosts`,…
-
1
votes1
answer118
viewsDoubt with the Function window in Postgresql
I have a job for college and I have a question in an exercise that I have to use the window functions to make the correct query. This is my query: SELECT pais, modelo, fabricante.nome, (venda.valor…
-
1
votes0
answers43
viewsJavafx: Update an entire database from a tableView
Good night, you guys! I’m building a program in Javafx, but I’m still very young at it. So I have a tableview with information about students. This tableView has a "tcbCondicate" column (whether or…
-
1
votes2
answers90
viewsProblem with database query by date using Line and Entity in C#
I have the following appointment at the bank; consultas = ctx.Consultas.Include(c => c.Cliente).Include(p => p.Procedimento).ToList(); which works perfectly, but I want to include a Where to…
-
1
votes0
answers29
viewsHow to fix error num_rows Property
Folks I have a question regarding this error: Notice: Trying to get Property 'num_rows' of non-object in C: xampp htdocs control inc database.php on line 94. Follows part of the code. function find(…
-
1
votes1
answer68
viewsPython - value saved to database is reset
I’m doing a job for college using an Arduino and a Raspberry to make a self-contained vegetable garden. The sensors of temperature and humidity, luminosity and the hygrometer are connected to the…
-
1
votes1
answer175
viewsSave File to Database with PHP
I have a web application, where everything is running smoothly with exception of file upload. the PHP responsible for storing the data in the database and saving the file in the folder is this…
-
1
votes1
answer721
viewsHow to create a @Onetomany relationship in JPA, in 3 tables that already exist in the database?
I want to create a relationship @OneToMany in JPA using 3 tables I have already created in my database (I don’t want it to create the tables for me), the tables are Usuario, Perfil and…
-
1
votes0
answers43
viewsModeling Database
I am doing a modeling for company and I am an intern. I studied a lot on the site that is in English... When I finished modeling there I went to show my modeling and they say I’m doing something…
-
1
votes1
answer154
viewsHyphen as column name in database
It is possible to work with hyphenated columns (-) within a select? Example: SELECT fm-codigo, descricao FROM ems2cad.pub.familia Progress database I am performing the query using PHP via ODBC,…
-
1
votes1
answer1533
viewsHow to convert a VARCHAR(30) FIELD WITH SPECIAL CHARACTERS TO NUMBER?
I have a seemingly simple question, but I’ve been racking my brain for a few hours, so I decided to ask for help. When executing the below query it normally executes. Select campo1, campo2 from…
-
1
votes2
answers189
viewsGet the sum of last week’s records
Hello, I am studying Laravel I’m using the version 5.4, I need some help 'cause I’m not getting back the total records from last week’s database, I managed to return the total, and the total of the…
-
1
votes0
answers65
viewsImport excel table directly into mysql
I’m using the following code to try to import 30,000 csv records into a comic mysql on the hostgator server load data local infile 'public_html/empresa.csv' into table empresa fields terminated by…
-
1
votes2
answers38
viewsQuery mysql bring last call without duplicate
Well, I have the following table: CREATE TABLE `chamado` ( `id` int(11) NOT NULL, `nomechamado` varchar(25) COLLATE utf8_unicode_ci NOT NULL, `tipochamado` varchar(25) COLLATE utf8_unicode_ci NOT…
-
1
votes1
answer33
viewssearch is not returning the php, mysql data
I am making a search page so that when I do the search is not returning the data could help me? what I’m missing? <?php require_once('Connections/conn2.php'); ?> <?php $tipo_prod =…
-
1
votes2
answers199
viewsCreation of Mysql database
I’m starting with Mysql database, and I’d like to ask you a few questions. I have been doing some research but still I could not resolve these doubts. They would be: I noticed that in the creation…
-
1
votes2
answers97
viewsSoftware with local and remote BD recording
I have a question about the possibility of doing a type of program and what means to use. Just for the record, I’m not asking for "how to do the programming," but an opinion from more experienced…
-
1
votes1
answer199
viewsWhat is the difference between parameters and attributes when creating tables in a system?
I am a data migrator and every day, I have the pleasure and displeasure to know numerous databases of the most varied commercial systems in the market. My doubt lies in the way people model the…
-
1
votes1
answer284
viewsLoad database information into a textbox using the layers template with C#
Good morning, everyone! I’m new enrolled in the forum, but I’ve been following them for some time, I’m finishing a college TCC in C# (Visual Studio 2017), and I’m having a hard time in the project…
-
1
votes1
answer43
viewsId booked in key breach transaction
I have the following question: In an operation of INSERT in a table when a key violation occurs and a ROOLBACK of the transaction, the ID still reserved? Below illustrative examples: Script of the…
-
1
votes0
answers72
viewsResult + Grouping Mysql result
I have a tremendous doubt in mounting this query that I am attaching, I have a table and cross with another to know the state where had more sales, where the result is grouped and shows me the total…
-
1
votes1
answer243
viewsRelate firebase Authetication to Realtime database
I am creating an application, using firebase, in which the user performs a registration in firebase. I am using firebase authetication to create user by email/password and the Realtime database to…
-
1
votes3
answers61
viewsQuery SQL Doubt - Query using two tables
I’m having doubts about how to query. The problem is the following: I have two tables similar to the ones described below (I don’t have exactly how they were, but are next to the representation…
-
1
votes1
answer135
viewsError returning objects saved in database between activites - Null object
I’m developing a simple application to fill out a form, display the registrants and edit them. I’m using the one-to-many relationship where a patient can hold multiple photos, photos that are being…
-
1
votes1
answer558
viewsHow to load an Oracle database into R?
I have access to an Oracle database, but have always used this data in the R using the PL/SQL to extract the data in csv. But now I would like to connect my Oracle database on itself RStudio. After…
-
1
votes0
answers98
viewsHow to reduce Mysql query execution time?
In a Mysql database 5.6 I have two tables, TAB_A and TAB_B, whose relation is from 1 registry in TAB_A to "n" records in TAB_B. I am making an appointment as indicated below. When the TAB_A table…
-
1
votes1
answer33
viewsCreate dynamic Divs (Codeigniter)
I need to create multiple Ivs inside a foreach in my view, so far so view: <?php echo form_open('admin/marcacao/registraMarcacoes'); ?> <div class="area-imagem"> <img src="<?=…
-
1
votes0
answers33
viewsIs it possible to store the result of an ANALYZE TABLE or SHOW in Mysql in variables?
Good night, everybody, all right? I’m having a little silly doubt about the return of commands ANALYZE TABLE and SHOW in Mysql. I know that if I make a query using SELECT I can store the desired…
-
1
votes0
answers208
viewsCount number of occurrences in Postgresql
I have a database where the values are organized more or less as follows: id | produto | data com registro de venda ---------------------------------------------- 1 | Prod1 | 17/09/2019 2 | Prod1 |…
-
1
votes1
answer2432
viewsSQL - SELECT DISTINCT in only one field
So, I’m doing a search in which returns the non-repeating geometries (which has as layer name Access and Middle): SELECT DISTINCT geo_geometria FROM geral_elemento_cartografico WHERE ds_camada LIKE…
-
1
votes1
answer160
viewsI cannot insert email to the PHP - mysql database
I’m trying to insert a simple email to the database called "newsletter_emails". Checking whether a particular user is already in the database works. The excerpt starts at "News Letter" <?php…
-
1
votes1
answer474
viewsRemove with regex everything after two points in the SQL query
GOAL I want to remove with regex in SQL query everything after two points, can anyone help me mount this query? I made several attempts, but without success. Normal query Remove with Regex Desired…
-
1
votes1
answer58
viewsError while running Migration
Error: 1005 Can’t create table 'cobranca_simples. #sql-f04_1f0' (Errno: 150) (SQL: alter table carteira_cliente add Constraint carteira_cliente_carteira_id_foreign Foreign key (carteira_id)…
-
1
votes2
answers145
viewsSELECT RANGE 1 IN 1 HOUR - POSTGRESQL
GOAL I’d like to make a SELECT within a range of 1 hour in 1 hour DATA TABLE CREATE TABLE t ( t_id INT PRIMARY KEY, time TIMESTAMP ); INSERT INTO t VALUES (1, '2019-10-28 08:00:00'); INSERT INTO t…
-
1
votes0
answers92
viewsFilter records with predefined time intervals in Mysql, using PHP
I am making a Datalogger system and I would like to know if there is any intrinsic function of Mysql to pick up, on the record search screen, the value in a pre-time intervaldefined, or if I must…
-
1
votes1
answer44
viewsMysql select consecutive days
All right?! I have selected below to bring the days where there is event 99. If there is more than one event 99 on the same day it brings the day only once. I would like to improve this select to…