Unit 5
Unit 5
Class Notes
              Prepared By- Prof. Yogesh Verma
Unit -5
  ● Cloud Computing
       ○ Defination
       ○ Cloud Infrastructure
       ○ Cloud segments or service delivery models(Iaas, Paas, Saas)
       ○ Cloud Deployment models/types of cloud(Public, Private, Hybride,
          Community)
       ○ Pros and Cons of Cloud Computing
  ●   DBMS
       ○ Introduction
       ○ File Oriented Approach and Database Approach
       ○ Data Models
       ○ Architecture of Database System
       ○ Data Independence
       ○ Data Dictionary
                                                                                        2
          ○ DBA
          ○ DDL & DML
          ○ Primary Key
Cloud Computing
Defination :-
Cloud computing is a technology that allows users to access and store data,
applications, and services over the internet instead of relying on local computers or
servers. It provides on-demand access to a shared pool of resources, such as servers,
storage, databases, networking, software, and more, which can be rapidly provisioned
and released with minimal management effort.
Salesforce.
Deployment Models
  1. Public Cloud: Services are delivered over the public internet and shared across
     multiple organizations.
  2. Private Cloud: Services are maintained on a private network, dedicated to a
     single organization.
  3. Hybrid Cloud: A combination of public and private clouds, allowing data and
     applications to be shared between them.
  4. Community Cloud: Infrastructure shared by several organizations with common
     concerns (e.g., security, compliance).
  ● Cost Efficiency: Reduces the capital expense of buying hardware and software.
  ● Scalability: Easily scale resources up or down as needed.
  ● Accessibility: Access services and data from anywhere with an internet
     connection.
                                                                                          4
   1. Compute Resources:
           ○ Virtual Machines (VMs): Simulated computer systems that run on
                physical hardware and can be used to deploy applications and services.
           ○ Containers: Lightweight, portable units that bundle an application and its
                dependencies, providing consistent environments across different
                platforms.
           ○ Bare Metal Servers: Physical servers without virtualization, offering direct
                access to hardware resources.
   2. Storage:
           ○ Block Storage: Data storage in fixed-size blocks, often used for storing
                data in applications such as databases.
           ○ Object Storage: Data storage as objects, suitable for unstructured data
                like images, videos, and backups.
           ○ File Storage: Data storage in a hierarchical file system, commonly used for
                traditional applications.
   3. Networking:
           ○ Virtual Networks: Logical networks that allow resources to communicate
                within the cloud environment.
                                                                                         5
Amazon Web Services (AWS) is one of the leading cloud service providers, and its
infrastructure includes:
   ● Global Reach: Access resources from anywhere in the world through a global
      network of data centers.
IaaS provides virtualized computing resources over the internet. It offers fundamental
building blocks such as virtual machines, storage, and networks, enabling users to build
and manage their own computing environments.
                                                                                     7
Key Features:
Examples:
   ● Amazon Web Services (AWS) EC2: Offers resizable compute capacity in the
      cloud.
   ● Microsoft Azure Virtual Machines: Provides scalable virtual machines on
      demand.
   ● Google Compute Engine (GCE): Delivers virtual machines running in Google's
      data centers.
PaaS provides a platform that allows developers to build, deploy, and manage
applications without worrying about the underlying infrastructure. It includes
development tools, databases, middleware, and more.
Key Features:
Examples:
   ● Google App Engine: A platform for building and hosting web applications in
      Google-managed data centers.
   ● Microsoft Azure App Service: A platform for building and deploying web and
      mobile apps.
   ● Heroku: A cloud platform that lets companies build, run, and operate applications
      entirely in the cloud.
SaaS delivers software applications over the internet on a subscription basis. It provides
fully functional software to users, managed and maintained by the service provider.
Key Features:
Examples:
These service delivery models enable businesses to choose the level of control and
management they need, making cloud computing a versatile and powerful tool for a
wide range of applications.
                                                                                          9
1. Public Cloud
Public Cloud services are delivered over the public internet and shared across multiple
organizations. This model is managed by third-party cloud service providers, and users
access these services on a pay-as-you-go basis.
                                                                                       10
Key Characteristics:
Examples:
2. Private Cloud
Key Characteristics:
Examples:
   ● VMware vSphere.
   ● Microsoft Azure Stack.
3. Hybrid Cloud
Hybrid Cloud is a combination of public and private clouds, allowing data and
applications to be shared between them. This model provides greater flexibility and
optimization of existing infrastructure, security, and compliance.
Key Characteristics:
Examples:
4. Community Cloud
                                                                                   13
