Hospitality Business Data Intelligence – Technology specifics, Tools and Methods for Yield and Revenue Management.

One of the key directions for digital transformation applied in various industries including travel is Data Analytics. Hospitality is not an exceptional sector nowadays. Typically, the nature of the hotel industry is to generate and operate voluminous data. From inventory to distribution channels, housekeeping records to customer behavior data. There is so much to manage and maintain. Furthermore, as the business grows, these tasks become cumbersome in terms of doing analysis and it is hard to track everything by using several spreadsheets.

Here comes the unprecedented innovation existing in the world of digital transformation of the hospitality sector. Business data intelligence exists to solve the problems of data capturing and its analysis. It is a range of tools designed to collect data from multiple sources and transform the raw information into the meaningful form of numbers, analysis, reports, and much more.

The article today is about some of the key specific components that can be applied using Business data intelligence in the hotel industry. We shall find out various ways in which we can yield the productivity of the hotel business by harnessing the power of AI and business data analytic tools.

Business Intelligence in Hotels: Data sources and Components

The critical components of all the BI systems and the data sources are discussed below and can be used across all the hotels. A business data intelligence system extracts the data from various sources, transforms it, and collects it in a common repository. The repository is queried to present data that is meaningful in form of charts and diagrams for human interpretation.

The data source of a hotel can be internal or external and contains valuable data about your business, customer information, metrics, etc. Companies generally use Property Management System and its modules like Revenue management system and channel management as the key data source for hospitality business.

The above diagram is the PMS structure with various modules. Each module serve as a data source even if it is website analytics, housekeeping, or supply management system. Across the entire industry, there are various types of PMS structures that can be found. Some hospitality businesses need a separate module for yield management and some do not. Different hotels store a different number of components and data. This determines the general data structure that is adopted inside any organization.

The hotel business involves an ample number of activities and hence the data structure differs from hotel to hotel. Regarding business data intelligence, there are various challenges in establishing the right data for analysis. Let us find out more about how we can manage the entire data with great productivity and efficiency.

Building Modern Data Analytics Platform on AWS

AWS delivers an integrated suite of services that provide everything needed to quickly and easily build and manage a data lake for analytics. AWS-powered data lakes can handle the scale, agility, and flexibility required to combine different data and analytics approaches to gain deeper insights, in ways that traditional data silos and data warehouses cannot.

What is Data Lakes?

To build your data lakes and analytics solution, AWS provides the most comprehensive set of services to move, store, and analyze your data.

Data Movement: Extracting data from different sources like (SFTP, FTP, AWS S3 Bucket, Dropbox, Google Drive, or On-Premise HDD) and different types of data structures like (XML, CSV, PDF, DOC, EXCEL, JSON, or TEXT).

The first step to building data lakes on AWS is to move data to the cloud. The physical limitations of bandwidth and transfer speeds restrict the ability to move data without major disruption, high costs, and time. To make data transfer easy and flexible, AWS provides the widest range of options to transfer data to the cloud. To build ETL jobs and ML Transforms for your data lake via SSIS or AWS Glue Services.

Once data is ready for the cloud, AWS makes it easy to store data in any format, securely, and at a massive scale with Amazon S3, AWS Redshift, or Amazon Glacier. To make it easy for end-users to discover the relevant data to use in their analysis, AWS Glue automatically creates a single catalog that is searchable, and iqueryable by users.

Analytics:

Analyze your data with the broadest selection of analytics services or algorithms. With AWS you get the broadest and most cost-effective set of analytic services running on a data lake. Each analytic service is built with the purpose for a wide range of analytics use cases such as warehousing, real-time analytics, and much more.

Machine Learning: Predict the Future outcomes and provide rapid response.

For predictive analytics use cases, AWS provides a broad set of machine learning services, and tools that run on your data lake on AWS. For machine learning, it is recommended to use the below AWS services

  • Deep learning AMIs for Frameworks and Interfaces
  • Sagemaker for Platform Services

Hotel Industry Revenue Management System With Combined Power of AI and Data Science

These new-age arrangements additionally take care of a few problems faced during legacy RM systems such as real-time data processing, accuracy, autonomy, and integrity.

It’s significant for hotels to find data about travelers. So, they can customize the experience to meet the specific needs of the individual. Artificial intelligence can be an important instrument in this. Eventually, the challenge of gathering and investigating information will be rearranged by innovation that is sufficiently brilliant to settle on key decisions about guests’ behavior and characteristics.

