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
answer54
views"Fatal error: Uncaught Error:" in database
I’m running my first database (using a hospital as an example) through phpmyadmin, and the following error is being generated by attempting to register: Fatal error: Uncaught Error: Call to…
-
0
votes0
answers114
viewsError Parameter index out of range (1> number of Parameters which is 0)
I’m studying JDBC and learning how the resultset and statement, did first the method of adding and changing data with the statement that worked perfectly private void…
-
0
votes1
answer54
viewsORACLE displaying date field with 1 more day at the end of the months with 31 days
I created a function in ORACLE to calculate the date of the last installment by passing as parameter the number of installments and using the function ADD_MONTHS(DT_PRIM_PARCELA, INSTALLMENTS).…
-
0
votes0
answers38
viewsMongodb query optimization for large collection with large documents
I am using Pymongo with Flask and would like to know how to optimize a query as I am filtering within a large collection (2947 documents) with large documents. This is the structure of the…
-
0
votes0
answers11
viewsWhat is the conceptual difference between OLAP and OLTP?
Good afternoon, everybody, all right? What is the conceptual difference between OLTP and OLAP? Contextualizing: I am starting my studies in data analysis and I am with a doubt that I could not…
-
0
votes1
answer61
viewsConvert a sqlalchemy query to a dictionary - Python
I have this consultation made with SQLalchemy ORM, where table_schema contains an example of sqlalchemy column nq = session.query(Base.table_schema).filter(Base.tablename == 'stores').scalar() The…
-
0
votes1
answer36
viewsSQL - doubt in query
I have the following appointment to do, I was able to think of them separately. I’m starting to study databases and I don’t know how to relate the two. Table Occurrence number, date, description,…
-
0
votes1
answer52
viewsHelp with CRUD code
I am creating a CRUD on 000webhost using phpmyadmin I’m not being able to include a new user on the site. If I create a new user by the database it appears on the site, but if created by the site…
-
0
votes1
answer24
viewsHow to create a read sequence in a Select field in the Oracle Database?
I have a problem in my code I would like a help with an excerpt of my code. the ITE.SEQUENCIA line did not want to leave the number 1 fixed, because it may be that an item is deleted and starts with…
-
0
votes1
answer27
viewsNotice: Undefined index: pg in C: xampp htdocs pirataflixS Assets Movies.php on line 36
You’re making this mistake for me, I can’t solve it, can you give me a boost? I’m trying to register youtube links on DB, it’s going normal, and showing the videos too, but it’s this line of error…
-
0
votes0
answers83
viewsMysql file export error "ERROR 1(HY000): Can’t create/write to file"
Hello, I was having some problems to export a table in csv format from my database in Mysql due to the definitions of "secure_file_priv"... I made the following changes: I created a directory at the…
-
0
votes1
answer69
viewsView SQL database data in a similar way to the Access database
Good afternoon gentlemen I am a layman in the subject of SQL database and I am trying to visualize the data of an SQL database in table form, below is the name database E3 already created being…
-
0
votes1
answer145
viewsSimple quotes breaking the UPDATE query in mysql
I have the following difficulty, in my application, when executing the registration function, when I type some text with enclosed quotes, the query does not work. Follow the code below: Here I take…
-
0
votes2
answers59
viewsHow to make a SELECT to get the value of the last registered date
Hello, I would like a help to always use the value of a table. I have a table "COSTS" and every month it suffers price change of the products, but are not all that has update My question is that…
-
0
votes1
answer61
viewsC# LINQ Join with OR condition?
I need to write this SQL in Linq, but in that condition JOIN is what gets me. SELECT * FROM Boleto_Retorno AS BR LEFT JOIN Recebimentos AS R ON SUBSTRING(BR.CH_NossoNumero,1,11) = CASE WHEN…
-
0
votes0
answers29
viewsON DELETE SET DEFAULT does not work in Postgresql?
I’m trying to leave the value default 'SEM CURSO' in the student table when the course is deleted, but the way I am doing the value of the foreign key is not getting default and yes NULL. I am doing…
-
0
votes1
answer70
viewsError Code: 1136. Column Count doesn’t match value Count at Row 2
Good night, I’m making a table in Mysql Workbench where it shows data from an accounts receivable department, however I’m having a problem when I will enter the values it gives the error 1136 and…
-
0
votes0
answers30
viewsDatabase - Relationship - Research
Hello, guys, I’m doing a Django project and I have a question about the modeling of entities. In my project, one person can take on multiple criminal records. One day she may be a saleswoman for the…
-
0
votes3
answers307
viewsHow to save parts of a json in variable?
I’m new with programming and have a project in Console Application, which returns the call of an API the Json of it. I would like to know which command I can only get a part of json with. For…
-
0
votes0
answers20
viewsError connecting to a DB in Python
I’m having trouble connecting to a database by a script I developed in Python. It’s probably some logic error involving the variables I couldn’t decipher and I wish someone could help me. This is a…
-
0
votes0
answers8
viewsMysql 5.6.12 - How to create date field with current default value
I am creating a table that has a separate date and time field (yes, the two separate fields), and in these I want the default value to be the current date/time. I tried to create the field with…
-
0
votes1
answer44
viewsAm I Connecting to Database Correctly?
hello I have this table named Payment: fname email adr city cnameccnumexpmonth expyear cvv id and I have this payment form if the person wants to help my project! <form id="my-form"…
-
0
votes1
answer33
viewsUPDATE WITH CASE DOESN’T WORK
I am working with a bunch of data (Postgres) on vestibular and I was looking to do an update joining two tables and using UPDATE CASE WHEN THEN. I was relating the two tables through their ids and…
-
0
votes2
answers88
viewshow to correctly pass the txt file data to a python list?
I am creating a simple program that reads data from a file .txt, passing them to a list. Then the program asks for a keyword to check if it exists in the list and show which position it is in. A…
-
0
votes1
answer27
viewsSelect with Null Field
I’m doing a survey in a student database, and I started having the following problem: Every time a student fails to fill in the "address" field, even though he has all the other data in the table,…
-
0
votes1
answer29
views#1005 - Cannot create table`db_to_do_list`. `tb_completed` (error no. 150 "Foreign key Constraint is incorrectly Formed")
I’m posting this question here, because as much as I’ve researched, I can’t solve it I’m starting to study Mysql and the problem that occurred was this: #1005 - Não pode criar a tabela…
-
0
votes1
answer99
viewsMYSQL - TRANSACTIONS
Good evening, I’m a beginner in mysql and I came up with the following question. When I make a transaction like this START TRANSACTION ; INSERT INTO PESSOA2(IDPESSOA,NOME) VALUES(NULL,'PEDRO2');…
-
0
votes0
answers223
views#1452 - Cannot add or update a Child Row: a Foreign key Constraint fails
Personal talk I am having problems to create a foreign key in another table... You are giving this error: #1452 - Cannot add or update a child row: a foreign key constraint fails.... Follow the…
-
0
votes0
answers43
viewsConfusing data output in CSV
I am new in Python and am learning to analyze and write CSV files. I’m stuck in a problem I haven’t been able to solve for a few days: I’m trying to read a government database, also in CSV, take…
-
0
votes0
answers124
viewsDivision by zero in PLSQL
Hello. The Code below sometimes does not run because it is presented the error: You cannot divide by zero. I tried to do with a case, but my code is too big and the case would leave the structure…
-
0
votes1
answer35
viewsPLSQL shows error: PLS-00103 in function when using an Exception
PLSQL is reporting error PLS-00103 when I try to compile this function. Note: If I try to run only with the first option of this case "P_TIP = 1" it runs normally. If I try to add the case "P_TIP =…
-
0
votes0
answers32
viewsError relating tables in Sqlalchemy
I have two classes mapped: User and Contact with one-to-many relationship (User.). from sqlalchemy import Column, ForeignKey, Integer, String, UniqueConstraint from sqlalchemy.orm import…
-
0
votes1
answer66
viewsFilter a header inside df in pandas
I’m new to pandas and I’m having a hard time. I need to filter the columns in my dataframe, check if they are in a defined list and, if they are, group the columns and add up the values. It sounds…
-
0
votes0
answers45
viewsDatabase, SQL database
I am doing a job for the college whose goal is to create a table using Oracle Live SQL So far mine’s been like this: create table ALUNO ( rgm number(8), nome varchar2(50), nome_pai varchar2(50),…
-
0
votes1
answer35
viewsSum a column by Mysql ranges
Personal I have a table in my Mysql database like this: Table name is tb_cargaHora I’m trying something like this: SELECT nome, matricula, SUM(carga_hora) FROM tb_cargaHora Order BY nome; but only…
-
0
votes0
answers24
viewsHow to perform Join with another bank table, with different Rvers, using Sequelize?
I have a connection with two databases, with different servers, and would like to perform the Join between the tables of the two banks, using querybuilder. Would someone please help me? import…
-
0
votes1
answer45
viewsSQL Server select in a table returned by INFORMATION_ESCHEMA
Hello, I need to check all tables that contain the same column and make a logic to change all values of all these columns. I’m trying to get the name of the tables as follows: DECLARE @TABELA…
-
0
votes1
answer30
viewsReturn field different from the one inserted in the GROUP BY clause
I have the following table: | id | payment_id | user_id | device | ------------------------------------ 1 | 2 | 1 | active | ------------------------------------ 2 | 4 | 5 | not_active…
-
0
votes2
answers64
viewsSelect returning null values in the database
SELECT S.ID_SALES, S.ID_CLIENT, C.FULL_NAME, S.SDATE, coalesce(S.billed, 'N') BILLED, P.product_description product, I.amount, I.unit_cost, I.unit_cost * I.amount SUBTOTAL, coalesce(I.discount, 0)…
-
0
votes1
answer35
viewsProblems adjusting a mixed effects model using the gamlss package
I’m trying to adjust a mixed effects model considering the package gamlss. The data is here: https://drive.google.com/file/d/1q4XuSPnZXx7TsrT3JVoucFyxeOSegWFz/view?usp=sharing The model I’m…
-
0
votes0
answers67
viewsSum function in SQL database
I need to create a user role (user function) which receives as input parameters a store identifier code and a category identifier code and returns as a result an integer value that informs the…
-
0
votes0
answers14
viewsHow to create a temporary table within a function in oracle?
I’m creating a time sheet in the system. The idea is that the user fill in a filter with the reference date and then Function prints every day of the month with the abbreviation of the day of the…
-
0
votes0
answers33
viewsSequelize error while trying to connect to database "Dialect needs to be explicitly supplied as of v4.0.0"
I am trying to establish a connection to my postgres database using the sequelize, when I try to connect it accuses the following error, even with the dialect parameter being defined, yet it says it…
javascript database postgresql sequelize-jsasked 3 years, 6 months ago Marco Aurélio Lopes Júnior 145 -
0
votes1
answer115
viewsHikari timeout oracle springboot
Hi, I’m trying to manually set up a connection pool with Hikari. I will need to do manual because the application will have its dynamic settings for connection to the databases and schemas/Sid. How…
-
0
votes1
answer24
viewsError in the subselect of an sql script to generate update script bringing more than one line and giving errors
I have two tables, a partner of which some fields of cnpj_cpf are wrong and another that I went up with the corrected data, totaling I have approximately 1 million lines to solve, so I generated a…
-
0
votes0
answers60
viewsReturn multiple lines, in a single comma separated by ORACLE
I need to bring these results, in a single line, where it is only separated by a comma, how do I do that? Query: SELECT ' '|| (SELECT DECODE(MAX(g.ds_opcao),NULL,'',MAX(g.ds_opcao)||' - ') FROM…
-
0
votes0
answers12
viewsSQL Server error in UPDATE column with Always Encrypted
I’m implementing in a bank SQL Server the Always Encrypted which serves to encrypt columns of a table. The process of creating the certificate, link it in a table/cokuna and use it in the SQL Server…
-
0
votes0
answers16
viewsReturn the name of the course and the names of the disciplines for which there are no enrolled students
I have these tables and would like to know how I select course name and the names of the disciplines that do not have students. create table aluno( codaluno int primary key, nome varchar(30),…
-
0
votes1
answer74
viewsSummarizing birthday girls by month (SQL)
I’m trying to count the number of birthday clients per month in my database, but I can only make it display the months that have birthday kids, for example: But I need him to show the months that…
-
0
votes1
answer33
viewsDoubt column concatenation
The code below returns a sum per classification. Something like this: Services = type 1 Materials = type 2 the expected result is that there is only one row, and that in this Row I have the value of…