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
-
0
votes0
answers1172
viewsError postgre trying to access externally
I am using NO-IP to connect to an internal server in my office. I’ve already released port 5432 on the machine’s firewall and I’ve also set up the pg_hba.conf and postgresql.conf files (I’ll leave…
-
0
votes1
answer276
viewsProblems with insert INSERT mysql
I am trying to insert data into my mysql database but the values do not appear in the table TABELA "users": id `int`,`11`, `notnull`,`primarykey`,`auto increment` email `varchar`,`11`, `notnull`…
-
0
votes2
answers302
viewsHow to query more than one table (Wordpress)
How do I perform a QUERY in the database in 5 different tables and return the values I want, example: I am performing a search system (my first) and need to capture the following values: Candidate…
-
0
votes2
answers324
viewsInsert ID into Table with 13,346 lines with LOOP
I need to update a table with 13,000 lines. And this table contains a field called "faixa_cep_id" and all ids are 0. I need to update this with a loop to not duplicate the fields (EX: 1, 2, 3,…
-
0
votes1
answer432
viewsHide password from database
Good Afternoon, I have some websites whose database password, I store in a connection string, on the web.config. Any programmer who has access to hosting ftp, can read the web.config file and view…
-
0
votes1
answer1280
viewsChange date column to timestamp
I have a table with a column like date but I need to see the GMT information, my idea is to convert it to timestamp. How can I change that even if the column already contains value? create table…
-
0
votes2
answers1059
viewsReturn Database Data and List in Combobox
Hello, I would like to be able to return the values of the company table database and for each row that returns go creating an option in the combobox, I would like to know how to do this, I think…
-
0
votes4
answers2146
viewsSQL - Draw random lines
Given the table as an example: I want to draw, between the lines with the same order number, a single line, that is, one of order 1, one of order 2 and one of order 3, randomly. I need a generic…
-
0
votes0
answers191
viewsHow to debug a Mysql query?
Is there any way to know what’s wrong with this QUERY? When you perform a query, it displays it on the screen but nothing appears, the var_dump returns NULL, what steps a professional takes to know…
-
0
votes1
answer37
viewsMap tables to save access history
I have an application, in which I need to save at least once on the day, the date and time that user accessed the application/ system. Because we charge at the end of the month for the number of…
-
0
votes2
answers543
viewsPick up data using Join in two table 1 for many
good morning, I need to perform a select of two tables that are related 1 to many: Table 1: products Table 2: price group I need to get all prices from the price group table, which may have 1 or…
-
0
votes1
answer99
viewsCan you store hash code in a database?
I was reading some questions here and a doubt has arisen in one of these questions. If I have an application that I need to store strings in a database to compare later with something, but I don’t…
-
0
votes1
answer250
viewsModeling of parcels and fiscal notes
I have the following tables: CREATE TABLE projeto ( idprojeto int not null, ... ); CREATE TABLE nota_fiscal ( idnota_fiscal int not null, numero int not null, data_emissao datetime not null,…
databaseasked 7 years, 9 months ago Fernando Zabin 707 -
0
votes2
answers736
viewsError: connection to database already opened
I am creating a method to test a connection with the Postgresql database, but when calling the method that opens the connection an error happens saying that the connection is already open and does…
-
0
votes1
answer43
viewsImplement 2 search criteria in the query (Wodpress/Mysql)
Within this query how do I add 2 more search criteria $wpdb->postmeta.meta_key = '_viewable' and $wpdb->postmeta.meta_value = 'yes'? $query10 = $wpdb->get_results(" SELECT * FROM…
-
0
votes1
answer3438
viewsMessage "Invalid Object name 'dbo.table' SQL Server with Go Lang
I am trying to use a select in my SQL Server Database that I have in Azure. I’m using the Driver: https://github.com/denisenkom/go-mssqldb. However, a message is returned to me: mssql: Invalid…
-
0
votes1
answer427
viewsHow to handle calendar in database
Hello, I am doing a personal project, to practice programming and I came across a situation that I am struggling to resolve. A user has a routine that repeats weekly, where each day of the week he…
-
0
votes1
answer282
viewsForeach multiplying results coming from the database (PHP/Wordpress)
How to do for foreach do not multiply the results coming from the database? I have the following function: $categoriess = (array) get_terms( 'job_category', array('hide_empty'=>false) ); echo…
-
0
votes1
answer3654
viewsFind duplicate values in an Oracle table
Have a table in an Oracle database called MESSAGE. This table has some fields among them LOCALID and APPLICATIONNAME. Below are examples of values entered in the database LOCALID - APPLICATIONNAME 1…
-
0
votes2
answers74
viewsChecking column fill with CHECK
I am creating the BD of my TCC and the table Clients is: create table clients( id serial primary key, name varchar(255), cpf varchar(11), cnpj varchar(14), .... I thought of doing a CHECK limiting…
-
0
votes0
answers43
viewsProblem with Notices, Object PDO
I have my class: public function SQL($sql, $arrayParams = null, $fetchAll = TRUE) { try { // Passa a instrução para o PDO $stm = $this->pdo->prepare($sql); // Verifica se existem condições…
-
0
votes1
answer342
viewsCircular Foreign Key
I often see database modeled so that foreign keys close a circular reference, to exemplify I used a model with cidade,bairro and cliente. Follows the ER model: I understand that in this format,…
database software-architecture relational-model foreign-keyasked 7 years, 3 months ago Rovann Linhalis 14,881 -
0
votes1
answer29
viewsServer to store data
I have a question, I wanted to develop a small program and I wanted the program to have a database. I started the program and wanted the database to boot without me opening the xampp for example.…
databaseasked 7 years, 3 months ago victor_bez 19 -
0
votes0
answers49
viewsUpdate BD Website
I need help because I’m making a website where : I show the values of the BD lines and have the option to update the data via Web. When I try to update it gives me the following error: Description:…
-
0
votes0
answers32
views -
0
votes3
answers290
viewsDoubt with Insert in Postgres Bank
I have an error message, tried several options of not getting a solution. Is there any configuration that is missing?…
-
0
votes0
answers86
viewsDelete duplicated postgresql lines
My code automatically inserts data into a database, making the BD too large and sometimes with repeated information. For this, I want to use the Slowly Changing Dimension (SCD) method so that: - A…
-
0
votes1
answer50
viewsUse of a Join to join two Tables
I wonder if it is possible and indicative to use a Join to "join" values contained in two tables made in a database of the SQL Server. I created two tables and one of them has general information of…
-
0
votes1
answer88
viewsConnection problems between the Entity Framework and the Database?
While running my application I am encountering the following error when loading the data through the Entity Framework. When it is executed I observe that the following is called connection string:…
-
0
votes0
answers104
viewsFailed to update to registry
I am having the following problem, when I try to change a registry made by my application, it creates a new record instead of changing. My question is, if when I do the trigger of insertion of the…
-
0
votes1
answer258
viewsReason for using cursors in databases
I understand what a cursor is, but I don’t understand and I can’t get anyone to show me a real reason to use them. Why should I use cursors? I want answers based on Oracle, SQL Server and Mysql and…
-
0
votes1
answer9363
viewsRun function that returns multiple values and based on these make the main SELECT - SQL Server
I have the following function in SQL Server that returns the name of each column of my table: CREATE FUNCTION dbo.FiltraNomeColunas(@FiltroColuna VARCHAR(200)) RETURNS VARCHAR AS BEGIN DECLARE…
-
0
votes1
answer81
viewsDynamic columns in mongodb view
Hello, I have a job where I need to create a view a db widget, but some columns of this view should be calculated at runtime, similar to mysql NOW(), for example: When I find in the view, I need a…
-
0
votes1
answer166
viewsCreate Mysql database at runtime
I am developing a Java registration application and I need this application to be executed to check if there is a database, if the database does not exist it creates this database and its tables so…
-
0
votes1
answer133
viewshow to convert my object into a string?
I did a function to insert the data into the database, but since I am using classes, I have to insert a class object into the database that will contain the data of the person in question, only that…
-
0
votes0
answers316
viewsJAVA - error starting Hibernate application
I am having problems starting my application with Hibernate. I am programming in Java using Eclipse. Error message: Sep 20, 2017 2:40:36 pm org.hibernate.Version logVersion INFO: HHH000412:…
-
0
votes0
answers10
viewsError on a trigger in Mysql
create trigger GatilhoRecebimento after insert on recebimentos for each row begin update caixa set valorcréditos_caixa = valorcréditos_caixa + new.valor_receb where caixa.cod_caixa =…
-
0
votes1
answer1469
viewsProblem while doing an update
Well I’m having difficulty to perform an update on my database it is presenting the following Exception. ERROR [org.springframework.security.web.Authentication.Usernamepasswordauthenticationfilter]…
-
0
votes1
answer251
viewsMongodb for multi-user data
I am developing an application to the best ERP style, but much simpler. It is a program of type MEAN (Mongodb, Express, Angular 2 and Nodejs) and also has a version for Android made with Ionic 2. It…
-
0
votes1
answer190
viewsapp ordering development, android firebase
good evening guys wanted to ask a question, I’m developing an app, and use firebase but I’m kind of layman still in programming, in order wanted to know if there is any way to sort the data that…
android database firebase classification android-recyclerviewasked 7 years, 1 month ago Eder Rodrigo Coffani 25 -
0
votes1
answer1096
viewsWhat is the correct type to store phone and address?
As the title says, what is the correct type and correct way to store phone and address, according to database normalization? In the case of phone, what is the correct type to store, the landline and…
-
0
votes1
answer254
viewsPHP PDO does not insert value
I don’t really understand PHP, but I’m trying to create a PDO connection. Connection works fine, but does not insert values... follows the code: config define("DB_HOST", "localhost");…
-
0
votes1
answer84
viewsRelationship model and entity
Guys, I’m setting up a website that has the artist chart and an artist can play more than one musical genre, as I would put in the database the genres that the artist plays ?
-
0
votes1
answer87
viewsPicking last value of each ID according to highest end year
I have the following query: select f.id_user as user, f.id_tempo, t.ano_inicial, t.ano_final from fato as f inner join tempo as t where f.id_tempo = t.id_tempo; Which returns me the following table:…
-
0
votes2
answers181
viewsHow to include a string in the database from an input array with Laravel?
I need to include a string data in my database table that I will take for input, which in turn is an array. Follow the form so you can see how it is. <div class="form-inline col-md-12">…
-
0
votes1
answer958
viewsCompare variables with values from an SQL Server table C#
I have 1 table with 2 columns (Code and Value). I’m writing a code in C# and I have a variable taxpercentage. What I need is to return the column value Code, when the variable taxpercentage is equal…
-
0
votes1
answer438
viewsSelect related to another select, pulling data from the database
I need to create a form that pulls the options from the sql database. So far so good, I did a while inside a query in php; echo '<SELECT NAME = "setor">'; while ( $temp =…
-
0
votes1
answer124
viewsfilter data of a query in minuscule and without spaces
How to query the database that ignores accents and other special characters? I have the products table that has the name field with the following values: "shoes", "Tennis", "Karaoke and Video",…
-
0
votes0
answers436
viewsSelect with data from associative tables
I am creating a small database to store the books I own at home, but I came across the following situation: I have two associative tables, a call self-published, that allows the same book to have…
-
0
votes2
answers64
viewsDifficulty adding data to db using PHP and MYSQL
Well, I’m starting my studies in php and mysql, and I’m having a hard time doing something theoretically simple, which would be a form that sends the information provided to a local db. By pressing…