With the power of AI and data analytics, you can perform an excellent hotel revenue management system. Flooded with the list of duties, the hotel management system should be collaborated with all hotel departments, in particular, marketing and sales. The core focus of an advantage of the system incorporates stock management, marketing, forecasting, pricing, and distribution channel management. Moreover, an AI-powered revenue management system can help with tasks like data analysis and, with data gathering, the RM can adequately learn and adjust to client interactions.

Applying Yield in Hospitality Industry

Yield Management allows you to select the optimal rate with the highest probability of selling based on the arrival date, length of stay and Type of Room guest was selected.

With the Yield Management, you can distribute the best available rate and other controls to various distribution channels (like Corporates or Tour agent) eliminating the need to manually enter the data. With the Yield Management Group Pricing strategy you have the option to determine the group’s entire value which factors in rooms, costs and commissions, conferencing and banqueting, ancillary spend and profits as well as the value of any business being displaced before you book.

The Yield Management provides hoteliers with an easy method to assess your hotel’s performance on a daily, weekly, monthly, and annual basis against your financial goals. More or less Yield Management provides a clear view to the information most important to you, and monthly graphical views of Estimated Room Revenue, Occupancy, Revenue per Available Room per Revenue and Average Daily Rate along with Alerts, Special Events and My Links are delivered in an easily navigated way.

Process includes following 5 stages:

  • Data Collection
    Historical Row data collection
    Gathering already processed data
    Live data
    Factors and Attribute definition by Manager
  • Organizing the Data
  • Classification of Data
  • Presentation
    Diagrams
    Graphs
  • Analysis & Interpretation

The yield management is appropriate under one or more of the following scenarios, during conditions of fixed capacity (number of rooms), when the inventory is perishable (consumable – sold the rooms for every day), when the consuming market can be subdivided into demand segments, when peaks and low exists in the demand curve, and when advanced selling occurs (reserving the rooms in future).

Performance Driven Via Multi Tenant Database Architecture

Cloud computing has enabled businesses to infinitely scale services based on demand while reducing the total cost of ownership. Software as a ser-vice (SaaS) vendors capitalized on the scalable nature of Infrastructure as a Service (IaaS) to deploy applications without having the need for heavy upfront capital investment.

While you create a multi-tenant SaaS application for your hospitality platform, you must be careful during choosing the tenancy model that fits the best as per the needs of your application. A tenancy model determines how each tenant’s data is mapped to storage. There are various tenancy models such as single-tenancy, multi-tenancy, and hybrid tenancy models.

Below are the enumerated ways of choosing an appropriate tenancy model so that you can understand and decide upon which models suit best for your business.

Scalability:

  • Number of tenants.
  • Storage per-tenant.
  • Storage in aggregate.
  • Workload.

Tenant isolation:

  • Data isolation and performance (whether one tenant’s workload impacts others).

Per-tenant cost:

  • Database costs

Development complexity:

  • Changes to schema.
  • Changes to queries (required by the pattern).

Operational complexity:

  • Monitoring and managing performance.
  • Schema management.
  • Restoring a tenant.
  • Disaster recovery.

Customizability:

  • Ease of supporting schema customizations that are either tenant-specific or tenant class-specific.

Multi-tenant app with database-per-tenant

This next pattern uses a multi-tenant application with many databases, all being single-tenant databases. A new database is provisioned for each new tenant. The application tier is scaled up vertically by adding more resources per node. Or the app is scaled out horizontally by adding more nodes. The scaling is based on workload, and is independent of the number or scale of the individual databases.

Multi-tenant app with multi-tenant databases

Another available pattern is to store many tenants in a multi-tenant database. The application instance can have any number of multi-tenant databases. The schema of a multi-tenant database must have one or more tenant identifier columns so that the data from any given tenant can be selectively retrieved. Further, the schema might require a few tables or columns that are used by only a subset of tenants. However, static code and reference data is stored only once and is shared by all tenants.

Lower cost

In general, multi-tenant databases have the lowest per-tenant cost. Resource costs for a single database are lower than for an equivalently sized elastic pool. In addition, for scenarios where tenants need only limited storage, potentially millions of tenants could be stored in a single database. No elastic pool can contain millions of databases. However, a solution containing 1000 databases per pool, with 1000 pools, could reach the scale of millions at the risk of becoming unwieldy to manage.

Hybrid shared multi-tenant database model

