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
-
2
votes1
answer36
viewsImprove banking of related entities?
I have in the database the tables User, Professional and Address. The foreign key of User is in Professional and foreign key of Professional is in Address. I need to register a professional, who is…
-
2
votes1
answer136
viewsSearch the Mysql MVC database
I have a Search which searches by name, but wanted it to search both by name and by place in the same research field. Follow the action: [HttpPost] public ActionResult Search(FormCollection fc,…
-
2
votes2
answers1801
viewsHow to join two csv files in R?
my problem is the following: I have two data files in csv format with same number of columns and same column names (see below). I ask to read the files as follows: > dados_1 <-…
-
2
votes1
answer723
viewsUpdate in Database by c#
I’m trying to update my database by visual Studio(c#), but the update is not being carried out I don’t know why. Table script(sql developer): CREATE TABLE Login ( Cod_login NUMBER(8) NOT NULL,…
-
2
votes0
answers34
viewscreation of mysql triggers
I would like to know how I can make a triggers to mysql where ex a person enters to deliver a product in the company, in the table movivisitaservico this table is of movement of entry of people the…
databaseasked 8 years, 1 month ago Roberto Alcaras 21 -
2
votes2
answers278
viewsSending data between View and Edit Activity
I am developing a service scheduling system and in a Listview I can take a customer’s data and move to a Query Activity. I created an editing menu and would like to pass this same data to the new…
-
2
votes2
answers662
viewsSet Auto Increment position, always for the smallest ID
I have a database Mysql, where contains a table called usuarios This table contains a column ID, where is Autoincrement and kind INT I need you to: Whenever I enter the first result the ID be equal…
-
2
votes2
answers556
viewsInsert foreign keys
I have two tables and when I try to use a key of the 1st table in the 2nd the value appears NULL and should appear the values that appear in Aquario CREATE TABLE Aquario( ANome varchar(64) PRIMARY…
-
2
votes1
answer89
viewsEditing the course settings form
I’m editing the course settings form on moodle and it works, it added the field but not saved if I change in banco de dados the data saved are printed on the input, only it didn’t save.…
-
2
votes1
answer656
viewsDoctrine 2 INNER JOIN with Subquery
I’m migrating my appointments to Doctrine using the Querybuilder. And I have a consultation with Inner Join with a subquery, would like to know how to do this using Doctrine. SELECT p.* FROM…
-
2
votes2
answers1598
viewsHow do Postgres create a file to populate a bank?
I have a database in POSTGRESQL populated , I wanted to know if there is a command SQL that returns an aqruivo that had the following command for all existing tables: INSERT INTO aluno(id , nome,…
-
2
votes1
answer38
viewsHow to return the expected result in this query?
Good afternoon, you guys. The case is as follows: I have a table with 2 blogs of category "auto" and part of the title "Hackers" so whatever my query, can not return more than two results combining…
-
2
votes1
answer125
viewsHow to create a factor variable from other factors?
I would like to create a nominal variable X (factor) in my data.frame from two other existing nominal variables Renda and Escolaridade: Renda Escolaridade X baixa fund. incomp Sim inter superior Nao…
-
2
votes4
answers5462
viewshow to insert picture into database
What type of variable do I use to store an image in the database? And is there a specific command for this? or just enter as any record? i have a project in the moon language ( mobile by Corona sdk…
-
2
votes3
answers722
viewsCount in Firebird 3.0 Bigint X Firebird 2.5 Integer
In my system, after the migration of Firebird 2.5 to the 3.0, many reports and other functions began to give problem stating that the expected was Integer and the current is LargeInt. I took a look…
-
2
votes2
answers1314
viewsConnection limit
System in Delphi - Database Firebird 2.5. I have a server with 25 "files" of databases, one from each client. Each customer has on average 10 accesses via TS to connect to our server. However, when…
-
2
votes1
answer198
viewsN for N Entity Framework
Dear, I am trying to carry out a relationship N to N in the Entity Framework for the tables described below. At the moment what is happening is a cyclical redundancy, where every time I open a…
-
2
votes2
answers464
viewsWhat is the specific area and professional that defines the layout of data in files in a software project?
Who and how do you define the layout of data in software such as Editors, Dbms or even who creates text encodings? When I say "data layout", I mean, for example, how a PDF file stores the document…
database filing-cabinet software-engineering language-independentasked 7 years, 5 months ago Carlos 1,622 -
2
votes2
answers1025
viewsSum with SUM()
Two days ago I’m banging head with a query in the database marrying tables and returning the sum of values, I can perform the query by the quiet Phpmyadmin. Follows the query that works on…
-
2
votes1
answer45
viewsAPP database
Dear friends, in a mobile solution type an application that manages lava jet where users create their account and automatically can already manage their customers, cash flow, scheduling and etc...…
-
2
votes1
answer3030
viewsWhat is the difference between serial and integer data types in Postgresql?
I am creating a database in Postgresql and hit the doubt as I can create in the table the field ID with AUTO_INCREMENT, searching the internet I found some examples with the field ID with SERIAL…
-
2
votes3
answers873
viewsDo not return a field value when it is zero
I’m creating a consultation on SQL, but I need a certain field not to display the values when it is zero. It is possible? SELECT gfilial.nomefantasia AS 'Filial', tmov.codtmv AS 'CODTMOV',…
-
2
votes2
answers74
viewshow to make this query sql
code is PK in both tabela1: cliente codigo, nome, municipio tabela2: notafiscal codigo, numerodanota, cod_cliente I want to list give a Count(*) on all notafiscal where cod_client.municipio = 10 how…
-
2
votes1
answer1446
viewsHow to insert time into Oracle?
I need to save only the hour and minutes (seconds make no difference, so having or not, whatever) I should use TIME or TIMESTAMP ? I started doing with TIMESTAMP(6), but I’m having a hard time…
-
2
votes1
answer831
viewsHow to select a select using the ado.net Entity Framework
I’m developing a system in ASP.NET MVC which uses as standard the Entity Framework for data access, but I am in need of a select on another select, and I don’t know how to do this with Entity. The…
-
2
votes1
answer480
viewsScript for comparing and updating Oracle database equemas
People would like to know if there is a program (or script) that compares schematics and updates in database, we work with a software that uses the Oracle database and every time an update implies…
-
2
votes1
answer595
viewsError during DELETE: You can’t specify target table '...' for update in FROM clause
I’m trying to delete data (where the stock is equal to zero and the discount value is less than the total discount value average) with this query: DELETE FROM veiculo WHERE estoquetotal = 0 AND…
-
2
votes3
answers2965
viewsHow to delete data from database in android studio?
I have an application where when the user logs in the first time, I save the Token and NIU, then the next time he accesses the application, he already enters directly into the Webview using that…
-
2
votes1
answer153
viewsHow does the process of accessing a database work?
I started studying databases and to access a certain database with JDBC a driver is required for each DBMS (Mysql, SQL Server, Oracle), and the access is done on disk, but how is this process done?…
-
2
votes1
answer637
viewsHow to compare the values of a column with the average of these values in SQL?
I have a column of books, and I just want to show the books that the price is higher than the average of those prices, how to do that? The name of my column is price, and I can’t put a where price…
-
2
votes0
answers40
viewsRecognition of SQL Server drives for db connection in PHP
I’m having trouble connecting to the SQL Server database. I can’t install the drives to be recognized. On the Internet I’ve tried every kind of thing and nothing has worked. I downloaded the drives…
-
2
votes2
answers5648
viewsHow to change the name of a column in a select in the database?
I am making a database for a college activity and was asked to display the table by changing the name of attributes(columns) to "Nome do Cliente" and "Endereco do Cliente". How can I do that?…
-
2
votes1
answer766
viewsCreating Python objects from the database
I’m learning Python now and want to create an object from information I picked up from the database, just passing the user ID. I am using SQL Azure and the pyodbc driver. It is working well, but I…
-
2
votes0
answers695
viewsHow does data encryption work in Firebase?
I am developing an Android messaging application using Firebase and I realized that it will be necessary to protect the user data and the messages exchanged by them, because at the moment it is…
-
2
votes1
answer1327
viewsHow to do GROUP BY in UNION ALL?
I have the following code: String select1 = @"SELECT CODIGOB, DESCRICAO, QUANTIDADE FROM " + path + @"\IVENDA.DBF WHERE DATA BETWEEN {^" + datainicial + "} AND {^" + datafinal + @"} "; String…
-
2
votes2
answers1262
viewsHow to run mysql database using shell script if the base name has "-"
On the server there are some databases with the name modelo-submodelo (this is the name of the database, created with "-" same). When I execute a command like: mysqldump -h"$DBHOST" -u"$DBUSER"…
-
2
votes1
answer504
viewsI need to select sequences of numbers in a field of a table column
I have a 'Text' column in my 'process' table. Text consists of a VARCHAR (220), in this text I need to identify a specific word pattern. In this case a sequence of numbers with a "-" to separate:…
-
2
votes2
answers74
viewsCreate a new record based on another with Entity
I need to add some columns to a database as follows: save a comic line to a variable Market novo = new market(); novo = context.Markets.where(blabla).First(); change a row column novo.ParentID = 50;…
-
2
votes1
answer294
viewsError Code: 1054. Unkowm column
I’m looking for a value from an account I made in SQL: (Valor - (select Visibilidade)) AS Diferenca When I try to consult: Diferenca <= 500 It presents the following error: Error Code: 1054.…
-
2
votes2
answers1562
viewsImport JSON to Database
I have a json file, and I’d like to import it into a database. Is there any way to automate this process? There is no preference for database, but if you had any function for Postgresql would be…
-
2
votes1
answer918
viewsObject Reference not set to an instance of an Object
I’m learning to do App using the Xamarin 2017, and when I try to connect to the database I created via SQLite, the application shows this error: Object Reference not set to an instance of an Object.…
-
2
votes1
answer86
viewsInsert value in column C#
I have to read a column (which is the primary key of a table) and see if there is the value of a variable in that column, if it does not exist, I want to add it, if it exists, I want to move on. I…
-
2
votes1
answer844
viewsHow to save array to db?
I have 4 fields and wish to save in a db, however when putting in foreach ($_post['name'] as $name)... I do not know how to add more.. **DB** id | vt | nome | qtn | id_cat 1 | 23 | qua..| 58 | 4 2 |…
-
2
votes0
answers401
viewsGood practices in data modeling
I am an intern and I am developing a small application to help the staff of the quality and development to register the use cases and etc, the application is very simple, it is made in Angularjs…
-
2
votes1
answer565
viewsDisplay BLOB text
I have the following problem, in a report I need to display a field of the request that is as BLOB. And when I run the search it returns a strange code instead of the field information. $sql =…
-
2
votes1
answer590
viewsSave form data to database
I’m having a hard time trying to create a form on Laravel 5.4. The form appears normal, but when I click the button, the page reloads and the data is not saved in the database! {{…
-
2
votes1
answer451
viewsView Firebase Child in Ionic
Hello! I have a project on Ionic that I need to display some promotions, however I need to "update" them after the app released. For this I’m using Firebase! I managed to display in the app what I…
-
2
votes2
answers45
viewsError in SQL output
Guys, here’s the thing, I’m having to do a select in a bank, where I should look for values that exist between two dates, and that have a specific user. I made the select so: SELECT * FROM `tabela`…
-
2
votes1
answer227
views -
2
votes1
answer222
viewsCASE WITH IN does not work
I’m willing to do this search below: DECLARE @codccu VARCHAR(10); SET @CodCcu = '63' SELECT E.codepi, E.numcad, Max(E.datent) AS ENTREGA, Max(E.datent) + P.diaval AS VALIDADE, CASE WHEN…