Questions tagged as 'entidade-relacionamento'

1
answer

Type of relationship between tables (Laravel)

I'm implementing my CBT, about photos and such .. But now I got a doubt in the time to create the tables ... I'm using Laravel okay? Next, I have the following tables: users - roles - photos - tags works as follows: There are functions o...
asked by 15.08.2017 / 03:04
1
answer

How do I make many-to-many relationship in Ruby on Rails with has and belongs to many?

I have a system table and a table category, a system has many categories and a category has several systems, I wanted to use the has_and_belongs_to_many option of Rails (for being a simple interface and even to learn how to use this feature). Bu...
asked by 26.09.2016 / 15:58
1
answer

Entity Architecture in Rails

I'm in doubt about what would be the best way to represent a client name entity that may have sub-layers of the same entity. Customer may own another Customer who is actually a carrier, and that Transporter may have another Customer who is a...
asked by 06.01.2016 / 14:37
2
answers

Specialization and generalization in database and application development

I have a Livros table and I know that book specialization / generalization is Livros de Ficção , Livros de Drama and Livros de Suspense , for example. However, in the logical model, I do not know if I create a table...
asked by 08.07.2018 / 22:28
1
answer

Map relationships with Fluent API

I have three simple classes of city, state and country. I noticed that simply declaring a property of type Estado in class Cidade the foreign key is generated correctly. I would like to know how to do these mappings in the hand, I...
asked by 05.07.2016 / 15:44
1
answer

Make relationship (0,1) in mysql workbench

I'm doing a project and started by modeling the database was all right up to the point of users that I was confused. Rules: general admin (access to all), admin company (access to all company events) and user (access to only one event). In th...
asked by 02.03.2016 / 13:46
1
answer

Remove objects that are linked to the list of others

I have a problem removing an object. What is causing: I have two tables - > PROCEDURE and SECTOR: I can create normal sectors, save, edit, delete and add procedures to the list of each sector created, until then OK. But my problem is that...
asked by 01.06.2018 / 18:39
2
answers

Relationship of 1 attribute with different tables

Hello, good afternoon. I'm modeling my database (MySQL) and a question has arisen. In the bank, among others, I have the following tables: Officials - Sectors - Branches An Employee works OR in a Headquarters Sector OR in a Branch. I wan...
asked by 18.01.2018 / 19:09
1
answer

Relationship of Tables Laravel

I have a bank with the following relationships:    I'd like to bring the Menu relationship to the Perfil of the user. In tiker I take the following steps: $user = App\Models\User::find(1); $perfil = $user->perfi...
asked by 01.10.2016 / 21:57
1
answer

Model E.R - Correct?

Hello, I will develop a project for my computer technician course and I am having difficulty with an E.R. This is the following, this is the description of the project, but I will ignore the attributes of the entities ok? I will only mention the...
asked by 24.05.2016 / 01:57