A
Alex Hart
Guest
If we allow a default first parameter for horizontal partitions set as TENANT/SITE we can set a default value for this parameter, it will then allow us to get similar benefit as vertical partitioning while still being able to use horizontal partitioning. 1. When we have an installation at different sites we can then use the SITE/TENANT parameter to view data at other sites by using the optional SITE/TENANT parameter, or we can create high level reporting where we do the same read of data from multiple sites and merge the data to get a complete view of all sites. FOR EACH _SITE NO-LOCK: FOR EACH CUSTOMER WHERE SITE=_SITE.NAME and..... : END. END. If code is run at a specific site and you only want to read data for that site you just leave out the site parameter allowing the default site to be located (NO CODE CHANGES REQUIRED) FOR EACH CUSTOMER WHERE ..... : END. 2. When major DB Changes occur we can use the SITE parameter to distinguish between legacy data and non legacy data. Allowing us to code in such a way that we can handle Legacy and new systems with minimum issues. We could code for this and just use a standard horizontal partitioning field (parameter) to do this, but if it is a unique parameter/field we can allow for more power easier setting defaults at DB/INSTALLATION level allowing for less chance of programmer errors accidentally creating new SITE/TENANT values. Plus if done correctly would enable all Vertical Partitioning to move over to horizontal partitioning and thus have more options/power than just choosing one or the other Options expressed in this post is my own ramblings 
Continue reading...
Continue reading...