Questions tagged as 'modelo-relacional'

1
answer

LIKE query in related table

I have a query that does the search for TECHNICAL CALLS and in this research I make some JOINS to bring related information. I need LIKE to also work for the CLIENT name (which is in another table) The query I have is this: SELECT *,...
asked by 27.03.2014 / 20:43
1
answer

Creation Related bank

I have a question about whether or not I'm setting up this bank. They could help if the path is right or wrong. For now I just put id in the tables. Class Turma | Turmaid A 1 B 2 C 3 D 4 Municipality Municipio |...
asked by 03.10.2015 / 05:57
1
answer

How to generate a record for each new relationship between two entities

Considering a scenario where a member has a account , personal profile , academic profile status (between pre-defined statuses: teacher, student and collaborator) within the system. For each status , the academic profile is different....
asked by 17.09.2015 / 13:49
2
answers

Model Relational database with SKU

I am creating a system for selling products and I need these products can have different prices according to their size or color, for this I am using SKU, I am creating the relational model of this database and I would like to know if this model...
asked by 10.07.2016 / 23:18
1
answer

Using Single Table Inheritance (STI) in Rails

Assuming a rails project with the Livestock, Agriculture, Fish farming and improvement. Being these inherit the properties of a model called Activity and are considered Activity types. The templates do not accurately inherit specific method...
asked by 05.05.2015 / 18:55
1
answer

Return only one item related to the main table

I have two tables, respostas and respostas_log , where I store information of the answers in answers and some others that have to go logging in replies_log. I need in my SELECT to bring only the last log of each response. Example...
asked by 13.05.2014 / 22:42
1
answer

Relationship of tables with the same attributes

My system is for employee control. Where we have the following types of people (or positions): agent, analyst, supervisor, coordinator and manager. How I did it: I have created a table for each type of these, plus a user table that cont...
asked by 02.09.2017 / 22:30
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
1
answer

Relationship to same entity MER

I am developing my tcc and I came across the following doubt in my MER (Model entity relationship). I have a client entity that pays another client, but just how do I represent it in ER? Type so I'm talking about: CLIENTE (nenhum,muitos)...
asked by 29.06.2016 / 14:36
1
answer

Laravel - List with relation of tables (state / city = person)

I have the following tables: contacts = > id - name - state - city states = > id - status - acronym cities = > id - city - state_id And the following templates: State.php <?php namespace App; use Illuminate...
asked by 03.05.2016 / 01:13