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
-
2
votes1
answer83
viewsWhere in datatables with codeigniter
I have a code that draws a table according to the data in the database. EX: If she has a registered customer she will make the table with only one row, if he has no registered customer, no table…
-
2
votes1
answer115
viewsDeployment of Sqlite together with . Net application
I finished the C# app with Sqlite, but I saw that I need to send along with the Sqlite base and DLL. Which Sqlite DLL files need to attach and which folder do I have to play these files in?…
-
2
votes1
answer111
viewsAlternative to PHP database?
I want to know if there’s a way to save form data, display it and edit it without using a database? Because whenever a software will do integration with database I stop because I do not understand…
-
2
votes1
answer50
viewsform does not insert into database
I have a HTML with that code: <div class="row"> <form method="post" action="php/mensagem.php" accept-charset="utf-8"> <div class="row"> <div class="col-lg-6 col-md-6 col-sm-12…
-
2
votes1
answer97
viewsEntity Framework Extra column when using Icollection
If I have two tables in the bank, for example: tabela1 and tabela2, and in the tabela1 I have a ICollection of tabela2: public class tabela1{ public Guid tabela1Id {get;set;} //campos... public…
-
2
votes2
answers32
viewsProblems saving information to a database column
I need to take a typed information and give the uptade in a field (Pont), but the field needs to be on the same line as a selected player in my combobox(cmbtime). So when I selected the player in…
-
2
votes1
answer113
viewsError showing past time of multiple PHP posts
<?php function timeAgo($time_ago){ $cur_time = time(); $time_elapsed = $cur_time - $time_ago; $seconds = $time_elapsed ; $minutes = round($time_elapsed / 60 ); $hours = round($time_elapsed /…
-
2
votes3
answers3569
viewsHow to find relationship and cardinality in Mysql?
The image below shows a relationship between two tables created from Mysql Workbench. What I need to know is how I can find this information inside the database. I need to know exactly what kind of…
-
2
votes1
answer432
viewsView table by foreign key in C#
So, I have a Pizzeria project and I have some tables, such as: Customer Registration, Employee Registration, Order Registration and etc. I’ve already created a Customer and Employees table and…
-
2
votes0
answers153
viewsDatabase can overload like that?
This explanation there is no need for code, it is more a question of database logic even. What is happening: I have an application using Codeigniter and Mysql, and it has 4 actors, but in one of…
-
2
votes1
answer1600
viewsConcatenate columns and some with NULL value
I’m making a select and concatenating the columns, when a column has value NULL (has no value ) the whole line is NULL follows an example: select…
-
2
votes1
answer1201
viewsDifference between varchar2 and nvarchar2
In Oracle, there are two types of data that I can use to represent texts, the varchar2 and the nvarchar2. What is the difference between these two types of data?…
-
2
votes2
answers757
viewsNULL value in database x performance
I always used database (Mysql) for small projects and never cared about the option "NULL when empty", IE, was blank even. Now I’m designing a big system, I’d like to know the concept of using value…
-
2
votes1
answer62
viewsstore SQL query in Session for further processing
I would like to store an SQL query in a Session, that is, all fields and their respective values. I’d say it’s about 12 fields, and about 150 records on average. The idea is not to have to consult…
-
2
votes1
answer1229
viewsEmbedded database with C#
I’m developing a local app for desktop. As there will be no database servers, I studied some, such as Firebird, Sqlite, Access and even Localdb. But I still feel "lost" in which to work. I know the…
-
2
votes2
answers385
viewsError in Mysql connection and Android application
I’m having an error trying to make the connection between my App and the Mysql database. I am creating a direct connection to my bank, I know the best way would be to use a webservice, but I am…
-
2
votes0
answers281
viewsTrigger in Mysql for movie rentals?
I need a little help because the teacher said not to use FUNCTIONS and PROCEDURES, ONLY the TRIGGER. It follows image of what he is asking. I’m really not able to do. For me there had to be before a…
-
2
votes3
answers1249
viewsPHP condition not to display image when it does not exist
My problem is the following.I have a table with various product images, but not in all products I have 5images (total BD columns). what intended was to "undo" the html line when the image does not…
-
2
votes1
answer110
viewsModel comments
I’m creating a comment structure similar to Mercadolivre, how do I make the modeling contemplate and ensure that: NOTE: I’m calling comments question and answer since this is basically how the Free…
-
2
votes1
answer92
viewsIn a relational database model, should an audit table relate to all entities?
The title already says it all, in a relational database model, an audit table, must have relationship with all entities I want to insert in the audit?
databaseasked 8 years, 11 months ago Renan Cavalieri 2,748 -
2
votes2
answers820
viewsAn application for multiple customers with Laravel
I’m creating a multi-client web application project using Laravel. In my project this application would have several databases, one for each customer. Searching the internet, I saw that with the…
-
2
votes3
answers329
views -
2
votes1
answer90
viewsSearch in mysql database
I have to do a search in a table, I have to pass up to 3 parameters to filter my search, this is my method: public List<Motores> pesquisaMotores(String serie, String marca, String modelo) {…
-
2
votes1
answer1394
viewsCreate Task Mysql Database
I need to create a JOB (known in sqlserver) in a mysql database, first I would like to know if there is such a possibility, and if there is one, what would be the syntax? I have a Table that holds a…
-
2
votes2
answers366
viewsActive = False before starting a Delphi application
Every time we work on Datamodule on the connection component, we activate to do tests and the like. It turns out that if we forget to disable when we compile, it can give error when we send to the…
-
2
votes2
answers1877
viewsHow to check if there is any sqlite database in the application?
I have the following dilemma: I’m setting up an app where I perform a synchronization between a Mysqle database and Sqlite using a Webservice. My database is already available in Mysql, and in my…
-
2
votes2
answers13066
viewsMake Insert in two tables at the same time
I need to do an Insert on two tables at once. I have a user registration and I need a user id to be registered in two tables at the same time, thus making an association of this user to another…
-
2
votes2
answers159
viewsWhen should an attribute be a table or vice versa?
Example: I have an Orders table, the order has some status, new, delivered, canceled etc. When the status is canceled I will give the option of the user to tell the reason that was canceled, this…
-
2
votes1
answer1039
viewsHow to make a select starting with a certain line
How do I get one Select starting for example from the second row of my table? I know that using the ASC limit 1,1 I can pick the second line, but how to start from it?…
-
2
votes2
answers3059
viewsTo group and remove lines with "null" values from this query in Mysql
CREATE TABLE tblCliente ( idCliente int(11), estado int(1) ); CREATE TABLE tblPergunta ( idPergunta int, idCategoria int, pergunta varchar(255), tipoResposta tinyint(1) ); CREATE TABLE…
-
2
votes1
answer130
viewsDoubt Simple School System
Well I’m doing a job for college, I’m already halfway through, but to do the precise end: The teacher can register a pdf/image in his area. And the student on his page can see/download this…
-
2
votes1
answer20445
viewsHow to open a. fdb file?
I need to open a database file (.fdb), but I don’t know how. What should I do to open this file? In it there is a list I want to pass to Excel.
-
2
votes1
answer900
viewsHow to traverse lines of a SELECT in a STORED PROCEDURE in SQL Server?
Other than with the use of CURSOR and WHILE in the SQL Server, what other ways it would be possible to traverse the result lines of a SELECT in a STORED PROCEDURE?…
-
2
votes1
answer763
viewsWhat is the correct way to structure addresses in Mongodb?
When I learned SQL, the way address was structured was to create a series of tables (neighborhoods, cities, states, countries). So I listed the tables. Then just add only the neighborhood id to the…
-
2
votes2
answers3830
viewsInsert data from one table into another
Guys, I’ve been racking my brain with this problem for a while now and I wanted your help. I have a code that inserts data into the table venda: <?php if(isset($_POST['send'])){ $venda =…
-
2
votes1
answer213
viewsError: "You have an error in your SQL syntax"
I’m getting the following error while executing the change attempt in the BD: You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right…
-
2
votes1
answer2135
viewsNULL error when adding a new line
Good guys, I have a bench as described in the image below: I have some questions: A) Uma geladeira da marca Brastemp 220 V que custa R$ 700. B) Três cadeiras de madeira em cores diferentes, cada uma…
-
2
votes2
answers5838
viewsCopy data from one column of a table to another of the same table
Hey, guys, I have a question. I need to copy the data from an integer column to another decimal column of the same table, that in Mysql. Is it possible to do ? there may be some inconsistencies in…
-
2
votes5
answers1793
views -
2
votes1
answer411
viewsSingleton standard for database communication
In PHP when I do a Singleton is created an instance for each request that tries to open a connection to the database or instantiating a single time she "always" will stay in memory for all requests?…
-
2
votes1
answer140
viewsTable multiplying the data
Well I’ve had this problem for some time and I’d like your help , have 3 tables that would be sale , vendaproduto , vendaservico . and I insert the items of the sale table in the other two tables…
-
2
votes2
answers747
viewsHow to make database changes without having a clear primary key?
I need a method to change data in an SQL Server table. According to my client, all the table data can be changed. For having this possibility, I am without a fixed and unique reference frame for the…
-
2
votes3
answers218
viewsPossibility to create 200 columns in a database
I am planning a software, which is a test of 200 questions where each question can only have 3 choices and select only one of them, and each question belongs to a class type ( for example question 5…
-
2
votes2
answers366
viewsAre product box bar codes suitable for primary keys?
Situation In a system where products will be stored in the database, and the barcode is a unique field, I would like to know if the barcodes that come in the product boxes have the possibility to…
-
2
votes2
answers6895
viewsHow to define "charset" of a table in SQL Server?
In Mysql to define the charset of a table we can use so: Mysql: create table user_details (...) default character set = utf8; How can I do the same in SQL Server?…
-
2
votes1
answer904
viewsSingle record with 2 fields verification - Laravel 5.1
I have a table with columns id, nome, descricao and tipo. In my Request I have: 'nome' => 'required|unique:edificacoes' So far so good, I can not register anything with the same name, but as I…
-
2
votes2
answers81
viewsHow to delete the first line of a megaheavy SQL file?
I have a "mega heavy" SQL file that doesn’t open in the sublime, nor in the notepad nor in gedit. I just need to delete the first line Use nome_database; to be able to import via the mysql Workbench…
-
2
votes2
answers97
viewsReverse process modeling
Always, or almost, if the Conceptual ER is made and then we model the Logical ER, in the BR Modelo It is possible to create the Conceptual ER and generate the Logical ER automatically, but when…
-
2
votes1
answer880
viewsDatabase for the Poll
I’m doing a questionnaire system and I’m having a hard time modeling the database. I need my system to be "smart" enough to ask different questions according to the answers. For example, my first…
-
2
votes1
answer3812
viewsWhat are the Woocommerce product tables?
I’m thinking of making an integration between Magento and Wordpress and would like to know if anyone has any idea which tables are responsible for the products in Wordpress with the plugin…