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
votes3
answers270
viewsSearching data in database
Good evening, I’m having second thoughts about a certain code. It should search all users in the database and list... however of the error... Follow the excerpt of the code where I make the…
-
1
votes0
answers27
viewsMethod to calculate development time of entity-relationship diagram
Is there any method for calculating the delivery time of the ERI diagram? Objective: to provide the client an estimate of time to complete the DER diagram of a software development project with 114…
-
1
votes1
answer501
viewsMysql: Limit record recording based on value from another table
I have a table A with a field start_date and another end_date. I have a table B with a field date. Is there any way to ensure that a record is only saved on B when B.date be among A.start_date and…
-
1
votes2
answers37
viewsUpdate table according to column quantity
The registration table was not modeled correctly, but I need to do an UPDATE by SQL to perform this import, follow example: Note that the children of Bomi Bulsara, need to stay in [nameDoDependent1]…
-
1
votes2
answers245
views -
1
votes2
answers898
viewsHTML/JS/PHP: Transform date entry into dd/mm/yyyy
Good morning. In my mysql database the dates are saved as dd/mm/yyyy, but the "date" html input only returns dates in the yyyy-mm-dd format, so I can’t filter the database dates, which was my goal.…
-
1
votes0
answers75
viewsIs it wrong that each attribute of a table is a foreign key in another table pointing to it?
I’m making a stock system and modeling, instead of each item having its attributes defined I wanted to make four tables tags (tag_decimal, tag_data, tag_text, tag_boolean) that pointed to the item…
-
1
votes0
answers316
viewsHelp to optimize an index in mysql
I own a site of relationships and for years I try to optimize this query. Almost every day the site hangs because of it. Structure of the user table CREATE TABLE `usuarios` ( `id` bigint(20) NOT…
-
1
votes0
answers5099
viewsMysql - Types for CPF, RG and CNPJ
Fala galera. I am at the beginning of Mysql and I have a question about field types in RG, CPF, CNPJ. I did some research but I can only find answers from years ago, so I’d need something more…
-
1
votes0
answers276
viewsWhat are the advantages and disadvantages of working with Firedac
There’s been a lot of good talk about fireDac but what are the Perks and Disadvantages to use it? Which databases are most suited to this technology?…
-
1
votes0
answers31
viewsError in single Sqlite database query using Provider content
I am having a problem that when trying to make a query in the database of my application through Content Provider. When the attempt to query the database starts the application breaks.I did tests…
-
1
votes1
answer294
viewsImplementing the concept of inheritance in a database
Why the attribute PessoaJuridicaId is not generated? This is the base class Pessoa: public class Pessoa { public Pessoa() { DataCadastro = DateTime.Now; } public int PessoaId { get; set; } public…
-
1
votes2
answers1654
viewsVariable period date SQL Server
Below I have the following code where I search in a table all the data within the specified period in the declared variables. However, a specific client has a different month closure, in this case,…
-
1
votes2
answers1079
viewsHow to disable Trigger for all tables in Postgresql?
How to disable Trigger from all my tables in postgresql?
-
1
votes3
answers55
viewsI tried a Union consultation but did not get the expected result
I made a query with two selects using union and it has two columns: MOBI and DESMOBI. I need the result to show these two columns. when I run it shows only the column MOBI`. Below follows the query.…
-
1
votes2
answers63
viewsSQL query to identify available hourly providers
I have a table for service providers that informs the time they are not available. id_prestador | id_pedido | hora_entrada | hora_saida 1 | abc1 | 2017-08-10 10:00:00 | 2017-08-10 14:00:00 2 | xpto2…
-
1
votes0
answers250
viewsMysql error - request expired
I’m using Mysql, but I’m having to reset the password every time I restart my laptop. I use Sequel pro to access the bank and give the following error: Cannot connect to host 127.0.0.1, or request…
-
1
votes1
answer122
viewsError adding" 0 " to a tinyint(1) field in the database
In my database in the users table, I have a field called status, whose type is tinyint(1). If the status is "0" the user is enabled (can access the site), if the status is "1", disabled. But when…
-
1
votes1
answer96
viewsHow to use time_format() in Mysql?
I made a table like this: create table tabela ( hora time not null ); This table returns me hour, minute and second. How is the table with time_format()? I want to leave it with the time and the…
-
1
votes1
answer69
viewsDoubt query - SQL Server 2012
Good afternoon! Guys, I don’t know if it’s possible, but I wanted to know how to get a record of a line in another line. I’ll illustrate. In the query below is coming out like this. Projeto…
-
1
votes1
answer39
viewsExceptions and database connection
I have a code that query a database. If a timeout exception occurs for example during the execution of the query, the connection closure code and consequent return of the connection to the pool will…
-
1
votes1
answer155
viewsSmallint or int to PK / Primary Key / Primary key?
In languages such as Java, for example, when processing a short int and comparing it with another short int, both are transformed into int. The same occurs in databases like Mysql?
-
1
votes0
answers134
viewsProblem with Firebird database path
When I have a way for ex: C:\Programa\bd.fdb and try to pass to the system, windows does not recognize the bank. Now when I have a path as follows: 192.168.1.1\C:\Programa\bd.fdb the database is…
-
1
votes1
answer182
viewsConnect PHP with MS-Access
I am trying to connect my Access database with PHP, but it is not finding the way. I didn’t want to put the path related to HD because I host my page on a host (it uses Linux) and so I wanted to put…
-
1
votes1
answer711
viewsConnect to sql database a postgres database
Scenario: I have the postgres database A, but I need to connect to the database from sql server 2017. How can I do this?
-
1
votes1
answer492
viewsC# BD . mdf connection string
Good evening, you guys, I have a database . mdf in a Windows Forms and want to make the connection string of it, can anyone help me? My version of Visual Studio is 2015 and the file is: C:Documents…
-
1
votes1
answer24
viewsInformation registered at the bank is exchanged
I have a form that sends the information to a bank and a page that takes this information and prints it in table format. However, the information in this table is appearing exchanged and when I try…
-
1
votes0
answers161
viewsWhich is the most correct way to store files
I always run into this question when I have to work with file storage inside a software. It is ideal that I simply record them in any folder and record the information in the database, with a field…
-
1
votes2
answers256
viewsWhat tools should I use to create an android app
I’m starting in mobile development that will be done in Java or Kotlin and my question is what tools I can use both in the design part and in the database which are the main technologies ?
-
1
votes1
answer152
viewsConnect MS SQL in PGADMIN
Hello, good afternoon! I need to know if there is any tool, script or anything else from where I can have the following scenario: I have a MS SQL database but need to manipulate it through pgAdmin…
-
1
votes2
answers57
viewsQuery in two different tables in Wordpress
I have a code, where it returns me some data of all users of the table wp_usermeta, ( in case I’m only pulling the full Name, and the Capabilities, but to get more complete my table, I would like to…
-
1
votes1
answer542
viewsHow to popular a postgres table with JSON?
I would like to popular my tables with Json. But I’m not getting it. Does anyone have any solution? Follows JSON: https://gist.github.com/letanure/3012978…
-
1
votes0
answers209
viewsEstimated run time - Select
I’m performing some performance tests in my BD using Mysql, and I got the following question. Is there any way to predict how long it will take to execute a query in Mysql after starting its…
-
1
votes0
answers51
viewsHelp tool in Postgresql . conf configuration
someone knows some tool that assists in adjusting the parameters of the postgresql.conf file. I’ve used the PGTUNE and of Pgconfig, but they indicate nothing of the parameters: cpu_tuple_cost…
-
1
votes0
answers32
viewsHow should passwords be recorded in a database?
I am creating a program in Java, connected with a database, my problem is whether I should create a new tebela to save the password and the name of each user or whether I should use this data as…
-
1
votes1
answer120
viewsWhat comes after POO?
I am finishing the course of POO in Java and would like to take a doubt. So far I have not been given anything regarding how I could put a desktop development for third party use. For example, on…
-
1
votes0
answers60
viewsWhat is 'read coherence' in a database?
I’m doing an article on the Oracle DBMS. And when version 4 was released, it was the first database to have readability. However, I can’t find what that or what this functionality means for the…
-
1
votes1
answer92
viewsWhat is the best practice for consulting in large tables?
I have a system composed of several tables.One of the tables is called Publications and contains 15 varied fields, 3 of which are the main ones of my doubt: 1. titulo - varchar(100) 2. subtitulo -…
-
1
votes1
answer40
viewsShow information on Activity androd studio
I’m making a screen "Notification" in the application android, but will only show the database information without notifying user. However the information is not showing on the screen, is giving…
-
1
votes1
answer282
viewsRelationship of tables with the same attributes
My system is for employee control. Where we have the following types of people(or positions): agent, analyst, supervisor, coordinator and manager. Like I did: I created a table for each type of…
-
1
votes1
answer1473
viewsError importing Postgre bank
I have a bank to import, it’s native to Postgresql and is with extension .sql, I’m trying to care in the PgAdmin4 but I can’t do it at all. There’s a picture of the error.…
-
1
votes1
answer1282
viewsSee the best-selling product
I’m having trouble joining two tables and using some aggregation function, I’ve tried it like this: SELECT nome FROM produto INNER JOIN vendaproduto SUM(quantidade) ON produto.idproduto =…
-
1
votes1
answer210
viewsStart and end of a month/year last in parameter (Oracle)
I need you to return the total monthly data according to the MONTH and YEAR parameter reported. I did it this way: WHERE a.dt_mesano_referencia between to_date('01/'|| :NR_MES ||'/'|| :NR_ANO ||'…
-
1
votes1
answer4875
viewsHow to make specific sql queries using Laravel?
I need to make an appointment at the bank to see the birthday of the current month. A consultation of this type, see: SELECT * FROM membros WHERE day(dataNasc) = day(CURRENT_DATE) and…
-
1
votes2
answers1009
viewsRepeat previous rows when there is no record in SQL SERVER data
Friends, good afternoon! I came across a problem at work today, and I still haven’t found a solution to it. As I do not have much experience in the database area I am having difficulty to solve this…
-
1
votes1
answer1527
views -
1
votes1
answer710
viewsHow to generate a report in excel with tables from a database using C#?
How to pass the data of a query to the columns and rows of a sheet in excel? Example: OleDbDataAdapter oda = new OleDbDataAdapter("select * from usuario", conexao.cn); DataTable dt = new…
-
1
votes0
answers46
viewsVisual Studio 2017 Oledb Xamarin.Forms
Guys I’m in need of help in the following, I’m doing a cross-platform project using Visual Studio 2017 and Xamarin.Forms, the problem is: I need to make a connection to MS Access Database. I’ve seen…
database mobile xamarin-forms ms-access visual-studio-2017asked 6 years, 4 months ago Crash_Override 11 -
1
votes0
answers90
viewsRemote connection with Postgresql only works after PING
I have a JAVA application running on one server and the database running on another. Both servers are connected and on the same network, postgresql is enabled to receive external connections. But…
-
1
votes1
answer926
viewsHow to make Inner Join in associative table?
Tables and Indexes: CREATE TABLE CLIENTE( IDCLIENTE INT PRIMARY KEY AUTO_INCREMENT, NOME VARCHAR(30) NOT NULL, SEXO ENUM('M','F') NOT NULL, ID_CARRO INT UNIQUE ); INSERT INTO CLIENTE VALUES…