In the hybrid model, all databases have the tenant identifier in their schema. The databases are all capable of storing more than one tenant, and the databases can be shared. So in the schema sense, they are all multi-tenant databases. Yet in practice some of these databases contain only one tenant. Regardless, the quantity of tenants stored in a given database has no effect on the database schema

In this hybrid model, the single-tenant databases for subscriber tenants can be placed in resource pools to reduce database costs per tenant. This is also done in the database-per-tenant model.

Data Intelligence Through Serverless Application

You should especially consider using a serverless provider if you have a small hotel running business that you need hosted. However, if your application is more complex, a serverless architecture can still be beneficial, but you will need to architect your application very differently. This may not be feasible if you have an existing application. It may make more sense to migrate small pieces of the application into serverless functions over time.

A massively simplified view off the serverless architecture can be as below:

  • The authentication logic is deleted in the original application and is replaced with a third-party BaaS service (e.g., Auth0.)

  • Using another example of BaaS, the client is allowed to direct access to a subset of the database (for product listings), which itself is fully hosted by a third party (e.g., Google Firebase.) A different security profile is created for the client accessing the database in this way than for server resources that access the database.

  • These previous two points imply a very important third: some logic that was in the Pet Store server is now within the client—e.g., keeping track of a user session, understanding the UX structure of the application, reading from a database and translating that into a usable view, etc. The client is well on its way to becoming a single page application.

  • If we choose to use AWS Lambda as our FaaS platform we can port the search code from the original Pet Store server to the new Pet Store Search function without a complete rewrite, since Lambda supports Java and Javascript—our original implementation languages.

  • Finally, “purchase” functionality can be replaced with another separate FaaS function, choosing to keep it on the server side for security reasons, rather than reimplement it in the client. It too is fronted by an API gateway. Breaking up different logical requirements into separately deployed components is a very common approach when using FaaS.

Invest Your Resources in Business Data Intelligence

To survive in this highly competitive environment, hotels are on a verge to snatch opportunities available for performance optimization. The data on its own can never make sense to the business. You must know how to use the data in a creative way.

With business data intelligence tools and techniques as elaborated above, you can reduce a lot of manual labor by way of gathering the smallest nuggets of information. Getting a broader view of what all is going on, we can foretell several things, start from our own expenses on supplies and electricity, view annual yields and so much more. Shift your hotel business operations today with a data-driven approach to practice a viable decision making process.

Softqube Technologies Pvt Ltd Recognized as one of the Best IT Services Companies by Clutch

Softqube Technologies Pvt Ltd is very excited to share that we have been recently named as one of the best IT and Software solutions & services companies in India. We are happy to share this amazing achievement with all of you!

clutchs-2022-research-list

We are excited to be featured on Clutch’s 2022 research list of incredible B2B companies in India. This is such a huge milestone for our company! We couldn’t have asked for a better way to start 2022.

For those that don’t know, Clutch is an established platform in the heart of Washington, DC, committed to helping small, mid-market, and enterprise businesses identify and connect with the service providers they need to achieve their goals.

Our team would like to extend its appreciation to Clutch and their team for making this award possible. We would also like to thank our clients for choosing us as their IT partner. Your business has played a major role in our success. Without the support and confidence of our customers, this feet would not have been possible. . To that, we want to say thank you from the bottom of our hearts.

On officially receiving this award, here’s what our CEO Nitin Suvagia has to say:

“More than the award, this recognition means a lot to our team at Softqube. This award is another success milestone in the journey of our company. We would like to thank our customers and team mates for their valuable contribution. We further resolve and commit ourselves, more than ever, to work in the direction of empowering our customers with the right technology tool to support their businesses. ” – By NITIN SUVAGIYA

Horizontal Scalability With MySQL

MySQL is a highly reputable technology serving the modern big data ecosystem. At present, it caters to diversified groups of industries that are involved with enterprise data and IT. MySQL is a relational database management system (RDBMS) developed by Oracle and is based on structure query language (SQL).

Challenges with horizontal scalability

When the size of the data increases, more CPU, memory and IO is needed for your queries to run. The performance of the queries decrease exponentially. In order for your queries to execute quickly, usually one has to add more hardware resources to pump up the database. Unlike application servers, the databases cannot be truly scaled horizontally.

MySQL provides upto 5 read replicas, which helps you scale MySQL horizontally. Which means there’s one write instance and upto 5 read replicas. In order to implement this, the application has to be aware of which instance to hit.

