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
-
11
votes2
answers3018
viewsIs it really necessary to create an auxiliary 3rd table in N-N relationships?
In several places I see that when you have a relationship N-N (if I remember correctly) it is recommended to create a 3rd auxiliary table and then later it will be transformed into a relationship 1…
-
11
votes1
answer35768
viewsWhat is the difference between conceptual, logical and physical modeling?
In a relational database, what is the difference between conceptual, logical and physical modeling? Could you give an example?
-
11
votes2
answers422
viewsWhat is the advantage of using one database for reading and another for writing?
What is the advantage/difference of using separate databases, one for reading and the other for writing? In my view, there is no such concept. The writing bank, one hour will have to be read to…
database software-architecture synchronization replicationasked 7 years ago Gabriel G. Domingos 123 -
11
votes1
answer237
viewsWhat are the architectural database options for Microservices?
Recently I met the architectural pattern called SAGA or Business Transactions. And researching I found this question also speaking of the SAGA pattern. There are other patterns besides SAGA?…
-
10
votes3
answers10991
viewsHow to escape quotes in Postgresql?
I have a postgresql function function f_criaproduto(p_texto text), I have to go this way f_criaproduto(' meu produto é 'televisao' da melhor qualidade'). How can I escape the quotation marks in the…
-
10
votes4
answers1358
viewsConceptual database and file backup strategy
This is a conceptual question that fits into two on-topic themes of Software architecture and engineering. Concepts and practice and database question involving SQL on server. As this type of…
-
10
votes1
answer133
viewsIs there any strategy for a "de-collapsible" database?
I’ve seen on some sites (like even Stack Exchange) a possibility to "undo" an action in the database (like in Question Edits / Answers). I’ve been thinking about some possible solutions, but I’m…
-
10
votes3
answers6487
viewsHow to take ID from another table and INSERT into another?
I have two tables: destinations and input: On the table destinations: id_destination(AI) and destination; On the table entree: id(AI), id_destination(relation with table id_destination…
-
10
votes2
answers7394
viewsEntity Framework update and delete associative entity
I have a student table that has many to many relationship with the course table. Thus resulting in the table CursoAluno. I would like to know the correct way to the update and the delete table…
-
10
votes3
answers3406
viewsStoring representative values of a user’s 'sex' in databases
I have some doubts about the representation of some fields in the database. How should I store fields such as "sex" in tables in the database? In the literal form "male" and "female" or through…
-
10
votes2
answers16161
viewsWhat types of data exist in Mysql for text?
What kind of data exists in Mysql? What’s best for storing long texts? (HTML-shaped document for example) Why?
-
10
votes1
answer1943
viewsWhat is Database Connection Pool?
What does pool of connections mean when it comes to the Database? What does this concept imply in practice? What is its usefulness and importance in everyday life? Below is a definition I found in…
-
10
votes1
answer3282
viewsHow to compile the database to install together with a C#application?
I’m developing an application in c#, and I need to know if I can compile the database to install together with the application, I’ve seen something here talking about Sqlite, but I don’t know the…
-
10
votes2
answers6254
viewsWhat is data persistence?
What would that term be? I always see around and can’t decipher!
-
10
votes1
answer1562
viewsUnit Of Work + Ioc + Idisposable
I’m putting together a project that I use Uow to facilitate the issue of transactions. In some scenarios, I use several repositories, persisting the data in memory to save at once in the BD using a…
-
10
votes4
answers5616
viewsWhat kind of application can I use Mongodb in?
Use Mongodb in every kind of application is bad? There are application types where it is most recommended and types where it is not recommended to use a Nosql?…
-
10
votes2
answers3110
viewsMysql = Mariadb, huh?
It’s been a few days since I’ve been listening to the teacher in my class saying,: Oracle purchased the MySQL and just renamed it to MariaDB. As I am not easy to believe in the things spoken, I went…
-
10
votes3
answers1210
viewsHow to organize a project in Ode
I would like some idea of how I could organize a project in Node.js, currently the files are this way: - router.js - controller L controllerUser.js L controllerAuth.js L ... - service L…
-
9
votes7
answers31206
viewsHow to insert data into DB with jQuery/Javascript without using PHP?
I am learning Javascript and jQuery and I am wanting to make a small site to test the insertion of data in a database. I have no knowledge in PHP, I wonder if it is possible to insert data in a…
-
9
votes1
answer230
viewsWhat is the difference between pg_query and pg_execute?
I’m new to Postgre and I see pg_query and pg_execute in the application I’m working on, however I can’t see the difference between the two. I have to make an insertion and I’m not sure which to use.…
-
9
votes2
answers3468
viewsBest route calculation algorithm
I’m doing a logging system that addresses the issue of routes/routing. Where I should choose the best route to travel. Initially I am only doing some tests and testing advanced algorithms, what I am…
-
9
votes2
answers295
views -
9
votes1
answer450
viewsWeb application for multiple people
I see many web applications that can be used for various companies. How do they do it? They create only one bank and share between these various customers? For example: Company A has 10 users and…
-
9
votes2
answers885
viewsDoubts about DAO, MVC, Multiple Tables and POJO
If anyone can help me, I have a question q has been consuming me a lot in recent days and is psychologically locking my studies (hehehehhe) MVC and DAO with multiple tables. I’m going to put here a…
-
9
votes1
answer3234
viewsWhat is dynamic SQL?
I have seen many cases where some show how to use, and others where they simply advise against using SQL dynamic. I had the following doubts: But anyway, when we should or should not use dynamic…
-
9
votes1
answer12115
viewsWhat is referential integrity?
I have searched several sites and so far I could not understand very well what is referential integrity. So I decided to ask here. When to use referential integrity?
-
9
votes2
answers1340
viewsSmart Query with Mysql
I’m trying to make a "smarter" query on my DB, my doubt is as? I have a query: SELECT * from publicacao where titulo like '%$busca%'; and in my DB has several publishing titles, for example:…
-
9
votes2
answers202
viewsWhich is faster to read and edit, a database or a . txt?
It would be to store and rewrite only 1 digit INT, erasing one and writing another, on the condition that when it reaches 5, go back to 1, and go on doing that loop every time someone accesses.…
-
9
votes1
answer568
viewsHow does inheritance work in Postgresql?
How does inheritance work in Postgresql? Is it a good practice in relational databases? How to use it?
-
9
votes1
answer3480
viewsWhat is ACID in a database?
I’m not talking about web implementation indicator. Besides the acronym, because it’s important?
-
9
votes1
answer517
viewsWhat is the name given for the number of columns in a table?
What is the name given for the number of columns in a table? And the name for the number of lines?
-
9
votes1
answer767
viewsMulti-client Web API Structure
I’m in the following situation: I have a web application that accesses the data through a C#Webapi. I need to apply the concept of multitenancy in order to allow my application to be accessed by…
-
9
votes5
answers1163
viewsPHP only connects to Mysql?
I’ve never seen PHP connect using other databases, like Oracle, for example. In Mysql, to connect, you use mysqli connect, what if it were in another? PHP is integratable with which database?…
-
9
votes3
answers3392
views_ (underline) in consultation with LIKE
I’m making a query where I need to return all information from a given table, which contains "_R_" in the nomenclature. However, when using WHERE NM_CAMPAIGN LIKE '%_R_%' he returns me to other…
-
9
votes3
answers46833
viewsHow to rename the column name SQL Table
I want to rename the column name via SQL. I am trying as follows: ALTER TABLE nomes_clientes RENAME COLUMN primeiro_nome TO nome, RENAME COLUMN segundo_nome TO sobrenome; But that way it’s not…
-
9
votes1
answer22460
viewsNon-relational Database vs Relational Database
Some time ago I was in doubt about the differences between these two models, I even looked on the Internet but I did not find anything to take away the doubt so I will ask some questions. 1 - What…
-
9
votes2
answers395
viewsDifference between Alter Table Foreign Key
I would like to know the difference between the execution in the clauses Alter Table when inserting the ADD CONSTRAINT , such as running the following code: ALTER TABLE Orders ADD FOREIGN KEY…
-
9
votes3
answers3355
viewsWhat is the difference between LOCATE and INSTR functions?
The description of the function LOCATE, in free translation, it is: Returns the position of the first occurrence of substring. The description of the function INSTR, in free translation, it is:…
-
9
votes1
answer344
viewsWhat is the difference between Collation UNICODE_CI_AI, UNICODE_CI and UNICODE
There is a difference between UNICODE_CI_AI, UNICODE_CI and UNICODE? What they are and what they interfere with in the database?
-
9
votes1
answer390
viewsWhat is the difference between Local Storage, Indexeddb and Websql?
I have a habit of using Local Storage to store JWT, I would like to know the difference between Local Storage, Indexeddb and Websql and when to use one or the other.
-
8
votes4
answers15597
viewsCan foreign key become primary key?
exemplifying, I have two tables: customer and contact. The contact table contains the customer’s phone column as primary key, fax column and e-mail column. The client table contains the customer’s…
-
8
votes3
answers1971
viewsRecords with recurring dates filtered for a period
The Problem I am creating a financial system where I need to register a recurring movement, for example, a light bill that repeats every month. In the system, this type of movement is treated as a…
-
8
votes2
answers1213
viewsWhat are the advantages and disadvantages of storing session variables in the database?
From Rails 4.0, was eliminated the Activerecord Session Store, that kept session variables in the database, for "performance issues." But the functionality continues to work through a Gem. Today…
-
8
votes3
answers1629
viewsMultiple connections with the Bank
In a PHP system that communicates with the BD (Mysql) to recover the information and returns it to the user who accesses it is necessary to establish multiple connections with the Bank? Or just one?…
-
8
votes2
answers1720
viewsWhich is faster, access data in file or database?
In terms of performance which method is fastest to recover data, 1) read a file (which will be generated only once with PHP) or 2) take this data from a database? This data will always be shown on…
-
8
votes1
answer6769
viewsMaximum number of simultaneous database connections
I am using a system monitoring solution and observe that at peak times the system has about 1500 simultaneous connections. From this data, I searched and could not find where I can check the limit…
-
8
votes2
answers1580
viewsSecurity in login system
Hello, I made a torrent file download and upload system, and on this site has a login system with a database, and I would like you to explain a little bit about security in PHP and mysql and what I…
-
8
votes3
answers11171
viewsHow to return the ID of a record right after it is inserted?
I am making a Java application in conjunction with a Mysql database and would like to know what would be the best command to return an auto database increment ID right after the record is inserted.…
-
8
votes3
answers24407
viewsWhat is the performance difference between BIGINT and INT in Mysql?
There is some negative impact on the performance of Mysql, where the Primary Key is the type BIGINT(20), instead of INT(11)?
-
8
votes1
answer2706
viewsHow to count the number of tables in Mysql?
I am trying to count the number of existing tables in a Mysql database. I tried to do it the way below, but returned a syntax error: SELECT COUNT(SHOW TABLES) How can I do that?…