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
answer643
viewsProblem with Decimal (4,2)
I have an MVC project, I am using Entity Framkework and in my database there is a table with a column of type decimal (4,2). The problem is: I try to insert any value, for example: 5.00 // 5,00 //…
-
4
votes1
answer240
views -
4
votes1
answer837
viewsHow to organize CRUD methods for each table?
I would like to know how to organize the CRUD (create, read, update, delete) methods of each class in Java. An example, to better understand: Suppose we have the classes Funcionario, Cliente and…
-
4
votes1
answer2877
viewsHow to change location in Postgresql
My database is with locale en_US.UTF-8, I need to change it to pt_BR.UTF-8 for the purposes of ordering consultations. How can I do that only with phpPgAdmin?…
-
4
votes1
answer1916
viewsTest connection to the database
I have an application that has a central database, in it is carried out the registration of several databases dynamically to use in another part of the application. I want to know how to test if…
-
4
votes2
answers703
viewsHow to save multiple users to an account like Netflix for example
Next, I have an application that supports only 1 account per user, I want to update the database on MySQL so that it supports a system that can be saved for example, child accounts, derived from…
-
4
votes3
answers521
viewsWhere should I put FK?
I’m learning about the database when a question came up. For example, I have two tables: user (_iduser, nome, sexo, ect.._) login (_idlogin, login, senha_)) Have relationship 1:1. My question is…
-
4
votes1
answer609
viewsInstall SQL Server with the application
I am finishing an application and will compile using Inno Setup. The system is using SQL Server. I’ll install the system on other computers. The database is installed on the computers that will…
-
4
votes1
answer459
viewsDoubt about FK, Visual Studio database
Hi, I created three tables in a database in Visual Studio, the first two (clientes and produtos) are normal tables with Primary key in column Nome. Then I created the table compras that would have…
-
4
votes1
answer225
viewsProblem with slidebox and ng-repeat in Ionic framework
I’m trying to create the slidebox of the Ionic framework with data returned from the database and the slide is not appearing on the screen. I’ve looked for the solution to this in many places but…
-
4
votes3
answers1701
viewsHow to represent "is-one" relationships in the logical model?
I’m creating a data model where a client entity is also a person, legal or physical. However, in the state in which it is found it will not be possible to implement it physically, because I am not…
-
4
votes2
answers2228
viewsUpdate in array in Mongodb
{ "_id" : "55dcb404478e7227203d3a65", "Nome" : "Grupo Familia", "Pessoas" : [ { "PessoaId" : "55dcb425478e72207833e970", "Nome" : "Carlos", "Habilidades" : [ { "HabilidadeId" :…
-
4
votes1
answer1033
viewsslow remote Mysql database with java swing application
I have a swing java application that is connected to a remote Mysql database, that is, on an online server. When running the program it works normal, except for the slow response of the bank. For…
-
4
votes1
answer1159
viewsImport sqlite database already populated
I’m making an app requires only queries in a database. Since this is a very large amount of data, I think it would be counterproductive to feed this database using a insertOrThrow for each item of a…
-
4
votes2
answers1419
viewsIs there any way to know when a record was added to the bank?
I would like to know the time a record was added to the bank. I will use this information to show the time a contact was added to my schedule.
-
4
votes1
answer3554
viewsDifference between SQL Server Express versions?
What’s the difference between SQL Server Express versions of Dreamspark?…
-
4
votes2
answers848
viewsDesktop application audit log
Thinking about a Java application desktop that is running in a company, we may come across situations that the user may cause failures in your application, in this case could create a log error and…
-
4
votes2
answers989
viewsHow to install Sqlite to be part of a C#project?
I am creating a desktop application in C# of registration that will use database. Which database to use? I was advised to use the Sqlite, but I’m not quite sure how to use it. Which version of…
-
4
votes3
answers153
viewsDatabase with php
I am trying to perform a database query with the following script: <?php require("conexao.php"); $exibir = mysql_query("SELECT * FROM produtos"); while ($r = mysql_fetch_array($exibir)){ $id =…
-
4
votes2
answers1693
viewsWhy can’t I open the Mongodb interface on port : 28017?
I installed Mongo in the C drive and did some data creation tests and persisted,then consulted and there they were perfectly listed at the prompt. So far so good! I open the browser and type…
-
4
votes1
answer85
viewsEfficient execution of PHP PDO queries
Is there any performance difference in the codes below? $result = $pdo->query($sql); foreach($result as $reg){ ... } and... foreach($pdo->query($sql) as $reg){ ... } I’ve run some tests, but…
-
4
votes2
answers375
viewsShould I compress files to save to the database?
I don’t want to take into account whether saving files in the database is a good practice. Since many systems save the files (images, pdf’s, doc’s, etc.) in the database, I would like to know if it…
-
4
votes2
answers300
viewsImport . sql from Postgresql in Neo4j
I have a Postgresql . sql backup file and want to import that file to Neo4j (graph database). How do I?
-
4
votes2
answers614
viewsEnter data into a foreign key table
I am trying to register a user put in his table there is a foreign key linked to another table. My problem is that this foreign key is referencing the address table, only I still have no address for…
-
4
votes1
answer113
viewsHow should the perfect backup of wordpress blog be done?
I’ve been looking on the Internet for a while how to backup the theme I am developing in wordpress and database. I use the xampp and the banco de dados in the phpMyAdmin. I found several tutorials,…
-
4
votes1
answer4458
viewsHow to return day of the week and time formatted sql server 2008?
I need to make a query as follows, I have a table (script): 1 - Take the day of the week 2 - take server time in format hh:mm example: SELECT CASE DATEPART(DW, GETDATE()) WHEN 1 THEN 'DOMINGO' WHEN…
-
4
votes1
answer688
viewsAmbiguous column - Laravel 5.1
Good morning! Here’s the thing... I have these 2 tables in my postgresql database: tipos_risco --id --nome agentes_risco --id --nome --id_tipo_risco (foreign key) The problem is I’m not getting the…
-
4
votes1
answer324
viewsInitial Value Sequences Postgresql - Laravel 5.1
Good morning, I am running some tests on my application, but I have the following problem: After the migrate and the db:seed, whenever I will enter some record by applying a duplicated primary key…
-
4
votes3
answers6231
viewsHow to compare the structure of two SQL Server databases?
I need to compare the structure DDL of two databases, where one is the production bank and the other is the approval of a system. What tools can be used to do this?
-
4
votes1
answer142
viewsModifications to model and relational database
The requirements for the development of a system in general change over time. Several approaches to software development such as agile methods and Domain-Driven Design even encourage an iterative…
-
4
votes1
answer264
viewsCreate select with multiple fields
How to create a select that lists at least 03 tables and presents a field from each table at least ?
-
4
votes1
answer291
viewsHow to model in a correct way
I have the following table structure: First: it is right this modeling? Second: is there any way to improve? Reduce the number of tables? The system will work as follows: Each Candidate has a…
-
4
votes1
answer416
viewsHow to implement the Observer standard in practice, with database?
I’m studying some design patterns, and right now I’m learning about the pattern Observer. I’ve read books, I’ve seen some classes on Youtube, I’ve done the examples and everything. But now I would…
database pattern-design software-engineering observer-patternasked 8 years, 8 months ago Fábio Lima 81 -
4
votes2
answers792
viewsPDO vs Doctrine
Work with systems development in PHP, more focused on e-commerce. Currently I use the PDO to make my connection to a database, but out of curiosity I decided to search about the Doctrine, because…
-
4
votes1
answer620
viewsMysql Unique record insertion problem
I have a table that has a Unique field, I deleted a record of this table and now I want to insert it again, however Mysql generates the error: "Error Code: 1062. Duplicate entry '' for key '". How…
-
4
votes1
answer500
viewsIs it OK to use SQL Server or Mysql with PHP?
I’m putting together a medium project and I’m going to model the bank, then create the tables, the views, as procedures beyond the bank itself of course. I would create everything with Mysql, but by…
-
4
votes2
answers1277
viewsHow to store a List<Object> in a database?
I am working on a project in C# where I have the following situation. I have a class that represents player: class Player { int ID; string Name; } and another representing a team: class Team { int…
-
4
votes4
answers188
viewsSQL Embedded in C#
I have a C# application that uses a Mysql database with Entity Framework. However, the size of the database is ridiculously small, so I don’t think it’s worth having a Mysql database server just to…
-
4
votes1
answer165
viewsI can’t save the information to a local database!
I’m having trouble saving the information typed by the user in the Postgresql database, I developed an application in Android Studio and I’m using an external local database with Postgresql to store…
-
4
votes1
answer365
viewsProblems with connection to the MS Acces bank
Staff I developed a web application whose database is MS Access, well, when the user logs in I send the data by ajax to the java class to do the login and password validation, the problem is that…
-
4
votes1
answer4360
viewsHow to remove the UNIQUE KEY attribute from a column in Mysql?
I created a table in Mysql that uses a column called loja_num with the attribute key dish UNIQUE KEY loja_num (loja_num, But now, I would like to remove this attribute from this column. I have…
-
4
votes1
answer382
viewsSize occupied on disk by a table in Sqlite
In Oracle, when we want to know how much a table occupies disk we can make a query to the dictionary dba_segments. SELECT segment_name, segment_type, bytes/1024/1024 MB FROM dba_segments WHERE…
-
4
votes1
answer2155
viewsRead values from a table in Sqlite
I am in need of a help in the following situation: I need to take the values of a column in the bank and write these values in a variable, and then this variable will randomly generate one of these…
-
4
votes1
answer857
viewsVarchar or int for "type" fields
I have a column guy with 6 options to save in the bank, it is better to save the string as varchar or as int and treat it in front? For example, when it is 1 in the bank, display certain string on…
-
4
votes3
answers75
viewsHow can I exclude the penultimate number from a period?
I’m trying to leave the period from 201601 to 20161 in SQL, but I can not at all! I wonder if someone could help me? SELECT CONVERT(NUMERIC(5), CONVERT(VARCHAR(4), YEAR(Periodo_Mensal))+…
-
4
votes1
answer954
viewsConnection Progress database by PHP (Laravel framework), PDO
I need to connect to a Progress database via php I am using the framework Laravel 5.2 however the same according to the documentation only has support for Mysql, Postgres, Sqlite and SQL Server…
-
4
votes1
answer89
viewsHow can I get the BD date already formatted using the Max and Date_format functions together
I’m trying to get the biggest date registered in my BD, I am trying to use the functions MAX and DATE_FORMAT together and the search result is not what expected, I have these dates registered:…
-
4
votes1
answer174
viewsDuplicate in a database
Duplicate database would be rows of a repeating table? Or would it be something more complex? , this question fits into the context of database relations
-
4
votes1
answer1780
viewsRemove characters from a field in Mysql
I have a table where I have several codes, I would like to get all the codes that start with the following sequence 1170 and remove the same. Example, the following code 11701287871 would be…
-
4
votes1
answer100
viewsBD query without overloading the server
Hello folks good night! I need to perform several queries of an ID in an X table, but this is overloading my server and the connection with the BD gets off, I contacted my server and informed me…