Integrating transaction groups with a unique database structure

On a request from a customer, I want to eliminate a bunch of data entry via form into an existing database.
The database structure uses similarly structured tables kept in 6 tables separated based on frequency that is recorded. Ex. Table 1 has 1 minute recorders, Table 2 has 5 minute... 15m, 30m, 1h, 4h.

I believe transactional are the right method to get this moving, but I haven't had a project using them yet and would appreciate advice on how to split things up. I have about 30 tags that I need to log to each of these tables. I've got a test group that accomplishes a single record log well.

Is there a good way to scale this up without making 30 tags * 6 tables = 180 historical transactional groups? Seems like I could make one group for each recording frequency, but am having difficulty imagining how that would work.

Cheers

I would script it. Have a common function that takes a table name, and call it from the six different scheduled events.

2 Likes

That just might be it. The idea was churning in my mind if it would be more effective one way or the other. Running six scheduled scripts feels feels like a more maintainable route anyway.
Doesn't hurt to not need a module as well.

Thanks for the input, Phil. I'll likely go with that.

A slight enhancement would be to script it, set up with just the 5min scheduled event. Within the script, read all of the tag values just once at the top. Unconditionally insert to the 5min table. Compute minute of day, then conditionally insert to the other tables when modulo their period is zero.

1 Like