Key Characteristics:
Examples:
  1. Cost Efficiency:
        ○ Reduces capital expenditure as there's no need to invest in physical
            hardware.
                                                                                       15
         ○ Pay-as-you-go model allows businesses to only pay for the resources they
            use.
         ○ Reduces operational and maintenance costs.
  2. Scalability:
         ○ Easily scale resources up or down based on demand.
         ○ Accommodates growth without the need for significant infrastructure
            investment.
  3. Accessibility and Flexibility:
         ○ Access data and applications from anywhere with an internet connection.
         ○ Supports remote work and collaboration.
  4. Disaster Recovery:
         ○ Simplifies backup and recovery processes.
         ○ Ensures business continuity in case of hardware failure or natural
            disasters.
  5. Performance and Reliability:
         ○ Offers high performance and availability through advanced infrastructure
            and global data centers.
         ○ Provides redundancy and load balancing to minimize downtime.
  6. Automatic Updates:
         ○ Cloud service providers handle software and hardware updates.
         ○ Ensures access to the latest features and security enhancements.
   4. Cost Overruns:
          ○ Uncontrolled usage can lead to unexpectedly high costs.
          ○ Requires careful monitoring and management of resource usage.
   5. Vendor Lock-In:
          ○ Difficulty in migrating services and data from one provider to another.
          ○ Dependency on a single provider's platform and services.
   6. Performance Variability:
          ○ Shared resources can lead to performance fluctuations.
          ○ Network latency and bandwidth limitations can affect performance.
easily accessible.
   ● Data Storage, Retrieval, and Update: Handles the storage, querying, updating,
      and deletion of data.
   ● User Management: Manages user permissions and ensures data security by
      controlling access to the database.
   ● Data Integrity: Ensures data accuracy and consistency through constraints and
      rules.
   ● Transaction Management: Manages transactions to ensure data integrity in
      multi-user environments.
   ● Backup and Recovery: Provides mechanisms for data backup and recovery in
      case of data loss or corruption.
                                                                                     18
Types of DBMS
   1. Relational DBMS (RDBMS): Stores data in tables (relations) and uses SQL for
       database interaction. Examples: MySQL, PostgreSQL, Oracle Database, SQL
       Server.
   2. NoSQL DBMS: Designed for unstructured data and large-scale data storage.
       Examples: MongoDB, Cassandra, Redis.
   3. Object-oriented DBMS (OODBMS): Stores data in the form of objects, similar to
       object-oriented programming. Examples: ObjectDB, db4o.
   4. Hierarchical DBMS: Organizes data in a tree-like structure. Example: IBM
       Information Management System (IMS).
   5. Network DBMS: Uses a graph structure to represent relationships among data.
       Example: Integrated Data Store (IDS).
1. File-Oriented Approach
The File-Oriented Approach organizes data into files and stores them on storage
devices. Each application has its own set of files for processing data.
Features:
Advantages:
                                                                                     19
Disadvantages:
2. Database Approach
The Database Approach uses a Database Management System (DBMS) to store and
manage data in a centralized and structured manner.
Features:
Advantages:
Disadvantages:
                      It   doesn’t      provide   an
                      Inbuilt     mechanism       for    It provides in house tools for backup and
Backup and Recovery
                      backup and recovery of             recovery of data even if it is lost.
                      data if it is lost.
                        There       is        no     data
Data Independence
                        independence.                        1) Logical Data Independence .
                        The users are not required       The user has to write procedures for
Meaning
                        to write procedures.             managing databases
                        Data   is     distributed   in
                                                         Due to centralized nature data sharing
Sharing                 many files. So, it is not
                                                         is easy
                        easy to share data.
             Data Models
A data model in a Database Management System (DBMS) is a conceptual framework
for organizing and structuring data. It defines how data is stored, accessed, and
manipulated within a database. A data model provides a blueprint for designing and
implementing a database, outlining the relationships among data elements and the
rules that govern them.
The conceptual data model describes the database at a very high level and is
useful to understand the needs or requirements of the database. It is this
model that is used in the requirement-gathering process i.e. before the
Database Designers start making a particular database. One such popular
model is the entity/relationship model (ER model). The E/R model specializes
in entities, relationships, and even attributes that are used by database
designers.
                                                                               24
Components of ER Model:
This type of data model is used to represent only the logical part of the
database and does not represent the physical structure of the database. The
representational data model allows us to focus primarily on the design part
of the database. A popular representational model is a Relational model. The
relational Model consists of Relational Algebra and Relational Calculus. In
the Relational Model, we basically use tables to represent our data and the
relationships between them. It is a theoretical concept whose practical
implementation is done in the Physical Data Model.
      ● The physical data model describes data need for a single project or
         application though it maybe integrated with other physical data
         models based on project scope.
      ● Data Model contains relationships between tables that which
         addresses cardinality and nullability of the relationships.
      ● Developed for a specific version of a DBMS, location, data storage or
         technology to be used in the project.
      ● Columns should have exact datatypes, lengths assigned and default
         values.
      ● Primary and Foreign keys, views, indexes, access profiles, and
         authorizations, etc. are defined
