Questions tagged as 'modelo-relacional'

1
answer

What is the foreign key (SQL) [duplicate]

As I've been researching, when it comes to pulling information from two tables in a database, you use JOIN, which has nothing foreign key in it. So what's the use of declaring a field as a foreign key? I see no point. Can someone explain me...
asked by 01.11.2017 / 12:38
1
answer

Database Product table (problem with product size)

Good morning first of all, let's imagine that my products table would have the fields ( product_code , name, gender, price, size), having the size field in this table would involve I would like to create a new table with (cod_product, size) as a...
asked by 12.05.2016 / 10:31
0
answers

What database structure should I use for a process (business rules) that is dynamic?

When we are developing software, we often come across this question: "Is software forged by processes or processes are forged by sofwtare? Or both?" Case Study - Work in a company where business rules are not so well established, or are ve...
asked by 18.08.2016 / 16:40
2
answers

When should an attribute be a table or vice versa?

Example: I have a Orders table, the order has some status, new, delivered, canceled etc. When the status is canceled I will give the user the option to say the reason that was canceled, this reason must be an attribute of the requests table or s...
asked by 13.01.2016 / 02:12
1
answer

Tables with columns always null

Is it wrong to create tables with mutually exclusive columns? For example, I have the tables Texto , Trecho and Linhas , Texto and Trecho has many Linhas , the Linha table is holding the two FKs alwa...
asked by 06.03.2015 / 12:59
2
answers

What is the difference between Associative Entity and Intermediate Table of Relationships N for N?

What is the difference between the Associative Entity and the Intermediate Relationship Table N for N ? Is there any noticeable difference in the translation of the ER template for the relational model ? In the ER model associative enti...
asked by 07.01.2017 / 19:51
1
answer

How to update the pivot in LARAVEL 4 using the UPDATE method?

I have two Models that are linked, through belongsToMany , to a relationship table N: N. So the structure is arranged as follows: classPermissaoextendsEloquent{publicfunctionniveis(){return$this->belongsToMany('Nivel','niveis_perm...
asked by 10.06.2015 / 14:29
1
answer

Modeling Categories and sub-categories

I am modeling an e-commerce related database and am having a question in modeling product category and subcategory tables. At first I created two tables one of Categoria and another of Subcategoria . However, I found a article w...
asked by 20.08.2016 / 18:14
1
answer

Create a conditional using the relational model

I'm trying to create a "conditional" or "just using the relational paradigm: Since the tables pessoa , cliente , funcionario and considering that a person can be a client or be an employee (a 1: 1 ratio, not null), it would...
asked by 13.09.2014 / 03:01
3
answers

Select records from a table where the record of a related table is a specific value

I have a table of technical calls and a table of calls. Each 'CALL' has several 'CALLS' and it is in the calls that the field defines the status of the call (Open, Closed, In Progress, Suspended, etc ...) Currently, when I need to list only op...
asked by 24.03.2014 / 15:42