We are migrating an old application that uses a hierarchical database into a relational web application and trying to find the best way to switch configuration switches (Y / N values).
In our old system, there were 256 different switches (per client), each of which was stored as a bit in one of the 8 32-bit data fields. Each client usually has ~ 100 switches. To read or set the switch, we will use bitwise arithmetic using the value #define. For example:
if (a_switchbank4 & E_SHOW_SALARY_ON_CHECKS) //If true, print salary on check
We discussed which approach to store keys in our new relational (MS-SQL) database:
I'm leaning towards number 1 ... any thoughts?
It depends on several factors, such as:
( ), , . , ( ), / , , .
№2 , , . , , , .
, : . , 7, 45 130, 86 14, , .
, . , , , () , .
# 2, .
# 1 # 2. , , , . . , , - , , .
, , , . , , , . , , , . , , , , , . ( ) . , , , , , . , , , . , , , , .
1, 4 .
4- . .
2. / , . 256 + .
# 2 , -- :
Client S1 S2 S3 S4 S5 ... A X X B X X X
.
Source: https://habr.com/ru/post/1704630/More articles:Django: the uploaded file is locked. Unable to rename - pythonIs a method / variable reference in the external namespace more memory efficient than including it completely? - c #How to prevent "defaults" in redefined WinForm controls? - c #user object with TreeNode in C # - c #nHibernate (w/Castle ActiveRecord) с интерфейсами С# (esp для DTO) - c#Is this blackhat tech technology? - seoSet the reportviwer parameter in the application - .netRemoving an event operation: specifying an available range of listening ports - .netusing nested memory function in javascript - javascriptGet a window handle with a not fully known name. (C #) - c #All Articles