For e.g. we have 1 write instance called MyServerWrite, and 5 read replicas called MyServerRead1, MyServerRead2, MyServerRead3, MyServerRead4 and MyServerRead5. This means all the 6 instances will have different endpoints. So from the application side, the application needs to be aware which endpoint to hit.

This means the application server will have to load balance on it’s own. The following are the limitations

  1. Identify the type of query, if it’s a write query direct it to MyServerWrite instance
  2. If the query is read operation, redirect to any of the 5 read replicas
  3. The application can hit the read replicas in a round robin fashion. The first query goes to MyServerRead1, the second to MyServerRead2 and so on.

AWS Aurora MySQL is an extension to what MySQL Community edition offers, but it still lacks true horizontal scalability. Aurora RDS, provides upto 15 read replicas, it’s own set of limitations. A good thing about Aurora RDS is that, for the read replicas, we can define one single custom endpoint, so MyServerRead1, MyServerRead2 ….. MyServerRead15 can have a custom endpoint myendpont.xxxxxxx.com. Aurora RDS will internally choose which read replica to point to. Another advantage is the ability to auto scale in terms of read replicas. So one can choose upto 15 read replicas in the auto scaling option.

As far as limitations are concerned, with Aurora MySQL, the application has to be aware of read and write queries and direct it accordingly, else if a write operation is directed to the read instance else the query will fail.

To conclude, this is not the type of true horizontal scaling as available with NoSQL databases.

Vitess.io

Vitess.io is the solution to horizontal scaling of MySQL databases. This was originally built to implement database clustering of MySQL instances which is used by youtube. It provides additional benefits like Scalability, performance, connection pooling, shard management etc.
Horizontal scaling through Vitess framework can be achieved in the following way

  1. Localling installing the vitess framework
  2. Using kubernates

challenges-with-horizontal-scalability

PlanetScale.com provides managed MySQL instances built on the vitess framework on Database as a service model(DaaS). It has amazing features, where you can deploy database changes as a code and is fully DevOps compatible. They have a CLI which can make things faster. With data sharding, we don’t need to worry about growing database size.

compelete-data-set

Conclusion

Although MySQL and Amazon Aurora RDS have read replicas which “sort” of serves the purpose of horizontal scaling, it’s not a true horizontal scaling solution. Vitess framework on the other hand solves the purpose.

Frame-252-1

Thinking of Scaling MySQL, Say goodbye to stored procedures

Stored Procedure is a unique code in SQL that can be stored for later use. Also, the same code can be used several times. Whenever you need to execute a query, you can call the stored procedure. Moreover, you can pass parameters to a stored procedure to make them act based on the parameter values that are passed.

Challenges with stored procedures

Database servers are the bottleneck for most of the enterprise level applications. With time, data increases and the load on the server increases as well. If no archiving process is in place, the data will keep on growing over years, and the performance of the database will deteriorate. The database server is already doing a lot of work by performing read and write operations. Adding more work in the form of complex business logic written under stored procedures narrows the database server bottleneck.

One of the biggest disadvantages of having your business logic in stored procedures is on the horizontal scalability side. Imagine we have a web application which makes a very complex calculation, and you have the entire logic written in a stored procedure. The calculation involves churning and manipulating the data on the fly and is a CPU and memory intensive task. Further imagine 100 users initiating this calculation at the same time. When running it through a stored procedure, it is very likely to consume lots of CPU and memory. If the resources are not sufficient, you would see a 100% CPU spike and the database would not be in a position to take or serve any more requests.

In this very same example, you will see the database server being the bottleneck and doing almost all the work, and the application servers having advanced features like auto-scaling, just sitting idle and not doing anything.

Often, we increase the capacity of the database server, but this is an expensive solution and not a long term one. Something that is away from horizontal scalability.

Moving complex logic to application layer

A one line solution to the above problem is to move the logic from stored procedures to application layer, and use the database only for simple SELECT, UPDATE and INSERT. Doing so will result in immense benefits.

In this case, where the application server is on auto scaling mode, and the number of requests increase, the application server will have more instances available, and each and every instance will utilize its resources to the fullest. Here, the application server is busy doing complex calculations, the database server is busy supplying the data to the application servers. Everyone’s equally busy. As demand increases, more applications servers will be available to do the job.

This way true horizontal scalability can be achieved.

application-auto-scalingBatch processing

For batch processing as well, we can leverage the idea of moving away from stored procedures. Considering the batch processing would be a very resource intensive task, moving the logic to the application layer has its benefits.

