Questions tagged as 'relacionamento'

1
answer

Help with grandfather, father and grandson relationships in laravel

I am learning and enjoying using laravel, but I have some doubts about relationships and how to get the result I want. I have the tables: TB_FORMULARIO - ID_FORMULARIO - NO_FORMULARIO TB_CAMPO - ID_CAMPO - ID_FORMULARIO_FK - NO_CAMPO...
asked by 11.06.2018 / 20:04
1
answer

RelationsShips Larval 5.4

I have 3 tables, [Users - > Departments - > Postings] where the Users table has many Departments Departments have many Postings. My question is: How do I relate the 3 tables with the with () method where (where () () is this logged in w...
asked by 23.08.2017 / 19:42
2
answers

Relationship with 3 tables in laravel

I'm trying to make the relationship between 3 tables in laravel. With 2 tables I got it, thanks to the help of the forum, but I can not make it work with 3 tables. the relationship is as follows: I have 3 tables: News, Photos and Unit (school...
asked by 10.08.2017 / 13:03
1
answer

What is the difference between the relationship with "identification" and "non-identification" relationship (Mysql Workbench)

I've been learning Database for some time and I do not know the difference. I would very much like to know. On the internet I even found answers, but they are not very enlightening.     
asked by 02.05.2015 / 17:56
0
answers

How to load multilevel relationships?

Hello, I'm trying to search 3 related tables as follows contracts belongsTo - > companies hasMany - > company_addresses. I would like to display company_addresses data in the contracts view. contracts id – integer company_id - in...
asked by 18.04.2018 / 18:38
2
answers

Laravel 5.2 - Making Many To Many relationships between records of the same table

The tables: The users table registers users who can have N functions that are stored in the funcoes table (student, responsible, teacher, etc.). The funcao_user table is pivot that makes the Many To Many relationship b...
asked by 14.09.2016 / 22:34
1
answer

MySQL: Query Table N: N

Create database Banco default character set utf8 default collate utf8_general_ci; use Banco; create table Cadastrados( Nome varchar(50), Sexo enum('M', 'F'), Matricula varchar(9) unique, Curso enum('Arquitetura e Urbanismo', 'Engenharia Ambient...
asked by 21.03.2017 / 16:05
1
answer

SQL relationship

Good evening, I am creating a small system in which I will have a form for Service, where the user will select a Client, and there will be a checkbox for multiple choice for Services. Can anyone tell me if my line of thinking is correct? T...
asked by 27.05.2016 / 16:15
1
answer

Relationship 1x1 (or not)

I have 2 entities: Product Order and Product ... Using the fluent API as I say to my entity Requested Item that it has a Product? Note: The product entity can not have dependencies, although 1 product can be in several items. I do not w...
asked by 07.08.2018 / 17:41
1
answer

Cardinality in Database - Relationship One to ONE

I am studying database, and at the moment beyond the definitions of bank, type of models I am seeing Cardinality! I have doubts in this exercise below: My doubts are as follows    How do I identify the origem and destino...
asked by 13.06.2018 / 17:52