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
-
4
votes1
answer93
viewsData Cleanup - SQL Server
I’m working with a column of phones, but some lines have two phones separated by ";". 99999999 ; 99999222 12345678 ; 87654321 40028922 123123456 ; 1122334455 My goal is to put duplicate phones on…
-
4
votes2
answers299
viewsData Modeling: Integrity x Performance
In the company that I work for, there’s a data architecture that I’ve never seen before, and I’d like to know if this is common, or if it’s a new market trend. Just to mention the bank is Oracle.…
-
4
votes1
answer1240
viewsConvert Unix Timestamp to Datetime
I am trying to select the largest date from my table, however the dates are stored in Unix Timestamp format in a whole column type. I need to do this conversion because I need to calculate the…
-
4
votes1
answer117
viewsIs it bad practice to use "Guid" and "int" for the same bank?
In a project I’m developing I prioritize the use of Guid for PK because of the ease for me, but it has a table that would be more advantageous to use int. This is wrong?…
-
4
votes4
answers327
viewsReturn results for all months of the interval
I own the following query: SELECT CAST(SUM(CASE WHEN s2.name LIKE '%Servidores' THEN (ta2.time_unit * 1.5)/60 ELSE ta2.time_unit/60 END) as DECIMAL(12,2)) AS TEMPO_CORRETO,…
-
4
votes1
answer96
viewsIs it correct to read the Migrations files and the configuration file?
Files that make the database Migrations should be added in Git versioning? I am using Phinx and I have this doubt regarding the classes that represent the tables that are generated by this library.…
-
4
votes3
answers82
viewsSequenced array within dropdown
Guys, I have a code that prints the arrays if I set the values, but I would like that sequence to be automatic. Let me show you so it’s clear. <?php $busca_produtos = new Produto; $produto =…
-
4
votes1
answer661
viewsJava spring: Infinite recursion (Stackoverflowerror) error
I’m having trouble carrying out the method list of translations of the document, I’m not understanding the reason for the error, follows code: Translation.java @Getter @Setter @NoArgsConstructor…
-
4
votes2
answers97
viewsSearch for lower values of one field according to values of another
I have this data entered in my table. mysql> SELECT * FROM db_cotacao; +----+------------+-------+------------+--------+---------+ | id | data | valor | validade | idforn | idativo |…
-
4
votes2
answers613
viewsNodejs - Mysql Error: Too Many Connections
I recently made a refactor of my code to adopt the MVC standard, because it was very disorganized! However, an error called "Too Many Connections" started to appear. This error causes my Node-mysql…
-
4
votes3
answers1018
viewsConvert to date type 'yyyy-mm-dd'
I have a problem trying to modify the type of date that appears to me in two columns of a table of mine. This is my code: declare @top10reclamacoes varchar(max) declare @html varchar(max) declare…
-
4
votes1
answer462
viewsSave Image in Database
In my system there is a registration of Professional who has the option to save the photo of Professional also, at the moment I am doing a photo conversion to Base64 with Javascript in the front-end…
-
4
votes1
answer134
viewsNomenclature of tables with company name and system acronym
Is there any good reason to put the company name at the beginning of the table name? In almost every company I’ve gone through, it’s an adopted convention that you have to put the name of the…
-
4
votes3
answers100
viewsWhat are the advantages of using a database instead of a JSON file to write data?
Most systems currently use the database feature to record the most diverse types of information, even static information. This leads to the conclusion that a database brings significant…
database modeling software-engineering software-architecture language-independentasked 3 years, 2 months ago user254120 -
3
votes3
answers171
viewsIs it possible for two applications to communicate in an Ad-Hoc network?
For example, I have a database on a PC and I want an application located on another PC to access this database. Is it possible to do this via Ad-Hoc network? If so, how?
databaseasked 10 years, 9 months ago Pedro Vinícius 1,870 -
3
votes3
answers166
viewsForm waiting for a request
Problem My form makes a statement requisição a database (select, insert, update, delete values), but whenever these requests are made a lock occurs in the form (a freeze)! How to prevent forms from…
-
3
votes1
answer1829
viewsExport Mysql database to Sqlite
I usually use a database in the applications I develop locally. With the mysql whenever I need to work clone the application to another machine, I need to generate a dump bank and import at local…
-
3
votes5
answers2467
viewsIs it feasible to define mandatory fields in the application instead of the database?
I came across a system where most of the mandatory field rules are done in the application and not in the database (with the exception of the primary key). As I have no experience with many systems,…
-
3
votes1
answer306
viewsPDO deletes columns with equal names
I realized that by using the PDO to execute the query below, the results are conflicting with the PhpMyadmin and the Console do Mysql: SELECT a.*, n.* FROM arquivo AS a INNER JOIN numeracao AS n ON…
-
3
votes1
answer160
viewsAuthentication difficulty in BD Informix
I need to develop a small report on a legacy basis with Informix bank (this is the first time I work with Informix). However I am having difficulty connecting. I am getting the following error:…
-
3
votes1
answer416
viewsMark duplicate fields in a table
I have a table in my database and I would like to mark the occurrences where a certain code is repeated. Remembering that this code field is not a primary key. Example: Data Código Repetição Status…
-
3
votes1
answer205
viewsSqlite - count primary keys that were not referenced as foreign key
First, I am trying to count the primary keys of a table that WERE and WERE NOT referenced as a foreign key in another table. Also, I want to filter the search using the clause LIKE to show only…
-
3
votes2
answers6430
viewsIncrease number of rows returned by select group in Mysql
I have a table with 1 million lines that I need to do a report that groups the repeated names. I am doing so SELECT instituicao, count(*) from base_wos GROUP BY instituicao;. However always the…
-
3
votes1
answer432
viewsHow to recognize Mysql instances using Java and allow the user to choose the database?
I am developing a project that is requested that it is possible to access different benches of MySQL which are allocated on machines and also on servers. In a way that allows the selection of a…
-
3
votes2
answers385
viewsInnodb and Myisam generating Table already exists error
I am reformulating some screens of my system that, entirely, uses Myisam as Mysql Engine. In this case, these screens will use Innodb after reformulation. Excludes, by Phpmyadmin, all tables Myisam…
-
3
votes1
answer633
viewsHow to collect statistics in Oracle Metadata tables ?
Collecting statistics from User Tables is simple, just use the dbms_utility.analyze_schema, but you can (and can) do this for the Oracle Metadata tables ? This post, was the origin of this doubt.…
-
3
votes2
answers2553
viewsHow to get database information without updating the page
I have a system where he picks up information from the database. And this database is getting data directly, so I wanted to know how I took this data and show it on the page, but without this page…
-
3
votes1
answer1244
viewsCodeigniter opens many connections to the database
I have an application on the client and they are complaining that it is opening many connections with the database, dropping the server. I searched the Internet and couldn’t find anything related. I…
-
3
votes2
answers327
viewsPHP and Mysqli. Table link problem
I’m following a toturial, it’s all the same. My problem is I can’t connect to the table. connect.php: <?php $db = new mysqli('127.0.0.1', 'user', 'pass', 'app'); if ($db -> connect_errno) {…
-
3
votes2
answers5466
viewsHow to duplicate the records of a table in the BD
Well I have a BD with some records. And I would like that amount of records to duplicate. I don’t want to double loop to show the double amount, I would literally duplicate all the records in the…
-
3
votes1
answer474
viewsHow to give a EXECUTE IMMEDIATE command on an ORACLE database from a JAVA application?
The error is when I execute: execute immediate 'update teste set num = 1234 where num = 1'; Exception: java.sql.SQLSyntaxErrorException: ORA-00900: instrução SQL inválida…
-
3
votes5
answers37379
viewsHow to update with Oracle Inner Join
Good afternoon , How do I update with Inner Join , because I need to change the field idnaoleitura = 24 to idnaoleitura = 0 where idrota in (35,45,48,53,60,68,70,79) , remembering the idrota this in…
-
3
votes2
answers451
viewsHow to avoid duplicate emails in the database?
I’m creating a simple CMS in Cakephp to learn how to use the framework. Within my CMS, in the administration part of the site, there is a tab that is called email and in this tab we see all the…
-
3
votes1
answer283
viewsJava JNLP Application and Database
I will start developing a client/server application and in my searches I found Java JNLP. I searched some forums but did not find the answer to this question: Knowing that the application will have…
-
3
votes1
answer5211
viewsSQL Group query with more than one distinct attribute
I have an application that generates approximately 25000 records per day in BD. This will generate a large amount of id’s per day in the user’s BD. According to the user’s business rule, only failed…
-
3
votes2
answers616
views"Convert" an HTML list to Mysql with PHP
I have a large list in HTML with about 106000 lines of code. Where these lines are records and these records are subdivided into: 6 lines of information about a game (As name and year of…
-
3
votes1
answer141
viewsASP.Net MVC application does not connect to the bank
I’m developing a Solution in the object-oriented programming class for the web. Let’s create a stock control system. One of the first "screens" of access, is the login, only at this moment, my…
-
3
votes2
answers8689
viewsWhen to use address table in database
I’m developing a system where several entities will have address. Example: the school has address, the student has address, the teacher has address, the suppliers have address and etc. I’m willing…
-
3
votes1
answer121
views"untrusted Domain" error when trying to connect to the database
While trying to connect to database, I get the following error: Login failed. The login is from an untrusted Domain and cannot be used with Windows Authentication. I’m using MVC 5 and below follows…
-
3
votes2
answers3205
viewsModeling database of a system of friends
Hello, I am developing an application where there will be an option to add friends,is very simple, it is not social network, but have to add friend. I have the user table. What tables and…
-
3
votes1
answer3273
viewsOnline SQL database for LOCAL NETWORK only, connect via c#
I developed a system for my company and need a database hosted on our internal network, explaining better I want to host this database on a PC running a Windows Server 2012 here in the company, our…
-
3
votes1
answer5118
viewsDefine relationship between tables in Mysql
Today I needed to create a table that had a purpose similar to Add the Netflix queue where are saved the movies that the user wants to see (in the application would be stored the urls videos and…
-
3
votes2
answers1023
viewsDatabase modeling problem
I created a system that has control of sales (id, id_vendedor, produto), salesman (id, nome, id_equipe) and team (id, nome) in a company. Example: "John has id: 1 and belongs to the team: Blue; in…
-
3
votes1
answer242
viewsHow to recover data from a query made with "ADODB.Command" object?
Based on the code below, where I can retrieve the results from ADODB.Command? This union will always work with stored Procedure, and the types of parameters that will be used are of the input and…
-
3
votes0
answers162
viewsAdd horizontal line in a Dbchart for a defined value of the y-axis
I have a chart DBChart with a series of values float on the axis y and datetime in the x. I wanted to add a horizontal line according to a defined axis value y. The DBChart has the function to add…
-
3
votes1
answer1552
viewsHow to connect to an existing Sqlite database using PDO?
I want to connect to a database that already exists using PDO and sqlite in PHP, and here is the code I have: class Database extends PDO{ public function __construct(){ parent::__construct("sqlite:…
-
3
votes1
answer145
viewsInsert into database recording in half
I take the name of the news and insert in another table, but one of the fields is going by half, follows image of print: Database Source code of where send: <input name="nomenoticia"…
-
3
votes1
answer549
viewsHow to pass dates in Java to a database?
I’m trying to pass a date in format "yyyy/MM/dd HH:mm:ss" to the database for this I am using the Date() and the SimpleDateFormat(), but he returns me one string. Is there any way he can return me a…
-
3
votes1
answer113
viewsIs there a problem using multi-thread software with Sqlite?
Are there problems using multi-threaded software with an Sqlite database? This database will only have one connection, but the software that will access it is multi-thread (application server). Is…
-
3
votes2
answers2124
viewsHow to save an Sqlite database table to a text file on Android?
I have an application that saves data from a form in an Sqlite database table. Until now, just consult this data within the application, no problems. Example: My form saves information such as name…