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
-
1
votes1
answer463
viewsCreate 90-day filter before a period
I need you to bring back the results that completed 90 days within an informed period. For example, I have the ability to do: DT_INICIO_REAL <= (sysdate-90), I will have as a result 90 days from…
-
1
votes1
answer117
viewsJava database insertion problem
I’m trying to make an app of a veterinary clinic and followed all the steps right to create the database, connect with the eclipse and etc. The program connects, but does not insert anything that…
-
1
votes1
answer127
viewsDoes not return the amount of records from the Postgresql database
I would like to know the amount of records in my database, but does not return the amount. Look at the records in my database SQL command Select count(*) as contaRegistros from tb_produtos where…
-
1
votes0
answers23
viewsSimple lib to save data
I’m making some simple, static institutional websites, and I want to put some customizations. These customizations will be few and simple, and will only be accessed by one user. But you will have…
-
1
votes1
answer119
viewsList each user’s last message
Does anyone know how I could list each user’s last message? I was able to do that, but it lists the last message from just one user, and I wanted it to list everyone who sent a message to the user…
-
1
votes2
answers398
viewsWhat is the best way to authenticate in the database?
What is the best way to connect to the database using c#? Create a USUARIOS table, or create a USER in the database to access?
-
1
votes1
answer450
viewsSave visit cookie to page
Hello I am using a mysql php code that counts the visits of each page, but whenever the page is updated it adds one more visit, I would like a help with my code so that it saves the cookie for a…
-
1
votes3
answers8105
viewsLIKE and IN command in the same SQL command
It is possible to use like and in in the same SQL command? For example, I need to search in the table stockpile the Serial Number that can be 'SCAB171293E29','SCAB171293E4E' but they might have…
-
1
votes1
answer196
viewsIs using specific data types like SMALLINT and MEDIUMINT instead of INT and marking columns with UNSIGNED an exaggeration?
Speaking of databases, we know that they have several data types to be used in each specific situation. But, following the data types to the letter can be considered an exaggeration in most cases or…
-
1
votes0
answers387
viewsError: $http:baddata Bad JSON Data
I am finishing developing a web application but I have a problem. All my application was developed in Python, Restful, Angularjs and Chartjs. I am importing information from the database via python…
-
1
votes0
answers46
viewsWhich DB to use for PHP7?
Good afternoon personal beauty ? I would like suggestions of which DB to use for PHP7, I heard that mysql with php7 is very error and it is obsolete, Any suggestions for articles ? NOTE: I will use…
-
1
votes1
answer41
viewsLooping in Rows of a VB table
I’m trying to make this loop between the Rows in the database work. I have a code ready in C# and I’m using it as a reference, but I can’t get this part to run. It was like this: For Each Row In…
-
1
votes1
answer404
viewsHow do I create a database on HSQLDB?
Usually to create a database is through the command CREATE database and the name of the bank. However, I need to help a friend of mine for a college job, and I can’t figure out how to create a…
-
1
votes2
answers223
viewsModeling Database
good morning! I have the following problem in user, form and group relationships. In the way that the relationship (CONTEM) was modeled, it will become a table where it will have the user keys, form…
-
1
votes0
answers44
viewsAllow certain ID logged in only
My site saves in the database the user ID, then when logged in, gets the ID. I wanted to get some kind of code to do the following task: When user logged in with ID "x" on the site and is going…
-
1
votes1
answer470
viewsI cannot do a function that returns a Semester of a Date in Postgresql
I’m trying to make a conversion that returns a semester of a date, but this error has appeared here CREATE or REPLACE FUNCTION semestre ( data timestamp ) RETURNS INTEGER AS $$ BEGIN IF data <= 6…
-
1
votes0
answers95
viewsHow to return BD Json text to Arraylist in Java
I am having problems converting a set of texts in the Json format of the database to a set of Arraylist texts in Java. Follow the code below: Java model. public class Sala { private String…
-
1
votes1
answer751
viewsDivision error by zero - Query SQL
I have the following query below, however, when I run it, the following message occurs: erro de divisão por zero. I tried to use the function nullif, but without success. How to solve? SELECT…
-
1
votes1
answer683
views -
1
votes1
answer773
viewsHow to save image in database?
I am developing a web application using the play framework, in which I am finishing the CRUD of a user, however this missing only the part where the user saves his profile photos in the register. As…
-
1
votes3
answers124
viewsUpdate to CD_SETOR column values in all tables found with column
Using the select SELECT * FROM DBA_TAB_COLUMNS WHERE column_name like 'CD_SETOR' i have as a result many tables with different Owner with the same CD_SETOR. EX: Owner Tables Column Type 210…
-
1
votes1
answer182
views -
1
votes2
answers287
viewsHow to monitor database changes without making abusive queries
I have a code that accesses the database every second and returns me the number of rows of a table, the problem is that an abusive number of requests and queries are made in the database to monitor…
-
1
votes1
answer251
viewsError in update sql: Subquery returned more than 1 value. This is not permitted when the subquery Follows
I am performing a query to change the net cost of a product according to a brand, however, I get the following error message: Subquery returned more than 1 value. This is not permitted when the…
-
1
votes1
answer1258
viewsphpPgAdmin: "Identification disabled for security reasons"
When installing the phpPgAdmin on Linux, the following message appears: "Identification disabled for security reasons". What can it be?
-
1
votes1
answer108
viewsHow to pass data from database to combobox?
I wanted to put some data from the database in a combobox but I’m not getting it, I think the problem will be the connection to the database but I don’t know what will be wrong, can help me?…
-
1
votes1
answer337
viewsmysql query browser or mysql Workbench are SGBD?
wanted to know if these two programs are SGBD please to put in a job
databaseasked 6 years, 9 months ago Onurb Bruno 15 -
1
votes1
answer383
viewsWhat are the advantages and disadvantages of using object-oriented mysqli?
I’ve always used the mysqli the way I found most practical and never noticed any differences. Then came the question: why use the mysqli object-oriented? What are its advantages and disadvantages?…
-
1
votes2
answers157
viewsRevoke in TEMPORARY TABLE in Postgresql, is it possible?
It is possible to give a REVOKE (Privilege removal) so users don’t create temporary tables? The CREATE TABLE I need to keep, however, I need to block the TEMPORARY TABLE. It is possible?…
-
1
votes1
answer537
viewsFunction mysql_insert_id() returns only zero
I am having problems with the function mysql_insert_id(), when I use the form below the value returned is always "0" (zero). Can help me? The "add" function calls the "save" function". OPEN_DATABASE…
-
1
votes2
answers284
viewsQuery that only returns the result if a field is in another table
The title may not represent the question well. I have a table with information about cars (id(CP), name, model, among others) and another one with the "Extras" (id(CP), id_carro(CS), name_do_extra)…
-
1
votes2
answers530
viewsHow to make a direct calculation in the database
I would like to calculate the salary of a teacher based on the hourly load of discipline that he teaches, I created a Java algorithm for this, but however I can’t pass it to SQL Algorithm in Java…
-
1
votes1
answer5860
viewsComposite primary key using a foreign key
It is possible to create a composite primary key using a foreign key? I have the table mov_estoque, where I thought to put as composite key the id_mov and id_prod, however, id_prod is a foreign key…
-
1
votes1
answer506
viewsInsert the result of a Procedure into a new SQL table
I made the following code but I can’t insert the result into the new query table.Can I help myself? Here is the Sql code: DECLARE @Resultado TABLE ( Tabelas nvarchar(max), data_sincronização date,…
-
1
votes0
answers215
viewsAccent error when exporting xlxs database data with javascript
I am maintaining a code that reads data from a MYSQL database and via PHP transforms it into a table and with Jquery I export it with Excel document. However the accent gets all wrong for example:…
-
1
votes1
answer71
viewsHow to list BD query
Good night! How do I list a query in the database? I have a bank where you store singers and their songs... I wanted to list Spotify style, listing numerally according to the amount of content in…
-
1
votes2
answers311
viewsBring the count of the word "DATA" from a column calculated in SQL Server
Good morning, I have a query that brings in a column calculated the information of "Data" and "Historicos", in this column I have the item Prefix (vehicle plate) and the column with the respective…
-
1
votes1
answer1279
viewsSqlexception: ORA-00257: Archiver error. Connect Internal only, until Freed
Have an Oracle database connection that makes a simple entry into the database. The process was working, but now this presenting the error below. 2017-07-13 14:25:55.929 ERROR 12062 ---…
-
1
votes1
answer30
viewsWrite numeric topic (1 1.2, 1.2.1) in Mysql with PHP
I have the following problem: I need to record in a database some conditions, which have their item numbers and upload as in this example: Test 1 Test 2 2.1 Testing I tried to do with numeric(4,2)…
-
1
votes0
answers38
viewsProblems with dynamic php DIV programming
Good afternoon! I am working on a project that involves building a website about a very popular game. This same website will have a "coinflip" This feature consists of a betting system where: The…
-
1
votes1
answer134
viewsHow to return driver names in SQL table?
I have the following tables below, and I would like to return only the name of the pilots who never participated in a race in a Brazilian circuit in the country brasil. Table structure: PAIS (id,…
-
1
votes1
answer375
viewsSoftware to Create Mysql DB Relationship and Structure
I have a project in mind and would like to map the data and create the relationship of the tables, even if only visually before developing the pages, could refer me a software (I think the concept…
-
1
votes1
answer117
viewsWhat is the best way to post comments?
How can I organize a Mysql comment system An idea would be: id_post id_comentario id_user comentario Only it would take up a lot of space and it wouldn’t be so fast to process 2000 comments from…
-
1
votes1
answer54
viewsError in database connection
I’m doing a project and this with a problem in the database part. I created a form to register on the site, but when you put all the data to register, this information is not passed to the database.…
-
1
votes1
answer967
viewsEntity Framework Core Error
I have an error with Entity Framework core when I add Migration, the following error appears to me: System.InvalidOperationException: Cannot use table 'Atleta' for entity type 'Pessoa' since it is…
-
1
votes3
answers1674
viewsWhat is the best way to store videos, audios, images, documents in a bank?
I want to create a repository system where people can store videos, audios, pdfs, images etc. I will probably use PGSQL and want to know what is the best strategy for storing this data that can be…
-
1
votes0
answers220
viewsWhen making a DELETE request, the org.springframework.web.Httprequestmethodnotsupportedexception error is returned
When making a request to delete a user the following error is returned: { "timestamp": 1500142937327, "status": 405, "error": "Method Not Allowed", "exception":…
-
1
votes1
answer378
viewsDatabase does not work
I never made a form, so forgive me if I’m absurdly wrong. Here is the bank with the table: CREATE DATABASE db_formacao; USE db_formacao; CREATE TABLE `db_formacao`.`formacoes` ( `ID` INT( 5 ) NOT…
-
1
votes1
answer333
viewscss variables with values coming from the database
I’m developing a website where I saw myself in need to bring the style(colors) of the database elements. This would be a piece of cake if it were a page because (by relaxo) could write the css in…
-
1
votes1
answer209
viewsCategory modeling logic in an e-commerce
I am with a project to create an e-commerce, in which my doubt refers to the modeling of tables: Category(ROOT)>sub-categories>sub-categories of sub-category. As should be these tables, and a…