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
-
5
votes1
answer98
viewsDoubt when designing a database
What is the best way to design a database for a web system, for example, this system is for doctors, and every doctor has his or her schedule, patients, cashier, etc. What would be better: A single…
-
5
votes1
answer205
viewsWhat is the size limit of Indexeddb technology?
Today at work they mentioned the technology IndexedDB to solve a problem here in the company, but Between several questions arose me, being one of them: What is the data limit that can be stored in…
-
5
votes2
answers97
viewsWhat are the consequences of not working on data typing?
I want to create an application where the client can create a new form or table, in which he can choose the data type of the field, such as number, text, binary, etc. An "easy" solution would be to…
-
5
votes2
answers255
viewsReturn the highest value between columns and the row ID of that highest value
Let’s say I have two columns in my table, column A and B. +-----+-----+-----+ | ID | A | B | +-----+-----+-----+ | 1 | 500 | 681 | +-----+-----+-----+ | 2 | 980 | 101 | +-----+-----+-----+ | 3 | 110…
-
5
votes1
answer211
viewsMysql use 'as' in aliases or not?
Writing a query in Mysql I came across this doubt, I made a search, however, I found nothing (or did not know how to look for), the doubt is simple, there is some difference between using or not the…
-
5
votes1
answer496
viewsDisable Flyway migrate on startup and run only when requested
I’m just getting started with the Flyway in the Java along with the Spring Boot and I currently have an activity that tells me to do the Flyway execute the migrate() only when a certain endpoint is…
-
4
votes2
answers2870
viewsShould I adopt the naming standard of my framework or team legacy?
Here in the company, everyone follows a pattern in the projects: All tables should be named in the singular. Examples: "user", "event", "category". And also: The main Primary key is named like this:…
databaseasked 10 years, 10 months ago Calebe Oliveira 4,527 -
4
votes2
answers3111
viewsHow to check the database update from a browser?
I’m trying to make a page that updates the <div> (that has the content brought from the database) automatically once some value is entered (as well as on this site). I used the setInterval to…
-
4
votes2
answers7390
viewsHow to save JSON file with Node.js
I want to make a website to test some things. The site is running on my home server done with Wamp. I was told that I could make a small database using JSON files. I have a JSON file in the website…
-
4
votes2
answers1688
views1005 - Can’t create table '' Rrno: 150
I’m starting my programming journey and came across a mistake in the creation of the Mysql database: 1005 - Can’t create table 'mydb.supplier' (Rrno: 150) What could it be? I’ve entered several…
-
4
votes1
answer1853
viewsHow to import/export categories in Magento?
I am trying to import products and categories from one store to another, but in Malta there is only the option to export only products and customers. Is there any way to do that?
-
4
votes2
answers5898
viewsForeign key may not be primary key?
I’m new to databases. My teacher asked us to link to 3 movie tables: Titulos, with names and link to movies Categorias of the film and link to the films A middle table that would link category to…
-
4
votes1
answer8024
viewsHow to determine permission to use tables?
How can I make a certain user "see" one table and another not? I’ve been doing some research, I found the DENY SELECT ON *** but I was unsuccessful.
-
4
votes1
answer605
viewsRecover Corrupted . gz File
I have a file in . gz which is corrupted. Is it possible to extract data from this file? Even if it is partially? This file is a sql database dump. Thanks.
-
4
votes1
answer1536
viewsIs it possible to create a remote server with Mongodb? How?
My question, to be clear, is to create a server with mongodb in a cloud hosting (for example) and access it through another server. Example: I have a mobile app. I hosted my mongoDB in a cloud…
-
4
votes1
answer391
viewsWhat is the weight of a subquery for the query?
During the development of some queries in the database, I come across the situation of the need to perform a new query, but another solution in some cases may be the subquery. So what is the best…
-
4
votes4
answers33983
viewsHow to copy column data from one table to another table
I have a table called UC which has an email column, and I have a backup table of it. I need to copy the data (emails) from the table’s email column backup for the column email table uc, but I don’t…
-
4
votes1
answer1173
viewsLogin with different profiles
I’m developing an app for a school, where you take control of the students she has. The application makes the registration of students and registration of occurrences (suspension or warning) that…
asp.net-mvc database asp.net-mvc-5 visual-studio-2013 authenticationasked 10 years, 6 months ago Érik Thiago 2,338 -
4
votes1
answer1078
views"No suitable driver found" in Java database connection
Well, I use the eclipse and I’m trying to connect a Mysql database with my project, my code, compared to other tutorials I found, it’s perfect, and it’s this: package pack; import java.sql.*; import…
-
4
votes2
answers490
viewsHow to persist the status of a queue of requests?
I am working on a C# application that requires a row of items of the type Pedido. Basically whenever a new order is created it is queued and the application shows the orders in sequential order that…
-
4
votes1
answer287
viewsPerformatively speaking, is it good to use Self Join?
Regarding this question: What good is a "self Join", technically speaking it’s performative to do this, or using 1N, 2N and 3N (normal shapes) is the best way? Just remembering that I never claimed…
-
4
votes1
answer523
viewsUsing hexadecimal as ID in the database
Through the navigation bar, we realize that Google uses hexadecimal values to identify records: The print above was taken from Gmail, but the same occurs for other services like Google Drive. What…
-
4
votes2
answers508
viewsWhen is it recommended to use decreasing indexes?
For default, relational databases create indices using increasingly ordered binary tree structures. But there is the possibility of creating it in a decreasing way too. My question is whether (and…
-
4
votes4
answers818
viewsDatabase being changed/Hacked
I don’t know if I can ask that question here, otherwise I can ask you to suspend the question, or warn me that I delete it. For the second time I came across a bank that had been broken into. Almost…
databaseasked 10 years, 3 months ago Diego Zanardo 3,301 -
4
votes1
answer580
viewsTender relationship with a foreign key not mandatory
I have a database with three entities that relate: user, process and courses. The goal is to model the bank to meet the following requirements: The user can sign up for several selective processes…
-
4
votes1
answer3184
viewsSize of a Java + Hibernate String
Is there any way to persist a string with no size limit for the bank using Hibernate? If I map my class and don’t limit the field, Hibernate automatically creates a limit of 255 characters. I could…
-
4
votes3
answers1909
viewsError creating a Mysqli database via PHP on Wampserver
I’m having trouble creating the database, on the net I found little content on, I only find how to build database by phpMyAdmin, but it is via script that I want to create. I have the following…
-
4
votes1
answer822
viewsHow to force the download of a file, which is stored in the database
I have a system where, are listed documents from the database, where the user has the option to view or download the file. I want to know how to rescue this file from the bank and force the download…
-
4
votes2
answers2934
viewsSearch for nearby strains
I am implementing a system as an online delivery, the customer will enter the tool and put his ZIP code, with this the system should inform all restaurants/ companies, next to it. I was wondering if…
databaseasked 10 years, 1 month ago Gabriel Duarte 565 -
4
votes2
answers6760
viewsError " An error occurred while Processing your request. "
I developed a MVC C# application for JSON reporting in my localhost it works normally, to query because it takes 2 to 3 databases depending on the report, but when I host the application in Azure,…
-
4
votes1
answer5739
viewsIs it possible to generate a table script from an SQL command?
I would like to generate a table creation script, from an SQL command so I could build a program that was able to clone tables. I am using SQL Server 2008 R2 and need to implement a table cloning…
-
4
votes2
answers717
viewsNormalization of tables and relationships
I’m starting a project from scratch and in the middle of bank modeling, I had a problem. While building the models, I couldn’t do it the right way and I ended up getting confused. I have student…
-
4
votes2
answers437
viewsWhat is the best way to represent a login table with two types of Facebook and Conventional authentications?
I have an Android app and have a conventional login Activity. Currently I want to add login with social networks. How best to store this type of distinct logins in tables. I create a single table or…
-
4
votes3
answers527
viewsStructure/Nomenclature of Tables
I am developing a permission system and I have a universe of 9 tables, which form the final permission for the user to use my systems, however, I am in doubt of how to build two of them, the…
-
4
votes2
answers872
viewsWhat is the best way to create a conditional foreign key Constraint?
In some cases, it is interesting to create a foreign key reference conditional, that is, that does not allow to reference all the records of another table, but only those that assume a condition.…
-
4
votes1
answer359
viewsMultiple databases with multiple applications
I made an application with Codeigniter which uses only a database. However, I was asked to create several copies of this application that will also access several different databases. That is, I…
-
4
votes1
answer785
viewsN-N relationship with additional fields (problems to persist data)
I have an N-N relationship that works as follows: Destination.java (N)-(N) Customerservice.java Within this relationship there is an entity that keeps the relationship Ids, which has some more…
-
4
votes2
answers201
viewsHow to save space in audit log?
I was creating a system that provides me data of my users according to the date I request, from X to Y for example. And the only way I could find for that was to create a table that way: date with…
-
4
votes1
answer1280
viewsSave full path in the bank or just name with extension?
In the systems I used to develop back in the day, I used to save the entire file path in the database . Example: c:\xampp\htdocs\teste\imagens\post_44\stack_overflow.png // Image table imagem - id =…
-
4
votes3
answers1446
viewsSpecify fields I don’t want in Mysql
In Mysql, when we will make a SELECT, generally we can specify each field we want to return. SELECT id, nome FROM usuarios But let’s imagine a scenario where I have 50 columns in a table and I…
-
4
votes1
answer321
viewsView database information securely
What kind of encryption should I use to encrypt a CPF in the database and then display that same CPF (decrypted) to the client in a secure manner?
-
4
votes1
answer2380
viewsDoubt the $group mongodb
I need to use the grouping operator $group of mongodb, but every explanation I find is very confusing. How this works and what is the benefit of using this operator?
-
4
votes2
answers201
viewsProcessing of data output from PHP database
In many cases we have data in the database that is not in the format we want them to be shown. As an example, let’s say I have a table called users and in this table a field called role which will…
-
4
votes1
answer130
viewsHow do I save read-only data? Should I use Sqlite in this case?
I’m developing an app (a widget actually) that shows some sentences in home user. I have about 1000 sentences of approximately 150 characters, how will I store it? In this case the use of DB is…
-
4
votes3
answers2878
viewsWhat is the best way to verify the existence of a record in the database via application?
Today I use a method that sends a COUNT with the record id as a parameter for the database. There is a better, perhaps more performative way to do this?
-
4
votes1
answer2185
viewsInsert cities into database
Hello, I am creating a database, and in it I will have information of Brazilian municipalities, I imagine that I am certainly not the first to need this information, however I do not know if there…
-
4
votes1
answer75
viewsWhen should I create a Constraint like DEFERRED?
As far as I know, creating a Constraint (like a foreign key or a check) like DEFERRED makes it only validated at the end of the transaction. What is this used for? And when it should not be used?…
-
4
votes1
answer72
viewsBest way to design Classes from the database?
What is the best way to design Classes from the Database schema below: Usuario(id INTEGER PK, desc TEXT); Amigo(idA INTEGER, idB INTEGER, PK(idA,idB), FK(idA) REFERENCES Usuario(id)); This means…
-
4
votes2
answers174
viewsThe less consultation the better, right?
It is possible to vary the writing of the results, as an example below where I want to use. <table width="1000" align="center"> <tr> <td> NOTICIAS</td>…
-
4
votes1
answer1304
viewsHow to persist abstract class with JPA
I know JPA and I have other tables already implemented and working. I would like to know how to persist the classes below, since one is an abstract class and the other is "extending" it. I should…