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
votes1
answer43
viewsIs giving this error qdo try to add data in table - 00928. 00000 - "Missing SELECT keyword
Is giving this error qdo try to add data in table - 00928. 00000 - "Missing SELECT keyword INSERT INTO DEPT ( DEPTNO, DNAME, LOC) VALUES (10, 'ACCOUNTING', 'NEW YORK'); (20, 'RESEARCH', 'DALLAS');…
-
0
votes1
answer938
viewsError connecting spring boot to mysql
The error in spring boot is : Error Starting Applicationcontext. To display the conditions report re-run your application with 'debug' enabled. 2018-07-14 16:11:53.259 ERROR 13188 --- […
-
0
votes2
answers55
viewsAdd several selects
How do I add the result of several selects, for example, I have 2 selects that each of them brings a value field, ie with the sum of something... Select 1: SELECT SUM(ms.valor) as valor FROM…
-
0
votes1
answer32
viewsResolve this database issue
I deduced on doing so, but I believe that with this I only have the information of those who did not trade, could give me a light in this question? SELECT CR.name FROM broker as CR Inner JOIN…
-
0
votes1
answer72
views -
0
votes1
answer46
viewsmysql error in creating Foreign key
I’m trying to create a Foreign key, but it’s wrong. Follow the code I’m using: CREATE TABLE foto( id INT(10), img varchar(25), nome varchar(25), link varchar(25), vew INT(10), tkm VARCHAR(100),…
-
0
votes1
answer144
viewsConsume REST API from a PL (Postgresql 11)
Hello, I am working on a project in which I must build a PL that should consume a REST service (return in JSON). Looking at the Postgresql documentation, I did not find equivalent functions to…
-
0
votes0
answers31
viewsInvalidpipeargument error when using Datepipe
I’m making an application in Angular and I’m trying to show a date, coming from the database, in a table. I have a database, as I mentioned above, which has a field for storing dates, like…
-
0
votes0
answers247
viewsConvert Column to Oracle Lines
Good morning! I need the result of this SQL: SELECT CD_ITEM_PAI, CD_ITEM_FILHO FROM ESTRUTURA WHERE CD_ITEM_PAI = 707534 That at the moment is this: Be that as it may: Can you help me? Using PIVOT I…
-
0
votes2
answers137
viewsVery slow python code?? Access to Access database with pyodbc
I need to get some data from a huge access database (two, actually, depending on the input I have). I have a function that calls this bank by Chunks (if I try a fetchall gives memory problem). This…
-
0
votes2
answers47
viewsTotal Subrecords - Mysql
In my database I have several tables, but I’ll make a simple example of what I want to do: Assuming two tables: Table 1 id | store | date Table 2 id_2 | id_tab1_2 | product Note that the id_tab1_2…
-
0
votes1
answer583
viewsImport CSV into Django database
I have a CSV database and wanted to import to my models from Django, CSV has this structure: NAME,CLUB,LEAGUE,POSITION,RATING,PACE,SHOOTING,PASSING,DRIBBLING,DEFENDING,PHYSICAL,LOADDATE Tore…
-
0
votes2
answers113
viewsHow could I improve this SQL query query with sub querys?
There are many sub selects, how could improve this query in Mysql and make a max SUM of total_points_period'? Pick up the total points for a period from the "user_bigdata" table and the total points…
-
0
votes1
answer76
viewsHow to check if a mysql database table already exists with codeigniter4?
How to check if a certain Mysql database table already exists with codeigniter 4, and if it does not exist, create this table ?
-
0
votes1
answer27
viewsSelect a date field by extracting only the month and year
I need to mount a Query that selects the sum of the vacant amount of each month in a period of one year. In case there would be several dates within each month that would have vacancies, which…
-
0
votes1
answer143
viewsSearch database-specific data in Ionic 3
I would like to know how to filter and receive only the data I want on each page. my database.ts : `getAllProducts(){ return new Promise<Produto[]>((resolve, reject) => { let sql = "select…
-
0
votes1
answer58
viewsResult of the come zeroed query
Good Afternoon, I have a question, could you help me? ... What happens is: I have an sql query that brings me the total amount of sms sent per month and year, but I would like when I had not worked…
-
0
votes2
answers215
viewsProblem inserting data into a table containing foreign keys
Hello, everybody! Well... here’s my problem: I have a Mysql database that has 3 tables (Client, Event, Equipment). The event table has two foreign keys, the first of them referencing the id of the…
-
0
votes1
answer60
viewsInsert based on a select, with NOT EXISTS validation with multiple records with Postgresql
Could someone help me, as a select-based Insert would do so by checking if the value already exists , with multiple values ? this way this working, however I would like to insert more than 1 record…
-
0
votes1
answer21
viewsWhere to put new packages in a Maven project in eclipse?
I am learning to use JPA with Maven in Eclipse, and I intend to use the MVC design pattern, when I create the project, I have the following vision: Well, I wanted to know in which folder I should…
-
0
votes1
answer531
viewsPython graph does not show all values on the x-axis
I used the pandas library to read a csv file and create a graph using matplotlib: import pandas as pd import matplotlib.pyplot as plt brazil_dataset = pd.read_csv('/content/states.csv') fig, ax =…
-
0
votes1
answer68
viewsHow to store the results of a function in a data.frame?
Good afternoon I am using the R to make a temporal analysis of the Infant Mortality Coefficients (IMR) of each Administrative District (n = 93) of São Paulo between 2013 and 2019 The base table I am…
-
0
votes1
answer300
viewsSQL - Insert random values into a table
Hello I am trying to insert random values in the columns but without success. I tried that but I got nothing. Someone who can help please. Declare @NovosID int SELECT @NovosID=NovosID FROM…
-
0
votes0
answers38
viewsHow can I update Mysql to an entire column if another one is doing it?
Somebody smart can help me with this? I have a table in Mysql named "Sellers" and I wanted all the rows in a "seller_image_s3" column to receive an update of "1" if the "seller_image" column is…
-
0
votes0
answers7
viewsData-oriented development
Good evening friends, today I received the proposal to participate in a selection process and the vacancy in question is Data Oriented Development, and I was lost. Would someone like to tell me what…
-
0
votes0
answers37
viewsER with implicit relationship
I’m doing an ER where all tables have to have a "log" of who made a record, IE, I have a table user which creates a certain record and in the registry there is a Foreign Key that indicates the user…
databaseasked 6 years, 3 months ago ayowole agbedejobi 557 -
0
votes2
answers355
viewsStoring multiple values in the same column of the database, how much is it worth?
I realize that many people encounter this doubt at some point in their development, "Do I put comma-separated values in the same column? Or create an auxiliary table?" Both questions have their…
-
0
votes1
answer69
viewsPurpose of a foreign key name
I am creating tables for a system I am developing and when entering the part of adding foreign key through the interface of PostgreSQL 9.3.17 I noticed you have the field nome to identify this key,…
-
0
votes1
answer522
viewsProblem using parameter in Preparedstatement
I wonder if there is any problem in using the variable "parameter" after "AND", because when I tested putting the column name directly in SQL it worked and when I try to pass the column name with…
-
0
votes0
answers17
viewsIn which cases is Primary Key NONCLUSTERED more advantageous?
Good afternoon, you guys! I was researching about Primary Key Clustered and found that answer: "The difference that actually exists is between the fields of the type NONCLUSTERED clustered clusters.…
-
0
votes2
answers59
viewsError in data received in PHP
This error appeared after hosting migration. Warning: number_format() expects parameter 1 to be float, string given in…
-
0
votes1
answer68
viewsHelp with Join in Mysql
I found several questions/answers about John on the site, but I still can’t create the command I need. What I need is the following: I have the following tables: item (I have two entries) id…
-
0
votes0
answers67
viewsSave to Database with filters
I am working on a project, I have to save a photo in the database with the filters applied, but it only saves the original and with the filters gives "error". A column has already been created in…
-
0
votes0
answers19
viewsError trying to create Sql Server database in Visual Studio (C#)
I’m trying to create a database in Visual Studio, but returns error as the capture screens even with active services. From now on, thank you.…
-
0
votes1
answer114
viewsinsert the license into SQL Server 2019 Standard Edition (64-bit) on Linux (Ubuntu 18.04.5 LTS)
Good morning Gentlemen(as) I installed SQL Server 2019 Standard Edition (64-bit) on Linux (Ubuntu 18.04.5 LTS) and after I bought the license, however I can’t find a tutorial or something that helps…
-
0
votes1
answer68
viewsRegistration is not being sent to the database
When I use 'Insert into noticias set ? ', to register in the bank, it is simply not registered Model: module.exports = function() { ... this.salvarNoticia = function(noticia, connection, callback) {…
-
0
votes3
answers51
viewsI can’t get average
I’m unable to sum up the qtd_itens_purchase with Count cod_person. The query runs normal, frequencybuys the displayed result is the same as the amount of items that comes from "qtd_itens_purchase".…
-
0
votes0
answers27
viewsHow to insert data into a specialized table?
I have two tables, according to the following logical design: Person(CPF, RG, Name, Address, City, State, Birth date) Client(CPF, Telephone) CPF references Person There are other specializations of…
-
0
votes0
answers165
viewsAdd data to Firebase
I need help later because I’m having difficulty inserting new data in firebase. I am developing an application for my TCC where it is possible to register and as soon as I can log in have an option…
-
0
votes0
answers32
viewsHow to save the path of an image when creating a table in SQL?
Hey, guys, what’s up? I have this case: I need to create a product table with the attributes 'id', 'Description', 'stock', 'unit', 'price' and 'local_photo', only I have doubts about the type of…
-
0
votes0
answers16
viewsHow to prevent SQL Injection (WHERE clause)?
How can I prevent SQL Injection in this case? <?php //==== GET URL PARAMETER $urlParam = $_GET['u']; $sql = "SELECT email FROM `users` WHERE keystring = '$urlParam'"; $result =…
-
0
votes1
answer33
viewsQuery Transformation
Does anyone know if it is possible to transfer a SQL SERVER query into a new table? No longer query to be shown with a "show table" command made from a query for example ?
-
0
votes1
answer23
viewsAND no SQL (Firebird)
I have the following code: UPDATE PRODUTOS SET categoria = '001' WHERE marca = '1774' But there are over 400 brands.. I thought about using AND in Where to do it with multiple brands at once, but it…
-
0
votes1
answer24
viewsPlace all items inside a folder in the firebase database
I’m trying to take all the items in the database and put them in a folder. When I went to the database I forgot to put the directory for the items to go to a folder…
-
0
votes1
answer26
viewsDatabase with built-in Back-End
Is there any kind of database that can process and store the data as if it were 2 in 1? Backend and Databank at the same time.
-
0
votes1
answer89
viewsPass the primary key value of a table to a foreign table of another PHP table
I’ve used MAX(column name_name), last_insertid, and nothing works, the foreign key of the second table keeps getting value 0. public function cadastrar_teste($nr_ficha_teste, $cod_refugo_teste,…
-
0
votes2
answers1368
viewsIs it a good idea to use JSON as a database?
I’m doing a mobile app project. Using Python and Kivy. My project has three main classes to save in a database (it’s a ticket selling app): Tickets, Events and Users. Searching, I saw that JSON is…
-
0
votes0
answers16
viewsHow to get another computer to access my database
I have a system that uses Sqlalchemy and this one needs psycopg2 to connect to the database. I turned my system into executable, but I left in the database configuration file the "localhost"…
-
0
votes1
answer32
viewsError :Exception in thread "AWT-Eventqueue-0" java.lang.Nullpointerexception
Well, I’m trying to make a login screen, in which the data are in the database, and if you have the right data as in the bd appears a message to the user, but is giving error. The Login page: import…
-
0
votes0
answers37
viewsWho connects to the Sqlalchemy database?
I have an app that uses Sqlalchemy’s ORM, but I’m confused about this connection. It is Sqlalchemy or the connection driver (in my case psycopg2) that actually connects to the database?…