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
votes2
answers48
viewsMysql - Add values from a column and also bring value from each row
I have a certain column and need to return both the sum of the values of the same, as well as the individual values of each row. I did a test with UNION and even worked, the first line returned to…
-
0
votes0
answers35
viewsCREATE TABLE with derived column Postgressql
Greetings to everyone, I am learning SQL recently and I found myself with this problem inside a database that brought from the internet to do some exercises, but I’m encountering an expression error…
-
0
votes1
answer100
viewsChange the order of a result in PHP WHILE from Mysql
I am with the following difficulty, in a table are stored records of product categories, I made the connection mysqli, SELECT and WHILE, and everything is fine so far, but what I’m having difficulty…
-
0
votes2
answers40
viewsSelect in two tables with Count
I have two tables in Mysql clientes id nome cat categorias id nome I need to create a SELECT, that shows all categories, but only categories that have more than 10 clients (for example). I wanted it…
-
0
votes1
answer276
viewsHelp in Mysql Phpmyadmin How to insert a table in a database?
How do I insert a table into a abanco ? I am a beginner mysql user and beginner in the world of programming. I made the following code: INSERT INTO banco1( CREATE TABLE Cliente ( id INT NOT NULL…
-
0
votes1
answer63
viewsWhat are the advantages and disadvantages of using Auto Increment Field in Firebird?
I’ve heard of some people who use Campo auto increment can give complications in the database on account that it can make several jumps in the numbering and even get lost in the counts. I don’t know…
-
0
votes0
answers16
viewsPortuguese Database to Study
Hello. I would like to know if there is a database to study, but in Portuguese. I’m studying the creation of management reports with BI tools connecting to the bank. But as I only got banks in…
databaseasked 3 years, 8 months ago Glynison Souza 1 -
0
votes0
answers23
viewsHow to get the number of days between two Javascript dates?
Good evening! The database in which I work returns me two dates in milliseconds. How can I calculate the difference in days between the two dates? Example: Data1: 1619226924035ms Data2:…
-
0
votes0
answers30
viewsError using DELETE with INNER JOIN in MYSQL
DELETE tbl_grupo_id FROM gc_art_test.tbl_grupo_tbl_permission INNER JOIN gc_art_test.tbl_grupos ON tbl_grupo_tbl_permission.tbl_grupo_id = tbl_grupos.id WHERE tbl_grupo_tbl_permission.tbl_grupo_id =…
-
0
votes2
answers115
viewsSelect all customers and check if you are carrier and supplier
I want to make a select that selects all customers and next create two columns a carrier call and another supplier and in each of them mark yes or no. Ex: Código Nome Fornecedor Transportadora 01…
-
0
votes0
answers21
viewsI want to divide 0.01 cents by 4, the result is 0.0025 how to store in mysql?
I want to divide 0.01 cents by 4, the result is 0.0025, I want to store this value in mysql which dataype I use in column?
-
0
votes1
answer204
viewsConflit FIREBIRD Lock Error
I’m new to the subject of database, so I hope you understand my doubt and lack of knowledge: We use Firebird as SGDB and Ibexpert as a tool for database administration and configuration. Because the…
-
0
votes2
answers70
viewsBackup Database, which tool to use, alternatives, security and data access?
I don’t know if this is the right place to ask this question, if not I apologize and I exclude the question... Where I work we have a system that works with 2 types of database, Firebird 2.0 or…
-
0
votes1
answer87
views"ORA-00955: name is already used by an existing Object" error
When I try to run this part of my code in Oracle Live SQL, it gives the error "name already assigned to existing object". But there are no repeated names here, other than my primary and foreign…
-
0
votes1
answer259
viewsHow to create a Function that calculates CRC16 in SQL Server?
can tell me if there is any sql function that calculates CRC16, the calculation method is listed as "CRC-CCITT (0xFFFF)". CRC-CCITT (0xFFFF) -> polynomial: x 16 + x 12 + x 5 + 1 I tried to create…
-
0
votes0
answers8
viewsHow to run Cakephp Migrations ONLY in my development environment?
I am working on a project that has three different environments: Live (project in production) Staging Development I created a Migration that creates the table teste, however, instead of creating in…
-
0
votes0
answers31
viewsHow to show result of a modal search
I’m new to Frontend, I’d like to click on a button, show the user’s feedback in a modal. I already have the page showing the results, this working ok I would like to show now in a modal window to…
-
0
votes1
answer28
viewsDeactivate the Submit button for a certain time
Is it possible to do 1 Ubmit per day by date time of the bank? Ex; the iduser do one post per day? grateful!
-
0
votes1
answer49
viewsMysql event does not run at specified time
I created an event in mysql so that every day on time 00:05:00 Starting on 07/18/2021, it performs an update on a table, only it is not running at the given time, what might be happening? Follow the…
-
0
votes1
answer59
viewsWhy is my WHERE instruction not working?
##index.php define('DB_HOSTNAME', 'localhost'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', null); define('DB_CHARSET', 'utf8'); define('DB_DATABASE', 'website'); $conn = new…
-
0
votes0
answers40
viewsWhat is the function of the Unique Switch in foreign keys?
If the foreign key will always reference a primary key, which by definition is unique, then what is the need to define the Unique Constraint in foreign keys?
-
0
votes0
answers152
viewsLosing Session Codeigniter
Good afternoon guys, I started an internship and they gave me an Commerce to stir, it has Codeigniter (I had never touched)and a library called ion auth(for login) but when I login it sets the…
-
0
votes0
answers15
viewsFatal Error: Uncaught Error: Call to a Member Function bind_param() on bool
I am preparing the following method of uploading information: public function uploadProjeto(int $idCategoria, string $titulo, string $area, string $ano, string $endereco, string $descricao){…
-
0
votes0
answers26
viewsI’m studying about python /Jango and I came across a from and an import called "Rating" could someone explain to me what it’s for?
def show_scoring_average(self): from .Rating import Rating # Gostaria de entender esta linha try: ratings = Rating.objects.filter(user_rated = self.user).aggregate(Sum('value'), Count('user')) if…
-
0
votes1
answer319
viewsProblems for invoking/inserting data with Procedure
I created this project in Oracle, but I’m not able to insert data with the EXEC. Way I’m declaring the EXEC: EXECUTE SP_PRODUTO(8,'teste' 1); erro APRESENTADO: ORA-06550: linha 1, coluna 126:…
-
0
votes1
answer28
viewsUse more than one value to use parameter in an Oracle function
Good afternoon, I have the following problem: I need to perform a function that calculates the average value of a product on a specific date. SELECT VERIF_VL_CUSTO_MEDIO(PRODUCT.CD_PRODUTO,…
-
0
votes2
answers105
viewsAdd FK in mysql table
Good morning I am facing the following problem, I created 2 tables in the bank, while trying to create a fk in one of them generated the following error:#1215 - Cannot add Foreign key Constraint.…
-
0
votes0
answers68
viewsSQL Management Studio only connects remotely without the instance
While trying to make a connection with a first remote SQL, I realized that my Management Studio could not connect using the instance, as follows: After that attempt, I removed the instance, and…
-
0
votes2
answers104
viewsModelling Ruby on Rails
Guys I have a question I can’t see what the way to solve. I have to perform a stock program in Ruby on Rails that contain some equipment, which will contain some avergiguações. For example, I will…
-
0
votes0
answers9
viewsCollect and analyze data
Have some low cost or free tool to collect and analyze data for business intelligence?
-
0
votes1
answer130
viewsKeyholder.getKey() can return null - Spring Boot Jdbctemplate
The thing is, I’m a beginner in Spring and I’m doing a method that will insert a new row into a database table and this method will return the Id new that was generated by the Bank, I am doing this…
-
0
votes1
answer217
viewsList database query in two columns for the user. - PHP
I am developing a simple system to practice my knowledge and I am at a time I want to perform a query to the database and resume on the screen in two columns, the part of the query is ok, but lists…
-
0
votes2
answers410
viewsCassandra CQL Shell opens and closes
I started studying about Cassandradb, but I am using Windows. When I start the service 'Datastax DDC Server 3.9.0' I get an error. Looking at the logs, you have the error: Arquivo:…
-
0
votes1
answer52
viewsQuery does not return values
None of my querys return values, since they have data in my database. What could be happening in my code that is resulting in this? Follows the Code: <?php require_once("Usuario.php");…
-
0
votes1
answer87
viewsI cannot receive the view parameter in the controller
Remembering that when executing it does not return any error Controller using CRUD.Aplicação; using DocumentoObjeto.dominio; using System; using System.Collections.Generic; using System.Linq; using…
-
0
votes1
answer47
viewsError: More than one value was returned by a subquery
Could help me identify the mistake: SELECT Failed. 3669: More than one value was returned by a subquery. SELECT (SELECT ID_FUNC FROM P_ISIDB.TB_DIM_FUNCIONARIO INNER JOIN P_ISIDB.TB_STG_VNDA ON…
-
0
votes1
answer416
viewsIntersection between same table, auto relationship, mysql with INNER JOIN
Hello, I’m making a facebook clone database. I have two tables, one of users and another friendship. The friendships table is a self relationship of users as shown in the image. This table of…
-
0
votes1
answer71
viewsList the best-selling product per day in a comic book store
I need to list the most sold product per day in the store, showing the description, type and day. How far I’ve come: SELECT Data, MAX(QtdVenda) as Vezes_Que_Foi_Vendido, IDProduto, Fabricante, tipo,…
-
0
votes1
answer53
viewscalculation with BD data, bring service, value and total
I need to save cliente, serviço, valor of a service. The first problem is to be able to return the total value (the sum of the services). Man form until the moment is like this: <form…
-
0
votes1
answer382
viewsHandling date and time in PHP
I have a question. I would like to know how I can do so that the php code stores the time I registered an activity, but it should be hidden in the form and only visible when this data is visible in…
-
0
votes0
answers44
viewsUpdate data that has many to many relationship with Entity Framework
I’m trying to update an object and the only thing that doesn’t update is his relationship from many to many the rest as name and surname update [HttpPost] public IActionResult AtualizarProfessor(int…
-
0
votes3
answers4060
viewsData modeling for products
I made a diagram in the Workbench according to the instructions above, it is about the sales control in a grocery store. My database teacher said something about not being able to visualize the…
-
0
votes0
answers32
viewsLock timePicker button
<?php include('ligabd.php'); session_start(); if(isset($_SESSION["id_cliente"])){ }else{ header("location:login.php", true, 301 ); } $successMsg=''; $consulta = 'SELECT * FROM marcacoes'; if…
-
0
votes2
answers890
viewsStructural database, address table for two different entities
I have these four tables: Clientes | Lojas | Endereço | Contato As much as lojas how much clientes possess address and contact phones, there is only one table for endereços and contatos, to identify…
databaseasked 6 years ago Hebert Lima 987 -
0
votes1
answer89
viewsRAILS Seed File Runs but Does Not Save Data in Database
I’m creating a file Seeds for popular my database, this file is responsible for popular Grupos(model :grupo) that wheel without problem and also popular TipoAtividade(model :tipo_atividade), who…
-
0
votes1
answer127
viewsWhile always returns the last record in sql server
I have a select to bring all the records that have been entered and I need to do a while to go through this select and give an Insert in another temporary table. Only that the while is always…
-
0
votes0
answers41
viewsWhen registering the php form with an image it only sends the image to the folder but does not register the data in the database
This is my form <form method="post" id="show" action="inserir/inserir_show.php" enctype="multipart/form-data"> <h4>Nome do show</h4> <div class="form-group"> <input…
-
0
votes0
answers50
viewsLock the timepicker button
<?php include('ligabd.php'); $id=$_GET["id"]; session_start(); if(isset($_SESSION["id_cliente"])){ }else{ header("location:login.php", true, 301 ); } $successMsg=''; $consulta = 'SELECT * FROM…
-
0
votes0
answers131
viewsCreate Mysql Trigger with input condition
Hello, I’m doing a credit card system and I created a column with the types of card using ENUM('bronze', 'silver', 'gold'), now I want to create a Rigger so that when the user enters with the type,…
-
0
votes1
answer160
viewsPLSQL - Query between tables
Hello, I would like suggestions on how to perform a query between two tables (Person and Person Permissions), where we have the table Person (person, name), the table Permissions(Permission_id,…