Perhaps the rather unfortunate name “SQLTags” is adding confusion. They have that name because some time ago, they only existed in an external database. Now there are two options, “internal” and “external”. And then there is the idea for history, which can be used for both.
So now, are you asking about history, or realtime? That is, do you want to store the current values of tags externally to a database? This is done with an “external sqltags driving provider”. In this case, the values are stored according to the tags’ scan class, but only if the values have changed. The deadband on the tag can be used to reduce the number of changes. Analog and digitals work the same.
For history, values are also stored according to a scan class, though it doesn’t have to be the same scan class that drives the realtime value (for example, the current value could be updated at a 500ms scan class, but history stored only every 10 seconds). Again, it only stores when the value has changed, but in this case, it’s a little trickier. There is a historical deadband, but it functions differently for tags marked as analog than for digitals. This difference is explained more in depth in the user manual, here.
Hope this helps,