I'm having trouble creating a foreign key. I am doing the project in MySQL Workbench. The generated SQL script is as follows:
DROP TABLE IF EXISTS 'comercio'.'cliente' ;
CREATE TABLE IF NOT EXISTS 'comercio'.'cliente' (
'cliente_id' INT(1...
I need to load some data that is in spreadsheets into a relational database, but I have been facing some challenges with regard to inserting foreign keys.
In these images you can see that I enter the project data first, the auto increment of...
Hello, everyone!
Well ... My problem is this:
I have a MySQL database that has 3 tables (Client, Event, Equipment). The event table has two foreign keys, the first one referencing the id of the Customer table (customer_id) and the second re...
I have 3 tables, which are: personal_person , personal_juridica and address .
Both tebela pessoa_fisica , and tebela pessoa_juridica use the endereco table. I would like to add two foreign keys in the endereço t...
I often see database modeled so that foreign keys close a circular reference, for example I used a template with cidade , bairro , and cliente . Here's the ER model:
I understand that in this format, the data may be in...
I have a Database of City, State and Country. But I want to add Cities to my table and it does not always contain a State to be referenced.
However, every city is located in one country.
My question is: can I create a relationship in which...
To register the games of a football league the following tables have been defined:
Time (
id int primary key,
nome char(20),
pontos int,
nroVitorias,
golsMarcados int,
golsSofridos int )
Jogo (
idTime1 int,...
Good morning!
I'm having difficulty exporting a SELECT that I created, it happens that when using INTO OUTFILE the file that is exported is breaking the lines where "Join" exists. So I ask your help so that I can solve this problem.
Note: Whe...