Chapter 08
Databases
DATABASES
Introduction to Databases in Hospitality
• Databases are essential tools in the information age.
• In hospitality, every department—front desk, food &
beverage, marketing, housekeeping—can use
databases to:
Track assets
Manage expenses
Analyze and increase sales
• Proper use helps improve decision-making,
customer satisfaction, and operational efficiency.
• Databases are playing an ever-increasing important
role in the information age.
• In the hospitality industry, their effective usage can
help every department better manage assets,
expenses, and sales.
Structured Data and Database
Basics
Database is an organized, centralized collection of
data serving applications.
A database is a logically organized collection of
related data designed and built for a specific purpose.
Database is a collection of structured and related
data items organised so as to provide a consistent and
controlled access to the items.
A database is a structured and organized system to
store and manage data.
A database is a collection of interrelated data items
that are managed as a single unit.
From check-in, to food purchasing, to targeting
customers, effective and efficient management of
large quantities of data requires a database.
Structured data is data that can be organized easily, such as words
and numbers.
Structured Data refers to data that is easily organized into tables
(e.g., names, phone numbers, check-in dates).
Structured Data is Organized in rows and columns (like Excel or SQL
tables).
Flat files are “ordinary” operating system files in that records in the
file contain no information to communicate the file structure or any
relationship among the records to the application that uses the file.
In essence, flat files are not databases at all because they do not
meet any of the characteristics
Flat files or paper records that are slow and hard to search.
Flat files is paper only records or non-interrelated computer
systems. Time is wasted retrieving data.
flat files (paper or isolated systems), databases save time and allow
integration between departments.
An instance is a copy of the database software running in memory.
A database object is a named data structure that is stored in a
database.
Database model refers to the way in which a database organizes its
data to pattern the real world.
A file is a collection of related records that are stored as a single unit
by an operating system.
Database Management
Systems (DBMSs)
Criticalpiece of software that provides users and
database administrators with the ability to access
and manipulate data
Software that allows creating, storing, and retrieving
data.
To create and manage databases, we use Database
Management System Software (DBMS) software.
DBMS facilitate the creation, organisation and
maintenance of databases.
Examples of Database Management software include
Microsoft Access, Microsoft SQL Server, Oracle,
FoxPro, Dbase IV, Lotus Approach and MySQL.
Databases use Database Management Systems
(DBMS).
DBMS or database manager, is
software written specifically to control
the structure of a database and access
to the data.
In a DBMS, an address change need be
entered only once, and the updated
information is then available in any
relevant file.
Database is the collection of the data,
and database management system is
the software—but many professionals
use “database” to cover both
meanings.
Functions of Database Management Systems
Advantages of database management systems are
these:
REDUCED DATA REDUNDANCY
Data redundancy, or repetition, means that the
same data fields (a person’s address, say) appear
over and over again in different files and often in
different formats.
In old file-processing system, separate files would
repeat the same data, wasting storage space.
In a database management system, information
appears just once, freeing up more storage
capacity.
In old data storage systems, if one field needed to
be updated, someone had to make sure that it was
updated in all the places it appeared—an
invitation to error.
IMPROVED DATA INTEGRITY
Data integrity means that data is accurate,
consistent, and up to date.
In old system, when a change was made in one
file, it might not have been made in other files.
The result was that some reports were
produced with erroneous information.
In a DBMS, reduced redundancy increases
chances of data integrity—the chances that
data is accurate, consistent, and up to date—
because each updating change is made in only
one place.
Also many DBMSs provide built-in check
systems that help ensure the accuracy of the
data that is input.
INCREASED SECURITY
Although various departments may share data,
access to specific information can be limited to
selected users.
That is, through the use of passwords, financial,
and information in a hotel database is made
available only to those who have a legitimate
need to know.
EASE OF DATA MAINTENANCE
Database management systems offer standard
procedures for adding, editing, and deleting
records, as well as validation checks to ensure
that appropriate type of data is being entered
properly and completely into each field type.
Data backup utilities ensure availability of data in
case of system failure.
Database Administrator (DBA)
Large databases are managed by a specialist called
a database administrator.
Database administrator (DBA) coordinates all
related activities and needs for an organization’s
database, ensuring the database’s recoverability,
integrity, security, availability, reliability, and
performance.
DBA determine user access privileges; set
standards, guidelines, and control procedures;
assist in establishing priorities for requests;
prioritize conflicting user needs; and develop user
documentation and input procedures.
DBA are concerned with security—establishing and
monitoring ways to prevent unauthorized access
and making sure data is backed up and recoverable
should a failure occur—and to establish and
enforce policies about user privacy.
CONTENTS OF A DATABASE / CONCEPTS / TERMS
FIELD - A field is a unit of data consisting of one or more
characters (bytes).
Field is a collection of bytes or data with specific meaning such as “last
name”
It is the smallest unit of meaningful information in a database.
Each field has a field name that describes a kind of data that should
be entered into the field.
An example of a field is your first name, or your street address, or
your Social Security number.
Fields can be designed to be a certain maximum length or a variable
length, and they can also be designed to hold different types of
data, such as text only, numbers only, dates only, time, a “yes” or
“no” answer only, web links only, or pictures, sound, or video.
RECORD - is a collection of related fields that represent a
single entity.
Record is a collection of fields
Each record stores data about only one entity, which can be a
person, a place, a thing, an occurrence, or a phenomenon.
An example of a record would be your name and address and Social
Security number.
FILE - is a collection of related records.
File is a collection of records
An example of a file would be data collected on
everyone employed in the same department of a
company, including all names, addresses, and
Social Security numbers.
You use files a lot because the file is the
collection of data or information that is treated
as a unit by the computer.
File is at the top of data hierarchy. A collection
of related files forms the database.
A company database might include files on all
past and current employees in all departments.
There would be various files for each employee:
payroll, retirement benefits, sales quotas and
achievements (if in sales), and so on.
Key Field
A key field is a field that is chosen to
uniquely identify a record so that it can be
easily retrieved and processed.
Key field is often an identification number,
Social Security number, customer account
number.
The primary characteristic of the key field is
that it is unique.
Primary Keys is fields that uniquely identify
a record.
Composite Key is when two primary keys
used together.
Foreign Key is when primary key is linked
to a like file
Logical View is view of the
database from the user’s
perspective
Physical View is make-up and
organization of the data on the
storage device.
Relational Database is when all
files linked together so the entire
database is utilized .
Example: E-commerce
Database
An e-commerce database might have the following tables and
relationships:
•Customers:
•customer_id (Primary Key)
•name
•email
•address
•Products:
•product_id (Primary Key)
•name
•description
•price
•category_id (Foreign Key referencing Categories table)
•Categories:
•category_id (Primary Key)
•name
•Orders:
•order_id (Primary Key)
•customer_id (Foreign Key referencing Customers table)
•order_date
•OrderDetails:
•order_id (Foreign Key referencing Orders table)
•product_id (Foreign Key referencing Products table)
•quantity
•price
Data Extraction and
Information Gathering
Data extraction and information
gathering are crucial processes for
turning raw data into valuable insights.
Data extraction involves retrieving
specific information from various
sources, while information gathering is
a broader term encompassing various
methods to collect data.
Both are essential for informed
decision-making and efficient business
operations.
Data Extraction
Definition:
Data extraction is the process of identifying and retrieving
specific data from various sources, such as databases, websites,
or documents.
Purpose:
It aims to transform raw data into a structured format for further
analysis, processing, or storage.
Examples:
Extracting contact information from a database of pre-approved
applications, or pulling specific data points from a website.
Methods:
Data extraction can be manual, automated using specialized
tools, or a combination of both.
Importance:
It's the first step in the ETL (Extract, Transform, Load) or ELT
(Extract, Load, Transform) processes, which are fundamental for
data warehousing and business intelligence.
Information Gathering
Definition:
Information gathering is a broader term encompassing
various methods to collect data for a specific purpose.
Purpose:
It aims to acquire data from various sources to gain
insights and make informed decisions.
Examples:
Conducting surveys, analyzing social media data, or
using web scraping to gather information.
Methods:
Information gathering can involve surveys, interviews,
observations, data mining, and more.
Importance:
It provides the foundation for strategic planning, market
research, and understanding trends.
Data Extraction and Information
Gathering
Data language of choice is SQL
SQL (Structured Query Language) is Standard language to query
databases
Issue Queries to extract information from database
Queries
◦ A query is used to extract specific information from your table(s). A Query takes
information from the selected tables and displays a subset of data that meets your
criteria.
◦ Reports
◦ Presents data from a query or table and places it in neat, organized and readable
form.
Minimizing Redundancy it Prevents duplicate data.
Data Independence is Changing storage without affecting how it's used.
Concurrency Management is Avoiding conflicts when multiple users
access the data (e.g., Deadlock)
Security features
Multi-user DBMS’s/problems—data integrity and “Deadly Embrace” (two
processes require resources held by the other).
Challenges in multi-user environments: data integrity issues and
problems like the "Deadly Embrace" (conflicting resource access).
Basic SQL Queries for Data
Extraction & Information Gathering
1. SELECT – Retrieve Data
• SELECT * FROM guests;
Retrieves all records from the guests table.
• SELECT guest_name, check_in_date FROM
reservations;
Retrieves only selected columns.
2. ORDER BY – Sort Results
• SELECT guest_name, total_bill
FROM bills
ORDER By total_bill DESC;
• Sorts guests by their highest bill.
3. SELECT guest_name, total bill
FROM bills
WHERE total_bill > 100,000;
• To find guests who spent more than
100, 000.
• You use this quary sql.
4. SELECT COUNT(*) FROM
reservation;
• Counts total reservations.
Distributed DBMSs and Cloud
Computing
A distributed database is a database that stores data across
multiple physical locations to improve the reliability,
scalability, and performance of the overall system.
A Distributed DBMS is a database system where data is
stored in multiple locations (computers or servers) but looks
like one single database to users.
These locations can be in the same place or far away.
A distributed database stores data across multiple physical
locations that are connected by a network.
Hotels and restaurants with branches in different places can
share and access data easily.
Staff at one branch can check room availability or customer
records from another branch.
Benefits:
- Faster access to local data.
- Easier backup and recovery.
- No full system crash if one part fails.
Cloud Computing
Cloud computing means storing and accessing
data and programs over the Internet instead of
using your own computer’s hard drive.
You use remote servers owned by companies like
Google, Microsoft, or Amazon.
Used to store guest information, booking systems,
POS data, etc., without expensive hardware.
Can be accessed anytime, anywhere.
Benefits:
- Saves money.
- Easy to scale up.
- Data backup and security handled by provider.
Data Warehousing
A data warehouse is a central storage place
where all the data from across the business
is collected, organized, and stored.
Think of it like a big library of data.
Helps management analyze large amounts
of information.
Used for decision-making.
Benefits:
◦ Better business planning and customer service.
◦ Helps in reporting and performance tracking.
Data-Mart
A Data-Mart is a smaller version of a data
warehouse, made for a specific department
(like Sales, HR, or Finance). Only holds data
relevant to that department.
Sales team might use their own data-mart
to track bookings and promotions.
Faster and simpler than searching through
the whole data warehouse.
Benefits:
◦ Improves speed of data processing.
◦ Easier for each department to focus on their own
data.
Blockchain
Blockchain is a secure digital record
system that stores information in blocks
linked together in a chain.
Once something is written in the chain, it
cannot be changed.
Secure payments, loyalty programs, verify
guest identities.
Builds trust and transparency.
Benefits:
No fraud or cheating.
Secure transactions.
Unstructured Data
Not organized like structured data and
can be hard to manage; a mix of various
things that need to be stored.
Unstructured data is information that
does not follow a set format or structure.
It can include text, images, videos, voice
recordings, and other media types.
This kind of data is hard to organize and
analyze using traditional tools like SQL or
Excel
Examples:
- Guest reviews on social media
- Emails and support chats
- Hotel CCTV footage and images
Helps improve customer service through
analysis of reviews and feedback.
Supports security and operational
decision-making
Challenge:
- Requires special tools or software to
manage and make sense of the data
Big Data
Big Data refers to extremely large and
complex sets of data that traditional
databases cannot handle easily.
It includes structured, semi-structured, and
unstructured data.
Examples in Hospitality:
- Social media interactions
- Wearable fitness tracker data in wellness
resorts
- CCTV and movement tracking
- Smart room (IoT) device data
Importance:
- Predicts customer behavior
- Personalizes guest experiences
- Helps forecast trends and improve
operations
Characteristics (4 Vs):
- Volume: Huge amounts of data
- Velocity: Speed of data generation
- Variety: Different data types
- Veracity: Trustworthiness of data
NoSQL (Non-SQL Databases)
NoSQL stands for 'Not Only SQL'. It refers to
databases designed to store and manage big and
unstructured data. NoSQL databases are more
flexible and scalable than traditional SQL databases,
and they work well with cloud computing.
Use in Hospitality:
- Real-time feedback systems
- Handling bookings from various platforms
- Managing data from IoT smart hotel devices
Benefits:
- Can handle large and varied data efficiently
- Scalable and ideal for modern web/mobile apps
- Supports fast, real-time data management
Database Usage in
Hospitality
1. Analysis Tools and Concepts
a. Profile
Profile is a set of attributes and relationships that classify
an entity (Customer).
A profile is a set of details (attributes) about a person
or object (like a customer).
Example: A hotel guest profile may include name, age,
travel history, favorite room type, etc.
Profiles help the system understand and classify different
types of customers.
b. Data Mining
Data Mining—analysis of data for potential relationships.
Data mining means searching through large amounts
of data to find patterns or relationships.
In hotels, it can help find guests who book during
holidays, or who prefer spa services.
c. Profiling, Clustering, and Cluster Mapping
Profiling, clustering and cluster mapping—types of model
formation; involve the plotting and mapping of data with
like attributes.
Profiling: Creating categories or types of guests based on
shared details.
Clustering: Grouping guests who behave similarly (e.g.,
frequent travelers).
Cluster Mapping: Visually showing these groups to see
trends and similarities.
d. Predictive Analysis
Predictive analysis—looks at data to predict future events.
Uses past data to guess what might happen in the
future.
Example: Predicting when rooms are likely to be
overbooked or when guests might cancel.
e. Social Media Analytics
Social media analytics—looks at social media for
behavioral analysis.
Collecting and studying what guests are saying on
Facebook, Instagram, Twitter, etc.
Helps in understanding guest behavior,
preferences, and satisfaction.
f. Trigger
Trigger—in database terms, something that sets off
another event.
A trigger is something in a database that
automatically starts another action.
Example: When a guest checks in, the system can
automatically notify housekeeping.
g. RFID (Radio Frequency Identification)
RFID—Radio Frequency Identification (used
in automobile toll passage (Easy Pass).
Uses radio waves to track items or
people.
Used in hotel key cards, smart locks,
or guest tracking.
Example: Like the Easy Pass system used
on highways to let cars pass without
stopping.
2. Customer Relationship Management (CRM)
CRM means Customer Relationship Management or
Customer Experience Management.
It’s how hotels and hospitality businesses manage their
interactions with guests.
The goal is to serve and treat each customer personally
using the data collected.
AKA customer experience management
Helps the industry to serve and target customers in
personalized ways
CRM Goals:
Create a full picture (called a 360-degree view) of every
guest.
Understand guest behavior, likes, dislikes, past bookings,
etc.
Improve guest satisfaction, loyalty, and repeat business.
3. CRM in Use – How it Works in Real Life
To make CRM work effectively, the following things must
happen:
✅ All customer touch points (PMS, POS, CRS, Mobile
Apps) must be included:
PMS: Property Management System
POS: Point of Sale (e.g., restaurant or bar)
CRS: Central Reservation System
✅ Staff training:
Every worker (front desk, waiters, managers) must
understand the importance of guest data and
collect it carefully.
✅ Access to data:
Staff must be able to view and use data when
needed, like during check-in or service.
✅ Staff empowerment:
Employees must be allowed to act based on the
data. Example: Offer a guest their favorite drink when
they arrive.
✅ Centralized data:
All customer information must be stored in one
place (like a data warehouse) for easy access and
analysis.
Assignment
1. What is the difference between the logical
and physical views?
2. What is a flat file?
3. What functions does the DBMS provide?
4. What is CRM and how do you know if it is
successful?
5. What is an enterprise search?
6. What is a profile?
7. How is CRM using the Web?
8. What is SQL and what does it do?
9. What is a trigger and how can it be used
effectively?