Other cons of stored procedures

  1. Stored procedures are hard to test
  2. Source control is extremely difficult
  3. Moving to different versions of the database would require through retesting, as some functions become deprecated.
  4. For many developers, SQL is barely a programing language
  5. Even if we consider it as language, it’s far inferior to the likes of JAVA, .NET to name a few(using ORMs)
  6. Passing objects is not possible
  7. Versioning is difficult
  8. Anyone can modify it on the server

Conclusion

Moving the logic away from the stored procedures has a lot more advantages. This also gives us an option to migrate to a different database if required or desired. With stored procedures, you are married to one database technology, as MySQL stored procedures don’t work on MSSQL and so on.

I think writing stored procedures is a good idea when dealing with some ad-hoc requests. Let’s say your client wants to have some report on an ad-hoc basis for some analysis and doesn’t know SQL. In such cases, stored procedures are an easy way to accomplish the task.

Frame-252-1

Select Perfect Database as per the Job

A unique database that fits all the needs is required by every organization for which data management is of prime importance. A single application that performs all the tasks including handling transactions, operations, warehousing, reporting and analytics is a dream of all organizations.

But this is not possible in the real world as we need to use different applications for different tasks. When it comes to database space then Oracle and DB2 are the well known transaction leaders. Later it was known that these databases were unable to provide reporting. So, they came with such databases that actually performed this task.Further these databases were unable to put the required effort for the required performance and there arose a need to add summary tables, temporary data stores and other things. Some different attributes are to be created. These different attempts to transform the technology and make it suitable for the needs have given rise to various factors such as:

  • Current databases are typed to hardware platforms- a very useful solution for hardware vendors.
  • Memory Solutions- If we go on increasing the disk space then how can in memory help to solve the problems as it costs more but is unable to attend more volume.
  • Reporting tools- Is another memory solution but is transferred to the application side server that has lead to restrictions on various sensitive points.

Unique DatabaseWe can say different data is created at different times and there are times when most of the times the data is unequal or inconsistent. Further, different departments may also provide different data and managing these various data becomes a challenging task for organizations at times. Data is transferred through a complete cycle and it possesses a great value to the enterprise and selecting the best tool that maintains its value is of prime importance.Organize Huge DatabasesSo, now we can say that horizontal or row based databases can be used as transaction stores for operations, unorganized or half organized data which needs search style access, vertical stores for data analysis or a separate hard disk or device with more space that is used to drive business intelligence. And some of the highly abridged data storage devices are using for storing big data logs, front end that offers the reporting capabilities.

So, here we can see different data types need different databases. Some may be compressed, some may be row based, column based etc as per the need. This aptly states that every organization should have perfect tool for the perfect database to maintain the data perfectly and as per the need. Hence, what are you waiting for? Reading this article, you might be sure which database is required for your business and which one suits your need the best. Then go ahead and select the one available from the market so that you can easily organize the huge databases as well as convert unstructured data into the structured ones thus making it easier for you to get it as and when required.

Utilities of Database Management System

Database is known as data stored in computer systems that can be accessed and altered. But, the process to keep the information handy when needed is unknown. Without organizing the information, it would be difficult to retrieve it again. Here are some of the utilities of dbms. 

Database Management Systems:

DataBase Management Systems (DBMS) is a method that provides various ways to manage the data so that we can easily retrieve it when needed. This entire process of data storage, organization and retrieval consists of:

  1. Database Language: With this database language, it becomes easy to decode the database management structure whether it is relational, object based or hierarchical depending on the needs. The Data related to web application is mostly stored in relational Database management system.
  1. Database transformer: This is used to manage the entire information in terms of fields, records, objects or files as per the need. The data is easily optimized and thus we can get a balanced well organized that can be restored quickly when required. This also helps to manage the space so that more information can be stored.
  1. Query Language: This is used to write programmes that can obtain the data from the database and reveal it to the user. Changes can be done and saved for later use. One such database language is SQL.
  1. Performance Technique: Many times similar data is entered by different users which may overwrite the existing one leading to some issues. In order to avoid such errors, database management system has a unique performance technique that validates the data before it is saved or entered in the database. If similar type of data is entered then the system doesn’t allow adding it thus reducing errors in any database file.

Some of the utilities of Database management system:

