Tag Info

Hot answers tagged

16

Yes, storing strings instead of numbers can use more space. The reason that high-profile pltforms are doing it anyway is that they think the benefits of that solution are greater than the cost. What are the benefits? You can easily read a database dump and understand what it's about without memorizing the enum tables, and even semi-official GUIs might ...


4

Solve the problem "philosophically" and in code first. And then "negotiate" with code and database to make it happen. As as example, if you're dealing with generic articles, an initial concept for an article might look like this: class Article { public Int32 Id; public String Body; } And at the next most basic level, I want to keep a list of ...


2

Yes, storing things such as yes or true will take more space than a tinyint. This should not be surprising. It also makes indexing and thus joins less efficient for the database. It also has the penalty of possible confusion for what is the correct value (yes vs y). However, there are many approaches that look similar to storing strings in the database (in ...


2

There's a PostgreSQL wiki page for an audit tracking trigger which walks you through how to set up an audit log that will do what you need. It tracks the full original data of a change, as well as the list of new values for updates (for inserts and deletes, there's only one value). If you want to restore an old version, you can grab the copy of the original ...


2

Different modeling languages (Entity-Relation, Unified Modeling Language, and others) are simply notations for communicating a design to stakeholders. Communicating a design is technical communication, and one of the principles of good technical communication is to communicate the information clearly and concisely. Choosing a modeling notation that is ...


1

AFAIK there is no "offical" symbol for this. You can help yourself by adding a free-form commentary, or use UML instead.


1

Is this your basic model, sorry, not sure if I understand your text: Hardware_table(Id, GUID, Description, etc) this holds your primary object one of each Document_info_table(Id, HId, Name, size, mime type) this holds documents related to primary object Using SQL you would have to link Hardware_Table to Document_Info_table by inserting the PK from the ...


1

When I am working on a new feature, I always use ERDs. To me, the data structures are more important than the classes that will be used to interact with them, and it is important to remember that the two are not necessarily identical. At some point in the future, it may become important for me to split a class into multiple classes, or to combine the object ...


1

Assuming that you're already in this situation: Store form config in a DB and reference the version number, rather than serialize it to Json over and over again. Don't use conditionals, just have completely separate html/js pairs and backend end points. You might have to do some internal rewrite if you want to have the forms appear under a single url. ...


1

Several things in your diagram seem to be missing or wrong. Do you really want to constrain employees to work on just one project? Do you want to allow that employees work on a project of another department? If not, you have to add a constraint/invariant prohibiting this. With your current multiplicities for the Employee-manages-Department association you ...


1

I designed and implemented a hierarchy like this many years ago (before generics) so here are some comments. They may help stop you from repeating my mistakes :) The proliferation of methods like parseNumber(), parseName() suggests that the class hierarchy needs adjusment, yet your hierarchy looks well designed. My approach would be a combination of ...


1

Ominus' answer addresses your first question. The answer to the second question may require more details about your application. Another approach with even greater security if the patients must access the database could be to have a separate database for each user. In this approach you might use a framework that provides multi-tenant, multi-database ...



Only top voted, non community-wiki answers of a minimum length are eligible