DBMS and Data Model PDF
DBMS and Data Model PDF
DBMS and Data Model PDF
Model
KARTHICK SELVAM
What is data?
• MySQL
• Microsoft Access
• Oracle
• PostgreSQL
• dBASE
• FoxPro
• SQLite
• IBM DB2
• LibreOffice Base
• MariaDB
• Microsoft SQL Server etc.
Application of DBMS
For customer information, account activities, payments, deposits,
Banking
loans, etc.
• Hierarchical database
• Network database
• Relational database
• Object-Oriented database
Types of DBMS
Hierarchical DBMS
In a Hierarchical database, model data is organized in a tree-like structure.
Data is Stored Hierarchically (top down or bottom up) format. Data is
represented using a parent-child relationship. In Hierarchical DBMS parent
may have many children, but children have only one parent.
Network Model
The network database model allows each child to have multiple parents. It
helps you to address the need to model more complex relationships like as
the orders/parts many-to-many relationship. In this model, entities are
organized in a graph which can be accessed through several paths.
Relational model
Relational DBMS is the most widely used DBMS model because it is one of
the easiest. This model is based on normalizing data in the rows and columns
of the tables. Relational model stored in fixed structures and manipulated
using SQL.
Types of DBMS
Object-Oriented Model
In Object-oriented Model data stored in the form of objects. The
structure which is called classes which display data within it. It defines a
database as a collection of objects which stores both data members
values and operations.
Advantages of DBMS
Although, DBMS system is useful. It is still not suited for specific task
mentioned below:
Not recommended when you do not have the budget or the
expertise to operate a DBMS. In such cases, Excel/CSV/Flat Files
could do just fine.
Architecture
DBMS
Centralized Database
Distributed Database
Relational Database
NoSQL Database
Cloud Database
Object-oriented Databases
Hierarchical Databases
Network Databases
Personal Database
Operational Database
Enterprise Database
Centralized Database
The process of designing a database involves producing the previously described three types of
schemas - conceptual, logical, and physical. The database design documented in these
schemas are converted through a Data Definition Language, which can then be used to
generate a database. A fully attributed data model contains detailed attributes (descriptions) for
every entity within it.
The term "database design" can describe many different parts of the design of an overall
database system. Principally, and most correctly, it can be thought of as the logical design of the
base data structures used to store the data.
In the relational model these are the tables and views. In an object database the entities and
relationships map directly to object classes and named relationships. However, the term
"database design" could also be used to apply to the overall process of designing, not just the
base data structures, but also the forms and queries used as part of the overall database
application within the Database Management System or DBMS.
In the process, system interfaces account for 25% to 70% of the development and support costs of
current systems. The primary reason for this cost is that these systems do not share a common
data model. If data models are developed on a system by system basis, then not only is the same
analysis repeated in overlapping areas, but further analysis must be performed to create the
interfaces between them. Most systems within an organization contain the same basic data,
redeveloped for a specific purpose. Therefore, an efficiently designed basic data model can
minimize rework with minimal modifications for the purposes of different systems within the
organization.
Why use Data Model?
The main aim of this model is to establish the entities, their attributes,
and their relationships. In this Data modeling level, there is hardly any
detail available of the actual Database structure.
The 3 basic tenants of Data Model are
Entity: A real-world thing
Attribute: Characteristics or properties of an entity
Relationship: Dependency or association between two entities
For example:
• Customer and Product are two entities. Customer number and name
are attributes of the Customer entity
• Product name and price are attributes of product entity
• Sale is the relationship between the customer and product
Conceptual Model
Characteristics of a conceptual
data model
Offers Organization-wide coverage of the business concepts.
This type of Data Models are designed and developed for a
business audience.
The conceptual model is developed independently of hardware
specifications like data storage capacity, location or software
specifications like DBMS vendor and technology. The focus is to
represent data as a user will see it in the "real world."
Conceptual data models known as Domain models create a
common vocabulary for all stakeholders by establishing basic
concepts and scope.
Logical Data Model
Business / Enterprise Strategy: Enterprise strategy deals with the issues that affect the
organization as a whole. In OLTP, it is typically developed at a high level within the
firm, by the board of directors or the top management
Business Process: OLTP business process is a set of activities and tasks that, once
completed, will accomplish an organizational goal.
Customers, Orders, and Products: OLTP database store information about products,
orders (transactions), customers (buyers), suppliers (sellers), and employees.
ETL Processes: It separates the data from various RDBMS source systems, then
transforms the data (like applying concatenations, calculations, etc.) and loads the
processed data into the Data Warehouse system.
Data Mart and Data warehouse: A data mart is a structure/access pattern specific to
data warehouse environments. It is used by OLAP to store processed data.
Data Mining, Analytics, and Decision Making: Data stored in the data mart and data
warehouse can be used for data mining, analytics, and decision making.
This data helps you to discover data patterns, analyze raw data, and make analytical
decisions for your organization's growth.
Example of OLTP Transaction
An example of the OLTP system is the ATM center. Assume that a couple has a
joint account with a bank. One day both simultaneously reach different ATM
centers at precisely the same time and want to withdraw the total amount
present in their bank account.
However, the person that completes the authentication process first will be able
to get money. In this case, the OLTP system makes sure that the withdrawn
amount will be never more than the amount present in the bank. The key to
note here is that OLTP systems are optimized for transactional superiority instead
of data analysis.
Other examples of OLTP system are:
Online banking
Online airline ticket booking
Sending a text message
Order entry
Add a book to shopping cart
OLTP vs. OLAP
OLTP vs. OLAP
OLTP OLAP
OLTP is an online transactional system. OLAP is an online analysis and data retrieving process.
It is characterized by large numbers of short online transactions. It is characterized by a large volume of data.
OLTP is an online database modifying system. OLAP is an online database query management system.
Insert, Update, and Delete information from the database. Mostly select operations
OLTP and its transactions are the sources of data. Different OLTP databases become the source of data for OLAP.
The data in the OLTP database is always detailed and organized. The data in the OLAP process might not be organized.
Complete backup of the data combined with incremental backups. OLAP only need a backup from time to time. Backup is not important compared to OLTP
DB design is an application-oriented example: Database design changes with the industry DB design is subject-oriented. Example: Database design changes with subjects like sales,
like retail, airline, banking, etc. marketing, purchasing, etc.
It is used by Data critical users like clerk, DBA & Data Base professionals. It is used by Data knowledge users like workers, managers, and CEO.
It is designed for real time business operations. It is designed for analysis of business measures by category and attributes.
Transaction throughput is the performance metric Query throughput is the performance metric.
This kind of Database user allows thousands of users. This kind of Database allows only hundreds of users.
It helps to Increase user's self-service and productivity Help to Increase the productivity of business analysts.
Data Warehouses historically have been a development project which may prove costly to An OLAP cube is not an open SQL server data warehouse. Therefore, technical knowledge
build. and experience are essential to managing the OLAP server.
It provides a fast result for daily used data. It ensures that response to the query is quicker consistently.
It is easy to create and maintain. It lets the user create a view with the help of a spreadsheet.
A data warehouse is created uniquely so that it can integrate different data sources for
OLTP is designed to have fast response time, low data redundancy, and is normalized.
building a consolidated database
Advantages of OLTP
OLTP offers accurate forecast for revenue and expense. It provides a solid
foundation for a stable business /organization due to timely modification of all
transactions.
OLTP makes transactions much easier on behalf of the customers.
It broadens the client base for an organization by speeding up and simplifying
individual processes.
OLTP provides support for bigger databases.
Partition of data for data manipulation is easy.
We need OLTP to use the tasks which are frequently performed by the system.
When we need only a small number of records.
The tasks that include insertion, updating, or deletion of data.
It is used when you need consistency and concurrency in order to perform tasks
that ensure its greater availability.
Disadvantages of OLTP
If the OLTP system faces hardware failures, then online transactions get severely
affected.
OLTP systems allow multiple users to access and change the same data at the
same time, which many times created an unprecedented situation.
If the server hangs for seconds, it can affect to a large number of transactions.
OLTP required a lot of staff working in groups in order to maintain inventory.
Online Transaction Processing Systems do not have proper methods of
transferring products to buyers by themselves.
OLTP makes the database much more susceptible to hackers and intruders.
In B2B transactions, there are chances that both buyers and suppliers miss out
efficiency advantages that the system offers.
Server failure may lead to wiping out large amounts of data from the database.
You can perform a limited number of queries and updates.
Challenges of an OLTP System
It allows more than one user to access and change the same data
simultaneously. Therefore, it requires concurrency control and
recovery technique in order to avoid any unprecedented situations
OLTP system data are not suitable for decision making. You have to
use data of OLAP systems for "what if" analysis or the decision
making.
What is OLAP?
An example of OLTP system is ATM center. Assume that a couple has a joint
account with a bank. One day both simultaneously reach different ATM centers
at precisely the same time and want to withdraw total amount present in their
bank account.
However, the person that completes authentication process first will be able to
get money. In this case, OLTP system makes sure that withdrawn amount will be
never more than the amount present in the bank. The key to note here is that
OLTP systems are optimized for transactional superiority instead data analysis.
Other examples of OLTP system are:
Online banking
Online airline ticket booking
Sending a text message
Order entry
Add a book to shopping cart
KEY DIFFERENCE:
The Grain describes the level of detail for the business problem/solution. It is the
process of identifying the lowest level of information for any table in your data
warehouse. If a table contains sales data for every day, then it should be daily
granularity. If a table contains total sales data for each month, then it has
monthly granularity.
During this stage, you answer questions like
Do we need to store all the available products or just a few types of products? This
decision is based on the business processes selected for Datawarehouse
Do we store the product sale information on a monthly, weekly, daily or hourly basis?
This decision depends on the nature of reports requested by executives
How do the above two choices affect the database size?
Example of Grain:
The CEO at an MNC wants to find the sales for specific products in different locations
on a daily basis.
So, the grain is "product sale information by location by the day."
Step 3) Identify the dimensions