Database management system allows to a developer to create an index and add the necessary information that can be easily altered without worrying about its storage and recovery. Some of the important characteristics of this system are mentioned below:

  1. Multiple User Access & Security Management: Many users can access the database at same time without affecting the most sensitive data. A user can only access the data he/she needs; no additional data can be visible as it provides separate credentials to every user.
  1. Backup: This enables to store the data so that it can be available when needed in case the database is to be updated.
  1. Logs Access: Using the logs, a database administrator can easily see how the database is being used.
  1. Strict Rules: Check that certain fields contain the specified data as mentioned. For instance, a field is set to accept only dates. So, these rules ensure whether that particular field has data related to dates and no other information is stored.
  1. Statistical data: DBMS has various formulas that make the calculation very easy and quick. This makes quick representation of the data.

Above we explained some of the utilities of dbms to inform you all about its effectiveness. A database management system should be used, so that all the necessary sensitive information is maintained easily. Many IT firms provide database management solutions that can be beneficial to your business. You can get in touch with us to discuss your needs and get the best system suitable for your business.

Data Archiving

Introduction to Data Archiving:

Keeping your records archived is very important for business owner of all type of company. Archiving is the process of transferring data they no longer actively to separate data storage location that can be located and accessed when necessary. Data archiving is one of the best solution for the problems that are related to ever-increasing volumes of data. The mean of archiving is not creating backups for inactive data, because achieve retrievals can be selective, while backups are not. On the other hand, backups are oriented to the data store, and archives are application-oriented, so it can be a part of a backup and recovery scheme.

By archiving old data, you can manage uncontrollable data growth and keep your databases smaller and more manageable. It will help you to identify which files are no longer active in your organizations. With smaller tables, you will control index rebuilds times and backup/restore times. You will see performance gains on particular queries that either scan a huge part of the table or clustered index.

As per your business need, one should select either delete the unwanted data, or save the data to a history table and delete that from production database.

Implementing archival process is not tough task…you just need to follow three easy steps that are entailed in this process:

  • Identify data that you want to archive
  • Copying identify data in to history table
  • Clear your production database by deleting the identified data

One don’t need to archive single table every day, but they need to understand different tables in the database are connected to each other through foreign key relationships and then sequence your delete/archive process.

Furthermore, Data backups are used to restore data in case it is corrupted or destroyed, on the other hand data archives protect in active older information that occasionally need to be accessed. These topics give the details about the concept of archiving, identify high-level terminology connected with archiving, as well as define various other concepts associated with setting up and implementing a database data archiving strategy.

The Need for Archiving:

Not one or two there are several factors that require data archiving. First, the volume of data in database always increases. Second, most of this data is not active but must be maintained for business reasons and third, it is also important to preserve all inactive data as inexpensively and effectively as possible.

Databases are increasing at an unexpected rate that’s why data centers are more concerned about the volumes of data. Some inactive data exist in all over due to past dealings, the use of data warehouses, and several other reasons. Inactive data is not more useable but it’s less likely to be accessed.

Several reasons why you should maintain inactive data like:

  • You are emulating government necessities
  • You expect the requirement for creating a future trend analysis
  • You need to keep up an entire history of your clients

When the amounts of database increase, the percentage of inactive data automatically increase, this can create issues like:

  • Performance problems from extra input/output  (I/O) and widespread processing that effects clients
  • Manageability issues because huge objects become difficult identify and size limit are reached.
  • Extensive hardware and storage overheads

Benefits of Archiving

  • There are several benefits associated with archiving – reclaim disk space, reduce storage expense, lower data maintenance and enhance the performance of active data.
  • Interrelated is one of the main benefits of archiving. By recovering disk space that was used by inactive data, you can effectively cut down your storage expenses as well as reduce object maintenance.
  • And another benefit of archiving is that the search query result performance will increase automatically after by removing the inactive data from the database.
  • Lowering costs:
    • Lowering expenses is the most significant benefits of archiving your inactive data. You can store DB2 table archives on less expensive storage media than that holding your active data.
    • If your business active data is stored in high-performance, expensive data storage medium, then this is the perfect solution to establish less expensive storage medium on which to place your archive tables and files. Magnetic tape is best example of this type of medium.
    • Moreover, it improve performance of applications, use less CPU, Input/output, and memory resources, which helps to saving extra cost.
  • Less object maintenance:
    • Decreasing object maintenance is the key feature of inactive data archiving.
    • Archiving DB2 data decrease the overall number of DB2 objects that require maintenance. For instance, when less data exists, utility processing requires less time, cutting down batch processing times.

