Questions tagged as 'modelagem'

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

Cardinality Class Diagram

When I make a Class Diagram or MER, the cardinality must be defined. As an example: A doctor consults from 0 to n patients; a patient is consulted by 0 or 1 physician. Why 0?     
asked by 24.09.2015 / 23:05
1
answer

How to model product categories?

I'm about to start developing an e-commerce, but I'm caught up in the issue of modeling, especially in product categories and subcategories. For example. A category can have several sub-categories. Each sub-category may also have sub-sub-categor...
asked by 18.09.2014 / 18:53
1
answer

PostgreSQL - Partial Foreign Key of Composite Primary Key

Talk to people, I need to create a structure template in which all my tables have a primary key consisting of id and version, so I can have multiple versions for each id. Problem: CREATE TABLE table1 { id BIGSERIAL,...
asked by 30.08.2018 / 15:04
1
answer

Model Entity Relationship: Ternario vs Agregação?

Assuming I have a ternary relationship: two entities are NxN and the third entity is weak in relation to the relationship between these two. I would like to know the difference between creating an aggregation between the two NxN entities and...
asked by 15.10.2015 / 03:46
1
answer

Best way to design Classes from the database?

What is the best way to design Classes from the Database schema below: Usuario(id INTEGER PK, desc TEXT); Amigo(idA INTEGER, idB INTEGER, PK(idA,idB), FK(idA) REFERENCES Usuario(id)); This means that a user has 0 or more friends, when desig...
asked by 27.03.2015 / 23:22
0
answers

Example of Scheme respecting 3FN? [closed]

While studying 3FN, I came across 2 interesting examples and wondered if by making a small change, the examples would continue to serve 3FN. Explanation about the 3FN concept Explaining the Context Below is an illustration presented b...
asked by 03.11.2017 / 00:19
2
answers

Database modeling problem

I have created a system that has sales control ( id , id_vendedor , produto ), vendor ( id , nome , id_equipe ) and team id , nome ) in a company. Example: "João has id: 1 and belongs to the tea...
asked by 15.01.2015 / 03:51
2
answers

"Inheritance" table is bad practice in this case?

In my database, I need to store employees, customers, and suppliers. Since all of these share data in common, but are not all data, I have decided to create a pessoas table with the columns in common: id // chave primária tipo // tipo F...
asked by 20.10.2017 / 16:05
2
answers

Store data that can be queried outside the database itself, goes against the 1st Normal Form?

For example, I have an invoice, which I can check in another database (but not mine), an example would be PagSeguro. I only store the invoice ID number so I can check it. There is no doubt that storing this data that can be queried would con...
asked by 06.01.2017 / 13:40