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
viewsUser with own page
I’m making a portal, and to register need Cpf and email. Then I send a confirmation email, it clicks on the link and its situation in my comic changes. So the user can access the portal. It will…
-
1
votes0
answers23
viewsHow to automatically generate fields in Firebase Cloudfirestorage
I am using Firebase database 'Cloudfirestore', I wonder if it is possible to save the fields automatically, so when adding any new item, do not need to write the name of each field and the value. If…
-
1
votes1
answer347
viewsWhich database connection is best?
I started working and am updating the company system, it currently uses this connection: $link = mysqli_connect("0.0.0.0", "teste", "teste", "teste"); mysqli_set_charset($link, "utf8"); if…
-
1
votes1
answer43
viewsAlternatives to using transactions on Myisam
I have an application that is in a hosting that does not support me the storage mechanism Innodb, therefore, I am at the mercy of the use of Myisam. There is a secure alternative to using…
-
1
votes1
answer2316
viewsHow to display the image saved in the database in my html code
I have a mysql database created in phpmyadmin, already saved the path of the pictures there, also in an image table with id and name(img), now I would like to know how to display these images in the…
-
1
votes1
answer499
viewsError saving JPEG image in database as string (Base64)
I’m developing an app that has a form where the user can attach a photo to the form. However I am having difficulty implementing this. In my APK I already capture the image, convert to base 64 and…
-
1
votes0
answers29
viewsHow to assign a "Code" Product to the User Request
So guys I’m modeling a database in Mysql that has 4 tables USERS REQUESTS PRODUCTS STOCKPILE A PEDIDO who owns ID_USUARIO, ID_PRODUTO and STATUS, and when the request is made he will have the ESTADO…
-
1
votes1
answer39
viewsHow to make this condition correctly in Mysql?
I’m wondering which affiliates have repeated enrollment within a company until the exact moment I get to make this query: SELECT DISTINCT filiados.`Filiado_Id`, filiados.`Filiado_MatriculaEmpresa`…
-
1
votes1
answer109
viewsEloquent mapping, is it?
Is there any way to map a foreign key to a database out of my default database in Laravel Eloquent? Example: CREATE TABLE Banco1.Persons ( PersonID int, LastName varchar(255), FirstName…
-
1
votes1
answer32
viewsOverwriting data in Rstudio
I’m new to programming in R and I have a problem. I have two columns (X and Y, respectively), in the first I have a series of values, where some are negative and I need a function that for each…
databaseasked 5 years, 8 months ago Iuri Maicon Moreira 19 -
1
votes1
answer190
viewsVery Crazy Error in Postgresql X Fastreport Registry
I have several tables that do Masterdetail among themselves, I will not put the structure here because it is very complex, are 26 tables involved. The error is as follows: in a table there is a…
-
1
votes3
answers281
viewsLonger date search for a specific ID
I have a problem in a SQL where I need to find the biggest date of a ID specific, where it has several records of this same ID: Dice: ID - date - name 2 - 10/10/2004 - cesar 5 - 10/10/2008 - Japan 4…
-
1
votes1
answer1350
viewsError "No column name was specified"
Could someone please let me know why you made that mistake? "Msg 8155, Level 16, State 2, Line 26 No column name was specified for column 1 of 'A'. Msg 8155, Level 16, State 2, Line 42 No column…
-
1
votes2
answers58
viewsBring records that is not in another table
SELECT * FROM quiz WHERE status='publicado' AND NOT quiz.id_quiz IN (SELECT id_quiz FROM quiz_resolvido WHERE quiz_resolvido.id_usuario=1) order by rand() LIMIT 0,10; Today I use this Query to…
-
1
votes1
answer4525
viewsHow to handle Null fields in Postgresql
Hello, I need to know how to best use COALESCE to treat the null fields in my table. My problem is the following, I’m simulating 6 Stores and their respective cards, let’s assume that one or more…
-
1
votes1
answer558
viewsSpecialization multiple foreign key
Hello, I am modeling a database and I came across the following problem: I have a table called team, which is a generalization to 4 specialized tables, where each will contain a different id, to…
-
1
votes1
answer82
viewsRelational database without referential integrity
I bought a software to make some modifications and implement improvements. However, when I went to evaluate the database, it has no referential integrity, that is, the tables are not interconnected.…
-
1
votes1
answer461
viewsComment on Mysql table
You can insert a comment in the table equal to the comment in a table field? I need to enter information up to 160 characters in the database tables to help the other devs to have a brief summary of…
-
1
votes1
answer203
viewsSelect all items with same Id in the same table
Very well, I will try to be as clear as possible. I have the stock table where will have there several products -> Productoid and its Quantity. In the same table the product can be repeated with…
-
1
votes1
answer136
viewsSort string and ASC number
I need to sort a table upwards, but the target column has numbers (1,2,3,4,5 in String format) and letters (P,M,G,GG). How can I do a query that first sorts the strings (G,M,P) in ascending order,…
-
1
votes0
answers229
viewsLCK_M_IX in SQL Server database
Guys, I have two distinct client bases in SQL Server 2008, and both using the same system, which uses BDE for connection. I have my own app Scripter to make SQL queries in databases. Problem On both…
-
1
votes1
answer62
viewsBring certain record first in SQL query
Hello! All right? I have an image registration system on a portfolio page. In my database I have a table with a column for the image path and a column called main which is a char(1) which can be’S'…
-
1
votes1
answer209
viewsExport Sqlite Android Database
I need to export my database Sqlite to a folder on the device on which it will be installed, and every time I open the application, the file ". bd" be updated so that at the end of the month I can…
-
1
votes2
answers570
viewsCreate a VIEW or a new TABLE in Postgres?
Olás! I have a situation... I have a table that will have about 3*10 12 lines (3 trillion), but with only 3 attributes. In this table will have the Ids of 2 individuals and the similarity between…
-
1
votes1
answer1994
viewsHow to identify a Job being executed?
Hello.. I created a Job in ORACLE, where it runs a PROCEDURE, but I wanted to perform a SELECT, where I returned the status of this Job. Because I will use this information to return a reply to the…
-
1
votes1
answer1038
viewsI would like to understand what OLTP is
They asked me this question: What is OLTP? I ran home, opened google and started to "goolgar", so I came across these codes, who say they have problems in OLTP environments and I’m not understanding…
-
1
votes1
answer26
viewsReturn non-repeated lines in a Select
I am using the following select on oracle select DISTINCT delivery, dt_coletado from table1 and is returned to the following line DELIVERY DT_COLETADO 8816619995 2019-05-17 00:51:04 8816619995…
-
1
votes0
answers351
viewsToo much delay in query only in Mysql
Here in the company we have PG and Mysql databases, these two banks are networked and are identical in both structure and data, where a "robot" mirrors them every 10 min. So far so good... It turns…
-
1
votes1
answer221
viewsHow to determine the most suitable data type for a fixed-size numerical field?
I’m having a doubt about the characteristic of some attributes of my table. Problem: I have to keep an identification number of my items, this is always composed of 3 digits (zero left in case of…
-
1
votes4
answers95
viewsOptimization in sql
Considering these two tables in the database: Product Table: | id | nome | |-----|-----------| | aaa | Produto A | | bbb | Produto B | | ccc | Produto C | Attributes Table: | id_produto | atributo |…
-
1
votes1
answer517
viewsError No suitable driver found while connecting with javaDB
I created a database using the javadb netbeans derby, then created a connection on port 1527 with the name of the Database being TEST. After that, I created the connection string below that should…
-
1
votes1
answer122
viewsCan I get more than one FK referencing the same PK?
I wonder if it is possible to reference foreign keys (FK) from different tables to the same primary key (PK). Below is a piece of the SQL command CREATE TABLE Run( Project_Code INT FOREIGN KEY…
-
1
votes3
answers250
viewsHow to select only the largest drive in Sql?
I am in need of a help to search for the last move in the stock of each product. It happens that in the clause I made, he is returning me all sales related to that product, and I only need the…
-
1
votes1
answer1719
viewsHow to sort varchar field with letters and numbers in sql server
I have the following query below and would like to sort according to the image, however the numbers. WITH cteNiveis(IdConta, NivelRec, NomeTab, Caminho, Nivel, Tipo, Status, Nome) AS ( SELECT CO.Id,…
-
1
votes1
answer256
viewsbutton sends Hidden input field value
I have a problem with the use of a specific button in the project. I’ll explain: I have a window opened by the window.open command, so in this open window I have a button that takes the value of two…
-
1
votes1
answer317
viewsIs it better to make a large request to the database or several small ones?
What is more recommended? I have a web system that on load of the ASPX page it feeds multiple controls with data from various tables of the database. It is better to do a search with a request…
database web-application server-clientasked 5 years, 4 months ago Luis Fernando Martinelli Ramos 23 -
1
votes1
answer1636
viewsFirebird - Recover Database
I am trying to recover a corrupted database using Firebird’s own utilities. When logging in to the bank you have the following error: database file appears Corrupt () bad checksum checksum error on…
-
1
votes2
answers128
viewsHow to separate records into blocks for parallel processing?
I have a table in SQL Server that makes the control of messages to be sent and a routine in C#, configured in a Cron, which selects pending messages, sends and marks as sent. What I’m implementing…
-
1
votes0
answers57
viewsQuestions with database modeling
I’m creating a small project and I don’t have much experience with databases and having difficulties modeling their tables. The project consists of an output manager, where we will have normal…
-
1
votes1
answer117
viewsHow to replicate a particular bank in postgres to a particular door?
Well I have the following scenario, I need to do a replication of a bank A for bank B. Well so far I was able to make from one machine to another making the following changes: Master Machine -…
-
1
votes1
answer375
viewsHow to return the total amount when using OFFSET and FETCH NEXT?
I had to use OFFSET and FETCH NEXT to return a data range between my query. Table CREATE TABLE [dbo].[Usuario] ( [Id] [int] IDENTITY(1,1) NOT NULL, [Email] [nvarchar](max) NULL, [Nome]…
-
1
votes0
answers189
viewsImproving Modeling in an Order System
I developed a food ordering system, but I have doubts whether the way I modeled the database is the best in terms of performance and longevity (how the system was to behave with a lot of data). I…
-
1
votes1
answer385
viewsSave Register in Bank with Entity
Dear colleagues. I’m developing an application C# Winform with database SqlServer and Entity framework. As I am inexperienced, I have been learning through the Internet. I’m having a hard time…
-
1
votes1
answer65
views -
1
votes1
answer69
viewsHow to generate my Postgresql Baseurl (link) that is in Heroku to integrate to my Angular front end?
My question is: how do I link (baseurl) to which my front-end access the data coming from this database (Postgresql) that is hosted on Heroku? My Heroku’s Postgresql releases this information: As…
-
1
votes1
answer66
views -
1
votes1
answer426
viewsHow to find an xml tag information using xPath in Postgresql?
I wanted to use the remote xPath, but I’m not sure how it works. I have a table and inside it a column that stores XML's. I would like to conduct a consultation that brings the value that is within…
-
1
votes1
answer126
viewsSelect with LIKE operator using an array
I am trying to select with LIKE operator using an array, but it is returning error when forming the string. SCRIPT placeholder= '?' placeholders= ', '.join(placeholder for unused in NAMES) query=…
-
1
votes1
answer179
viewsConcatenate two functions! (Mysql/PHP)
I have two functions I’ve done to display data in a table. However I was not able to create this function in a single function, so I created two, however, when I call both in the "foreach" it is…
-
1
votes2
answers705
viewsSQL Error: Can’t reopen table
I have a problem when performing an SQL using a temporary table. I need to bring the data da ultima alteração where the opportunity has been changed. However, this date comes from several tables for…