Tag Info

New answers tagged

1

Probably the simplest solution is to collect the 1/10th second data in cache and write them with the 1 second fact when it arrives. Storing both values at the same time removes the complexity of dealing with summary tables and the related cleanup tasks. A good way to handle the 1/10th value is to add all the samples and divide by the # collected when the 1 ...


3

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 ...


22

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 ...


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 ...


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

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

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


0

For a database design, all one needs is the left, operator, and right. Something like this: X > 10 A table like this: RuleSetID PropertyName Operand TargetValue 1 Weight LessThan 200 Then one can use System.Linq.Expressions namespace to dynamically create expressions for evaluation. For more information on this .Net ...


0

None of the answers so far seems to have picked up on the difference between conceptual and physical data modelling. A UML conceptual model will show inheritance relationships, cardinallity and all that good stuff, with the minimum of implementation detail. The physical model (ER diagram) will differ: Inheritance is no longer obvious. There are three ...


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

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 ...


0

Well, I wound up just going with the simplest option, a trigger that copies the old version of a row to a per-table history log. If I wind up with too much database bloat, I can look at possibly collapsing some of the minor history changes, if needed. The solution wound up being rather messy, since I wanted to generate the trigger functions automatically. ...


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. ...


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

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 ...


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 ...



Top 50 recent answers are included