Initiate by assessing your needs for archiving. Give the answer of the following questions:

  • What data do we require to archive?
    • Our transactions inactive data.
    • In short temporary data which is useful in complete the whole transactions.
  • When do we require archiving this data?
    • Any time according to our requisite.
    • Weekly, Monthly, Quarterly or Yearly.
    • It is also depend on the volume of our PMS Database.
  • How long do we require preserving the archived data?
    • This data is maintained for long times.
    • It should be either march ending for our transaction data.
    • Or it may be many years.
    • Archive data can be save at any place, either on Hard Disk or CD’s
  • Do we require SQL access to the archived data?
    • Yes, but we can archive the data from any data source.
  • Should the archived data be stored in DB table archives or in flat-file archives?
    • We can use XML for store the inactive records.
    • Because the xml is also a file management system.
    • XML also maintains the all relationships between tables and all the data type for the data.
    • And XML is light weight then the other flat files or the any DBMS.
    • It is one type of file structure so it is more readable or easy to store anywhere.
  • Under which conditions and how often will we require retrieving archived data from either table archives or file archives?
    • When we need to refer in active data for reviewing the some old transactions.
    • Or doing some work like final audit (March ending).

Proposed Solutions:

Data Archiving through the Flat-File (Handle by Programmatically):

I prepared one solution that consists of some unique terms and some terms that are common to other areas of technology. To understand the all basic terms of data archiving, you have to understand how these are utilized to define data archiving.

    • If your databases are increasing so large and consist of huge amount of inactive data, then you can move and archive this data to archive tables or to archive flat files (Notepad). By following this, you can not only transform data from highly uses and highly expensive data storage to possibly less expensive data storage.
      • In my proposed solution, I can’t use temporary tables because of the XML file.
      • XML itself is a DBMS or it is the light weight flat file.
      • We can also set the DataSet or DataView directly on this XML file.
      • This facility is not provided into the other flat file.
    • After archiving data, you might want to selectively recover portion or all of the archived data. This process is different from backups, because you recover all data from backups.
      • In this case, we provide the selection for user which data u wants to retrieve.
      • Or because of we are using the XML we can provide the Query like facility on the Archive Data.
    • A table archive stays as a set of DB2 tables that you can archive and access quickly or frequently. Table archives are maintained in the same data store as the active data and provide immediate access to recovery of archived data. Table archives in interactive databases are regularly referred to as history tables.
      • Through the XML we can handle this situation very well.
      • With the main system we can also able to do some work on XML parallel.
      • In short we are doing some operation directly on the flat file. Without the use of XML we can’t do the same.
    • These archives fetch a probable delay in data retrieval; however, the huge numbers of options for storage gives a method for greatly reducing costs. Tape and optical storage gives relatively lower storage expenses than disk space.

Data Archiving through the Stored Procedure:

In this process we have to create fresh data based known as Archive Data. Which table we have to archive same formation and put at over here. Now what we have to do for data archive?

We have just need to call this stored process without any limits, to get all the transact dealings older than 6 months. As you can see and pass all possible date parameter to customize the archiving process. Keep in mind most important thing that doesn’t delete transactions located in the last three months.

As per your requirements, you can set this stored process as a job by utilizing SQL Server Agent, so that it works every week or fortnight.

This type of jobs tends to block the table when they are working. So it is better to calendar these jobs for off-peak hours. As well, keep an eye on the transaction log space use. In case of any issues with log space, prefer archiving in smaller batches.

Case Study for Data Archiving in Symphony – A Hotel Management System:

Now starting from the data archiving operation, we provide data archive facility to only Admin and it may be possible by including only in server installation setup. Not at the client end.

Case Study for Data Archiving in Symphony

 

Now Admin can initiate an operation of archiving the old data of reservation. As per the process flow he just set the filtering criteria for which data we have to cover in archiving operation. Means set the date. Data may be older than 2-3 years.

After Defining the Filter Criteria, our actual Archive process is start. This is complex process, so I try to divide whole process in 3 sub process.

Set the Basic Information Related to Data Archive

In that we will take the information related to the following details:

  • What the Filtered Criteria?
  • When we take the Data Archive?
  • At the time of Archiving what will be the size of archived data?
  • Where you store this archived data? (Physical Location of Archived Data File)
  • Information Related To Media Serial Number.
  • Who perform this archive operation on which date?

We will store this whole information in one table in the Database. And from that database we will retrieve back one archive ID which is unique for every archive operation.

