Questions tagged as 'modelagem'

3
answers

Number of characters of CPF, CNPJ and RG

I am doing a program that needs to validate a series of documents - CPF, CNPJ and, if possible, RG. My questions are as follows: Are there valid CNPJs with a number of characters less than 14? (eg, old companies). Common format: xx.xxx....
asked by 04.04.2016 / 23:21
2
answers

Is it really necessary to create a 3rd auxiliary table in N-N relationships?

In several places I see that when you have a N - N relationship (if memory does not crash) it is recommended to create a 3rd helper table and then later it will be transformed into a 1 - 1 relationship ( also if memory does not fai...
asked by 17.07.2017 / 16:44
3
answers

What are the appropriate data types for columns like address, email, phone, and mobile for SQL database?

What kind of data is recommended to create the following fields: address, email, cell / phone number?     
asked by 04.02.2014 / 20:13
2
answers

What is the real concept and utility of POCO classes?

I am studying and developing a new project and a little studying about Windows Phone 7.1, I saw that they suggest / indicate the use of POCO classes, for database mapping (It seems to me that Windows Phone 7.1 uses some compact version of EF (...
asked by 17.09.2014 / 20:33
3
answers

Store values representing a user's 'sex' in databases

I have some doubts about the representation of some fields in the database. How do I store fields as "sex" in tables in the database? In the literal form "masculine" and "feminine" or through numbers that represent each sex as "1" and "2", respe...
asked by 08.04.2015 / 14:04
2
answers

BIT (1) versus TINYINT (1) for Boolean values

I may be wrong, but I get the impression that, in practice, the default in MySQL is to use columns of type TINYINT(1) to store boolean values, true / false or 0 / 1 . Only TINYINT accommodates up to 1 byt...
asked by 18.01.2016 / 13:33
3
answers

Initialize private fields in declaration or constructor?

I'm modeling a class that has a private list and an internal dependency to another object: public class Teste { private IList<string> Textos; private Teste2 Teste2; } I can initialize them in the declaration: private IList&l...
asked by 14.04.2017 / 02:59
2
answers

Techniques for raising requirements and writing use cases

Some time ago I saw a Lynda.com course called "Foundations of Programming: Object Oriented Design" and the course guy gave a list of 5 steps to create a domain model: Collect requirements Describe the system (with use cases) Identify the...
asked by 30.01.2014 / 13:38
2
answers

Have images in the tables where they will be used or table with repository of images?

Is it a good practice to create a table to record all the images in a database, or can I create the columns that save the image information for each specific need? For example, let's suppose I want to create a table for categories of a websit...
asked by 25.10.2015 / 16:04
3
answers

How to avoid the use of setters in such cases?

In general object orientation it is advisable to avoid the use of setters. The usual justification for this is that logic that modifies the state of an object must be encapsulated in the object. Therefore, the ideal is the object to expose behav...
asked by 28.07.2016 / 05:43