1. Hierarchical Model
The hierarchical Model is one of the oldest models in the data model which
was developed by IBM, in the 1950s. In a hierarchical model, data are viewed
as a collection of tables, or we can say segments that form a hierarchical
relation. In this, the data is organized into a tree-like structure where each
record consists of one parent record and many children. Even if the segments
are connected as a chain-like structure by logical associations, then the
instant structure can be a fan structure with multiple branches. We call the
illogical associations as directional associations.
2. Network Model
The Network Model was formalized by the Database Task group in the
1960s. This model is the generalization of the hierarchical model. This model
                                                                                      27
can consist of multiple parent segments and these segments are grouped as
levels but there exists a logical association between the segments belonging
to any level. Mostly, there exists a many-to-many logical association
between any of the two segments.
In the Object-Oriented Data Model, data and their relationships are contained
in a single structure which is referred to as an object in this data model. In
this, real-world problems are represented as objects with different attributes.
All objects have multiple relationships between them. Basically, it is a
combination of Object Oriented programming and a Relational Database
Model.
1-Tier Architecture
   ○ In this architecture, the database is directly available to the user. It
      means the user can directly sit on the DBMS and uses it.
   ○ Any changes done here will directly be done on the database itself. It
      doesn't provide a handy tool for end users.
   ○ The 1-Tier architecture is used for development of the local application,
      where programmers can directly communicate with the database for
      the quick response.
2-Tier Architecture
     with the database at the server side. For this interaction, API's like:
     ODBC, JDBC are used.
  ○ The user interfaces and application programs are run on the client-side.
  ○ The server side is responsible to provide the functionalities like: query
     processing and transaction management.
  ○ To communicate with the DBMS, client-side applications establishes a
     connection with the server side.
3-Tier Architecture
  ○ The 3-Tier architecture contains another layer between the client and
     server. In this architecture, client can't directly communicate with the
     server.
  ○ The application on the client-end interacts with an application server
     which further communicates with the database system.
  ○ End user has no idea about the existence of the database beyond the
     application server. The database also has no idea about any other user
     beyond the application.
  ○ The 3-Tier architecture is used in case of large web application.
                                                                           30
Data Independence
 ○ Data independence can be explained using the three-schema
   architecture.
 ○ Data independence refers characteristic of being able to modify the
   schema at one level of the database system without altering the
   schema at the next higher level.
Data Dictionary
A Data Dictionary, also known as a system catalog, is a crucial component of a
Database Management System (DBMS). It contains metadata, which is data about data,
and provides information about the structure, organization, and characteristics of the
data stored in the database. The data dictionary acts as a centralized repository of
information that helps in managing and utilizing the database effectively.
   1. Tables: Information about the database tables, including table names, column
      names, data types, and constraints.
   2. Indexes: Details about the indexes created on tables, including index names,
      columns involved, and index types.
   3. Views: Information about the views created in the database, including view
      definitions and underlying tables.
   4. Constraints: Data about constraints applied to tables, such as primary keys,
      foreign keys, unique constraints, and check constraints.
   5. Users and Roles: Details about database users, their roles, and their access
      permissions.
   6. Stored Procedures and Functions: Information about stored procedures and
      functions, including their definitions and parameters.
   7. Triggers: Details about triggers created in the database, including trigger events
      and associated actions.
             D.B.A.
A Database Administrator (DBA) is a crucial role in the management and maintenance
of database systems. DBAs are responsible for ensuring the availability, performance,
and security of databases, and they play a key role in the design, implementation, and
administration of database environments.
In a Database Management System (DBMS), DDL (Data Definition Language) and DML
(Data Manipulation Language) are two types of SQL (Structured Query Language)
commands used for different purposes.
DDL commands are used to define and manage the structure of the database objects
such as tables, indexes, and schemas. These commands include:
FirstName VARCHAR(50),
LastName VARCHAR(50),
Department VARCHAR(50),
Salary DECIMAL(10, 2)
);
                                                                                      35
4.TRUNCATE: Removes all rows from a table, but keeps the table structure for future
use.
DML commands are used to manipulate and manage the data within the database
objects. These commands include:
Primary Key
In SQL, a primary key is a column or a set of columns in a table that uniquely identifies
each row in that table. The primary key must contain unique values, and it cannot
contain NULL values. Each table can have only one primary key, which ensures the
uniqueness and integrity of the data.
FirstName VARCHAR(50),
LastName VARCHAR(50),
Department VARCHAR(50),
Salary DECIMAL(10, 2)
);