Questions tagged as 'modelo-relacional'

3
answers

Best way to keep data that depends on a condition

I hypothetically have a publicação table that has, by default, the autores attributes (derived from a relationship table), titulo , edição , editora and ano . However, depending on the type of publication (...
asked by 11.07.2015 / 17:38
1
answer

Model "Product" table for multiple types of different products

How to model the Product table of a database? This table should store the following information: id, product name, quantity, price, status (if it is in stock, if it will be returned) and information pertinent to each type of product: food (nat...
asked by 14.07.2015 / 14:11
1
answer

Modeling for user permissions

I think this question is more about modeling analysis actually do not know if it fits into the standard questions discussed by meta.pt.stackoverflow.com . I need to make my system in a way that almost everything will have user permissions, I ma...
asked by 28.03.2014 / 18:23
2
answers

In an MVC structure, can we create a model that represents a View (SQL)?

I was arguing with a friend of mine about using views (say MySQL, not the pattern MVC). A question arose in the following way: A Model serves to represent a data structure, being able to read and write data in a table through it. So, co...
asked by 14.09.2015 / 19:12
2
answers

On-to-one relationship in auxiliary table using Laravel

In the application I'm working the database is built on the users part, as follows: user 1 -------> 1 user_address 1 <-------- 1 address In the user table there is no column that references the address. What exists...
asked by 05.01.2016 / 07:33
2
answers

How to reproduce relationship in Objects?

According to the definition of this site :    CARDINALITY       It is the maximum and minimum number of occurrences of an entity that are   associated with the occurrences of another entity that participates in the   relationship. That is...
asked by 11.03.2016 / 03:17
2
answers

Conceptual Model

I was looking at the conceptual model diagrams, I saw some that contains the Attributes and Entities like this: AndothersthatonlyhavetheEntity: Which model is correct? or are the two of you? Is it necessary to identify attributes in...
asked by 30.04.2016 / 02:42
1
answer

How to map two equal entities with Hibernate

I have a scenario where I have the entities Pedido and Usuário . The Pedido is composed of some attributes, among them the requestor that is mapped as follows: @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "usuario...
asked by 13.12.2016 / 13:20
1
answer

What are the cascade types in JPA?

I'm looking for information on the cascade types that exist and how they work in relational modeling with JPA. The types I found explanations were: NONE = Do not do anything with the object (default) MERGE = Update children when updat...
asked by 28.03.2017 / 22:35
1
answer

Ternary relationship with a foreign key not required

I have a database with three entities that relate: user, process_selective and courses. The goal is to model the bank to meet the following requirements: User can subscribe to multiple selective processes Each selection process may or may...
asked by 09.08.2014 / 02:54