Generate the result set of the affected Data in Archive Operation

After successful completion of Process 1, we will go for process

In this process we will get the list of filtered reservations, through that we will get the list of dependent data from different tables.

After getting all this data we build up the DataSet (Collection of DataTable) and write that whole data in particular binary file. So your data is very secure and user can’t do any update operation on that, because binary format is not readable like an XML document. One another advantage is that it is very less in size. So it is very cost effective with respect to XML data file.

After getting all this data we build up the DataSet (Collection of DataTable) and write that whole data in particular binary file. So your data is very secure and user can’t do any update operation on that, because binary format is not readable like an XML document. One another advantage is that it is very less in size. So it is very cost effective with respect to XML data file.

Binary file Generation Coding is defined below.

public void DeserializeDataSet(DataSet ds)
{
ds.RemotingFormat = SerializationFormat.Binary;
FileStream fs = new FileStream(“MyData.bin”, FileMode.OpenOrCreate);
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(fs, ds);
fs.Close();
}

Here in above code we pass the DataSet in one function through that dataset we generate our data file with name of “MyData.bin”. bin is extension for binary file. This file is very less than the XML file. It is I think 5 times less than the size of XML datafile with same data.

After creating that file we will write that file in Magnetic media or any media.

Update our DB and do actual delete old or in active data from the Database.

After successful completion of process 2, we will go for process 3.

In this process, we will use the result set of already get dependent data from the Database. It is sub process of Process No 2.

From that first of all Update the all filtered reservation records, make IsArchive field = true and put the ArchiveID = new archive Id which is coming from process 1 execution. After this successful update operation on database we will delete all the dependent records from the child tables.

For successful completion of whole DataArchive operation, the Process 1, 2, and 3 are the main or major requirements of the system. If any process or sub process may be failure, the whole DataArchive operation fails and you have to start from the Process-1.

Database Level Implementation

tra_Transaction_Master
Transaction_ID
Tran_Date_Time
TR_Source
Drawer_ID
EOF_Y_N
tra_Folio_Transactions
Transaction_ID
Reservation_ID
Folio_ID
Room_ID
Account_ID
Amount
CR_DB
Description
isVoid
Void_Reason


CREATE PROC dbo.ArchiveData
(
@CutOffDate datetime = NULL
)
AS
BEGIN
SET NOCOUNT ON
IF @CutOffDate IS NULL
BEGIN
SET @CutOffDate = DATEADD(mm, -6, CURRENT_TIMESTAMP)
END
ELSE
BEGIN
IF @CutOffDate > DATEADD(mm, -3, CURRENT_TIMESTAMP)
BEGIN
RAISERROR (‘Cannot delete transaction from last three months’, 16, 1)
RETURN -1
END
END
BEGIN TRAN
INSERT INTO Archive.dbo.tra_Transaction_Master
SELECT * FROM dbo.tra_Transaction_Master
WHERE Tran_Date_Time < @CutOffDate
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
RAISERROR (‘Error occured while copying data to Archive.dbo.tra_Transaction_Master’, 16, 1)
RETURN -1
END
INSERT INTO Archive.dbo.tra_Folio_Transactions
SELECT * FROM dbo.tra_Folio_Transactions
WHERE Transaction_ID IN
(
SELECT Transaction_ID FROM dbo.tra_Transaction_Master
WHERE Tran_Date_Time < @CutOffDate
)
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
RAISERROR (‘Error occured while copying data to Archive.dbo.tra_Folio_Transactions’, 16, 1)
RETURN -1
END
DELETE dbo.tra_Folio_Transactions
WHERE Transaction_ID IN
(
SELECT Transaction_ID FROM dbo.tra_Transaction_Master
WHERE Tran_Date_Time < @CutOffDate
)
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
RAISERROR (‘Error occured while deleting data from dbo.tra_Folio_Transactions’, 16, 1)
RETURN -1
END
DELETE dbo.tra_Transaction_Master
WHERE Tran_Date_Time < @CutOffDate
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
RAISERROR (‘Error occured while deleting data from dbo.tra_Transaction_Master’, 16, 1)
RETURN -1
END
IF @@TRANCOUNT > 0
BEGIN
COMMIT TRAN
RETURN 0
END
END

Let’s Work together!

"*" indicates required fields

Drop files here or
Max. file size: 5 MB, Max. files: 2.
    This field is for validation purposes and should be left unchanged.