Most voted "modeling" questions
Modeling means creating a model that explains the working and behavior characteristics of a software from which it will be created, facilitating its understanding and its design, through the main features that will avoid programming errors, design and operation.
Learn more…321 questions
Sort by count of
-
127
votes4
answers42803
viewsWhat really is DDD and when does it apply?
When I first studied MVC in the book I talked a lot about DDD (Domain-Driven Design). From what I understood at the time, the idea of the DDD was simply to program software with a focus on…
-
65
votes6
answers66144
viewsType of the CPF or CNPJ field in the VARCHAR or INT database?
What type of CPF or CNPJ field in the database VARCHAR or INT? I’ve seen some posts suggesting using INT to optimize performance in the event of JOINand filters. If you have 0 the left is only…
-
48
votes6
answers7903
viewsWhen should we allow a column of a table from a database to accept NULL?
This is a conceptual question that always creates confusion when deciding whether or not a column should accept NULL. There’s a current that considers the use of NULL to be an error and that an…
-
45
votes7
answers2227
viewsAgile methodologies - a single programmer
I have heard a lot about agile methodologies and I really liked the idea. Of course, from what I saw, the client needs to cooperate, but it seems to me that for own projects (that is, whose idea is…
-
42
votes3
answers6498
viewsHow to model a tree data structure using a relational database?
How to appropriately and efficiently define naturally organized tree-based data in relational databases, considering the physical implications of this? That is, organize in a way that minimizes the…
-
37
votes4
answers13910
viewsWhat is the best way to represent an Address?
When modeling addresses in an application, naively followed the standard form when representing in the BD (i.e. separate tables for country, state, city, neighborhood etc. - joins everywhere), and…
-
37
votes7
answers2649
viewsShould people’s names be stored in two or just one column?
In business systems, especially international Erps or even in websites we see that the register asks for the last name (last name) and the name (first name). In some cases there is even the middle…
-
34
votes3
answers8960
viewsWhen is it interesting to denormalize the database?
Is there any situation where having the database denormalized is more interesting than having it normalized? For example Normalized Pessoas Cidades | nome | cidade_id | | id | nome |…
-
33
votes4
answers2243
viewsAlternative to CPF (Foreign Users)
I have a site where we control users by number of CPF, I believe it is the best way because it is a given single, that everyone knows and is checavel. However the client now has foreign users who do…
-
28
votes2
answers7111
viewsWhat to do if client can be both PF and PJ?
I’m developing an object-oriented system. I need to keep a customer record. It turns out that these clients can be both natural and legal persons. If clients were just legal persons it would be…
-
27
votes3
answers11642
viewsWhat is the definition of the term coupling?
What is the meaning of the terms high/low coupling in object-oriented systems development or object-oriented programming (POO)?
-
27
votes3
answers128363
viewsNumber of characters of CPF, CNPJ and RG
I’m doing a program that needs to validate a number of documents - CPF, CNPJ and, if possible, RG. My questions are as follows:: Are there valid Cnpjs with fewer than 14 characters? (ex: old…
-
24
votes1
answer678
viewsWhat is data-driven design?
I came across the term data-oriented design, I saw some things and I was a little surprised because what I could see on top is different than what I could imagine, since these terms usually refer to…
terminology performance modeling encoding-style paradigmsasked 7 years, 3 months ago Maniero 444,682 -
23
votes2
answers4023
viewsCan it be considered a bad modeling practice to store all people (customers, employees, suppliers) in the same table?
I am trying to design a database for a small project but I am having difficulties regarding the normalization of the tables of persons (physical and legal): Client Supplier Professional I thought…
-
18
votes3
answers437
viewsDatabase should follow the OO standard?
Object Orientation According to the Rules of Pure O, we have: "The Object must manipulate methods and attributes belonging only to it" That is, what does not strictly belong to class should be an…
-
18
votes4
answers607
viewsObject orientation - How to find the right abstractions?
Actually the question I’m trying to ask is exactly that: How to identify classes in an object-oriented system?. However, I would like to ask for two additions to the accepted answer. She seems to…
-
17
votes1
answer655
viewsAlternatives to the (anti-)standard Entity-Attribute-Value
I am working on two systems that have a common feature: entities whose attributes are dynamic (i.e. cannot be "plastered" - hardcoded), need to be consulted in search operations (result filter), but…
-
16
votes2
answers256
viewsHow to solve special situations of unnatural value for a domain?
The question has a slightly more conceptual bias, so I’m going to use a simple generic example. There are cases where some column may be in a special situation, this because an information: is not…
-
16
votes2
answers673
viewsWhen and in which columns should indexes be used?
Reading an article that has nothing to do with database I came across information that use of indexes can bring great improvements to database performance. I have two questions about that: When…
-
15
votes3
answers70810
viewsWhat are the appropriate data types for columns like address, email, phone and mobile phone for SQL database?
What kind of data are recommended to create the following fields: address, email, mobile number/phone?
-
15
votes3
answers22703
viewsWhen is the use of composite primary key recommended?
A key simple is associated with a single value, or field, of the record. A key composed corresponds to the combination of two or more keys, and may be required to eliminate ambiguity by forming a…
-
15
votes1
answer605
viewsQuestions about analysis and structured and object-oriented design
Software process, involves various activities, among them, analysis and design. Among the options of methods to perform these activities, we have the structured and object-oriented. Regarding both,…
oop modeling software-engineering encoding-style structured-programmingasked 5 years, 8 months ago renanvm 3,797 -
14
votes1
answer1047
viewsWhat is the cardinality between a request and the services included in it?
I have the class Solicitacao and the class Servicos. After insertion in the database I intend to recover in a query all the services associated with that request. For example, on a screen I insert…
-
14
votes6
answers1655
viewsHeritage and Polymorphism
I have the class Funcionario. private String nome; private int idade; public function vender (Funcionario f) { ... } I have the subclasses Gerente and Professor that inherit (extend) from…
-
13
votes1
answer8955
viewsInheritance in relational database
one of the great challenges in developing object-oriented software is to abstract the data from its base to power-like objects better manipulate them, today the available ORM frameworks make this…
-
12
votes3
answers2560
viewsDatabase redundancies are always undesirable?
I am developing a system that keeps a record of all financial transactions occurring in a bank account (simple matches). There is a redundancy in my data model: a table saldo_conta keeps a list of…
-
12
votes4
answers1580
viewsIs this a common practice in object orientation?
In object orientation, one way to ensure encapsulation is to maintain the attributes of the private classes and modify their state via methods. In addition, to ensure the integrity of objects, it is…
-
11
votes2
answers3018
viewsIs it really necessary to create an auxiliary 3rd table in N-N relationships?
In several places I see that when you have a relationship N-N (if I remember correctly) it is recommended to create a 3rd auxiliary table and then later it will be transformed into a relationship 1…
-
11
votes1
answer18212
viewsWhat are the types of Scade in JPA?
I’m looking for information on the types of Scade that exist and how they work in JPA relational modeling. The guys I found explanations for were: NONE = Does nothing with the object (default) MERGE…
-
10
votes2
answers1623
viewsWhat is the real concept and usefulness of POCO classes?
I am studying and developing a new project and the little studying on Windows Phone 7.1, I saw that they suggest/ indicate the use of classes POCO, for database mapping (It seems to me that Windows…
-
10
votes3
answers3406
viewsStoring representative values of a user’s 'sex' in databases
I have some doubts about the representation of some fields in the database. How should I store fields such as "sex" in tables in the database? In the literal form "male" and "female" or through…
-
10
votes2
answers5991
viewsBIT(1) versus TINYINT(1) for boolean values
I may be wrong, but I have the impression that in practice the default in Mysql is to use columns of the type TINYINT(1) to store boolean values, true/false or 0/1. Only that TINYINT accommodates up…
-
10
votes3
answers271
viewsHow to avoid the use of setters in such cases?
In object orientation it is recommended to avoid the use of setters. The usual justification for this is that the logic that modifies the state of an object must be encapsulated in the object.…
-
9
votes2
answers2765
viewsWhat is the concept and how to implement an Anemic Domain Model?
I would like to resolve the following doubts about the Anemic Model: What is the The Anemic Domain Model? What are the differences of implementation of that model compared to Object-Oriented Model?…
-
9
votes2
answers253
viewsWhy is it good practice to generate unique user code?
Many enterprise systems use a customized unique identifier. You have the generation of id in the database and a custom code. When a customer search is done, the custom code (something like ZT2578B)…
-
8
votes2
answers1301
viewsTechniques for setting requirements and writing use cases
A while ago I saw a Lynda.com course called "Foundations of Programming: Object Oriented Design" and the course guy gave a 5-step list to create a domain template: Collect requirements Describe the…
-
8
votes1
answer564
viewsCardinality of the index does not update
I am creating a program that connects to a Mysql database online, and when starting it it creates a table with an index if it does not exist. To check if everything is ok I am analyzing the database…
-
8
votes3
answers241
viewsBest way to keep data that depends on a condition
Hypothetically I have a table publicação that has, by default, attributes autores (derives from a relationship table),titulo, edição, editora and ano. However, depending on the type of publication…
-
8
votes3
answers1491
viewsIs it good practice to use composite keys as the primary key?
I don’t have much knowledge in database structuring. I have been trying to improve myself and I am seeking best practices on how to create and structure tables. Currently I usually create link…
-
8
votes2
answers184
viewsHave images in the tables where they will be used or table with image repository?
It is good practice to create a table to record all images from a database, or I can create columns that save image information for each specific need? For example, let’s assume that I want to…
-
8
votes3
answers722
viewsInitialize private fields in the declaration or constructor?
I’m modeling a class that has a private list and an internal dependency on another object: public class Teste { private IList<string> Textos; private Teste2 Teste2; } I can initiate them in…
-
8
votes3
answers370
viewsPrivate set of property in an interface
I’m modeling a C# interface that has a property. However, I want to ensure that all classes that implement this interface maintain the Setter as private: public interface IBar { string Id { get;…
-
8
votes2
answers1800
viewsIn which table is the foreign key in a ratio 1 to 1?
In an SQL relationship of two tables 1 to 1, there is some rule that defines which table the foreign key will be in?
-
8
votes3
answers948
viewsWhat makes a JOIN bad in a database?
Where I currently work I had to make some queries in the database to generate a report or take emails from students who did not do remakes in other courses. However, I was given the idea of making…
-
8
votes2
answers430
viewsDeadlock at Conceptual Design Level, Entity-Relationship Modeling (MER)
At conceptual design level we can use the approach (relationship entity modeling (MER)) to describe the behavior of future tables that will appear in the logical project. Within that context a doubt…
-
8
votes3
answers149
viewsWhat is data modeling (data Modeling)?
What is data modeling (data Modeling)? In what context is it used? At what time of development it should begin to be done? Does it relate to object orientation? One opposes or complements the other?…
-
8
votes3
answers650
viewsWhat is the best way to build a Mysql table with recipe items? All ingredients in one row or one ingredient per row?
I’m used to creating websites with few database records, so I don’t care about the speed of query and I have no experience with large volumes of information. But now I am creating a website recipes,…
-
7
votes1
answer1281
viewsGood Practice when modularizing an application with EF and multi-bank
Let’s say I want to model an application on .NET using the EntityFramework as ORM and use one of its advantages, to be "generic" for several RDBMS. So, for example, I want my application to agree to…
-
7
votes2
answers1014
viewsSetting up a database, how do I make this relationship?
I’m assembling the EER diagram of an ERP. Almost all tables have a column called "id_company" that relates to the "Companies" table. This is because the user will be able to manage one or more…
-
7
votes2
answers344
viewsSplit column into multiple tables
I want to save a set of information about movies in a database but I have a question, I must organize the genres in column (example below). Database: Mysql 5.6.21 Engine: innoDB or organize gender…