Data Base Managment System
Data Base Managment System
Tech
Subject Name: Basic Computer Engineering
Subject Code: BT-205
Semester: 2nd
Downloaded from be.rgpvnotes.in
UNIT V
Database-management system
A database management system (DBMS) is a collection of interrelated data and a set of programs to access
those data. The collection of data, usually referred to as the database, contains information relevant to an
enterprise.
The primary goal of a DBMS is to provide a way to store and retrieve database information that is both
convenient and efficient. Database systems are designed to manage large bodies of information.
Management of data involves both defining structures for storage of information and providing
mechanisms for the manipulation of information. In addition, the database system must ensure the safety
of the information stored, despite system crashes or attempts at unauthorized access.
These file-based approaches, which came into being as the first commercial applications of computers,
suffered from the following significant disadvantages:
Database Approach
Fundamental Concepts
The database is a shared collection of related data which will be used to support the activities of the
organization. The database can be viewed as a repository of data that is defined once and then is accessed
by various users.
o If the computer system fails in the middle of a complex update program, the recovery subsystem is
responsible for making sure that the database is restored to the stage it was in before the program started
executing.
E-R Diagram
Entity − A e tit i a ER Model is a real-world entity having properties called attributes.
Every attribute is defined by its set of values called domain. For example, in a school database, a
student is considered as an entity. Student has various attributes like name, age, class, etc.
Relationship − The logi al association among entities is called relationship. Relationships are
mapped with entities in various ways. Mapping cardinalities define the number of association
between two entities.
Mappi g ardi alities −
o one to one
o one to many
o many to one
o many to many
Relational Model
The most popular data model in DBMS is the Relational Model. It is more scientific a model than others.
This model is based on first-order predicate logic and defines a table as an n-ary relation.
Hierarchical Model
Network Model
In the network model, entities are organized in a graph, in which some entities can be accessed through
several paths.
Advantages
4
• Co eptual Si pli it
• Ease of data a ess
• Data I tegrit a d apa ilit to ha dle ore relatio ship t pes
• Data i depe de e
• Data ase sta dards
Disadvantages
• S ste o ple ity
• A se e of stru tural i depe de e
Network Model
Database Architecture
Database architecture is logically divided into two types.
Two-Tier Architecture
Two-tier Client / Server architecture is used for User Interface program and Application Programs that run
on the client side. An interface called ODBC(Open Database Connectivity) provides an API that allows
client-side program to call the DBMS. Most DBMS vendors provide ODBC drivers. A client program may
connect to several DBMS's. In this architecture some variation of the client is also possible for example in
some DBMS's more functionality is transferred to the client including data dictionary, optimization etc.
Such clients are called Data server.
Three-tier Client / Server Architecture
Three-tier Architecture
Database Administrator
One of the main reasons for using DBMSs is to have central control of both the data and the programs that
access those data. A person who has such central control over the system is called a database
administrator (DBA). The functions of a DBA include:
• S he a defi itio . The DBA reates the origi al data ase s he a e e uti g a set of data defi itio
statements in the DDL.
• Storage stru ture a d access method definition.
• S he a a d ph si al-organization modification. The DBA carries out changes to the schema and physical
organization to reflect the changing needs of the organization, or to alter the physical organization to
improve performance.
• Gra ti g of authorizatio for data a ess. B gra ti g differe t t pes of authorizatio , the database
administrator can regulate which parts of the database various users can access.
Routi e ai te a e. E a ples of the data ase ad i istrator’s routi e ai te a e a ti ities are:
– Periodically backing up the database, either onto tapes or onto remote servers, to prevent loss of data
in case of disasters such as flooding.
– Ensuring that enough free disk space is available for normal operations, and upgrading disk space as
required.
– Monitoring jobs running on the database and ensuring that performance is not degraded by very
expensive tasks submitted by some users.
Data Dictionary
A metadata (also called the data dictionary) is the data about the data. It is the self-describing nature of
the database that provides program-data independence. It is also called as the System Catalog. It holds
the following information about each data element in the databases, it normally includes:
– Name
– Type
– Range of values
– Source
– Access authorization
– Indicates which application programs use the data so that, when a change in a data structure is
contemplated, a list of the affected programs can be generated.
The data dictionary is used to control the database operation, data integrity, and accuracy. Metadata is
used by developers to develop the programs, queries, controls, and procedures to manage and manipulate
the data.
Active and Passive Data Dictionaries
The data dictionary may be either active or passive. An active data dictionary (also called integrated data
dictionary) is managed automatically by the database management software. Consistent with the current
structure and definition of the database. Most of the relational database management systems contain
active data dictionaries that can be derived from their system catalog.
The passive data dictionary (also called non-integrated data dictionary) is the one used only for
documentation purposes. Data about fields, files, people and so on, in the data processing environment,
are. Entered the dictionary and cross-referenced.
Primary Key
A primary key is a special relational database table column (or combination of columns) designated to
uniquely identify all table records.
A pri ar ke ’s ai features are:
– It must contain a unique value for each row of data.
– It cannot contain null values.
– A primary key is either an existing table column or a column that is specifically generated by the
database according to a defined sequence.
SQL Commands in DBMS
DDL
DDL is short name of Data Definition Language, which deals with database schemas and descriptions, of
how the data should reside in the database.
CREATE – to create database and its objects like (table, index, views, stored procedure, function, and
triggers)
ALTER – alters the structure of the existing database
DROP – delete objects from the database
TRUNCATE – remove all records from a table, including all spaces allocated for the records are removed
COMMENT – add comments to the data dictionary
RENAME – rename an object
DML
DML is short name of Data Manipulation Language which deals with data manipulation and includes most
common SQL statements such SELECT, INSERT, UPDATE, DELETE etc, and it is used to store, modify,
retrieve, delete and update data in the database.
Cloud Computing: -
A cloud is simply a centralized technology platform which provides specific IT services to a selected range
of users, offering the ability to log in from anywhere, ideally from any device and over any connection,
including the Internet.
Intercept IT believes that a true cloud computing service is one which removes the traditional barriers
which exist between software applications, data, and devices. In other words, it is the nirvana of
o puti g fro a user’s perspe ti e, o eed to orr a out lo atio , de i e, or t pe of o e tion, all
the data and the software applications required by the user are fully available and the experience remains
consistent. The highest standards of data protection must be a given, whereby users do not have to think
about protecting the integrity of the data they use and store.
1.On-demand capabilities:
A business will secure cloud-hosting services through a cloud host provider which could be your usual
software vendor. You have access to your services and you have the power to change cloud services
through an online control panel or directly with the provider.
2.Broadnetwork access:
Your team can access business management solutions using their smart phones, tablets, laptops,
and office computers. They can use these devices wherever they are located with a simple online access
point.
3.Resource pooling:
The cloud enables your employees to enter and use data within the business management software hosted
in the cloud at the same time, from any location, and at any time.
4.Rapid elasticity:
If anything, the cloud is flexible and scalable to suit your immediate business needs. You can quickly and
easily add or remove users, software features, and other resources.
5.Measured service:
Going back to the affordable nature of the cloud, you only pay for what you use. You and your cloud
provider can measure storage levels, processing, bandwidth, and the number of user accounts and you are
billed appropriately.
•The NIST Cloud Co puti g Refere e Ar hite ture o sists of fi e ajor a tors. Ea h a tor plays a role
and performs a set of activities and functions. The reference architecture is presented as successive
diagrams in increasing level of detail.
•A o g the fi e a tors, loud rokers are optio al, as loud o su ers a o tai ser i e dire tl fro a
cloud provider.
1. Cloud Consumer:
Person or organization that maintains a business relationship with, and uses service from, Cloud Providers.
2. Cloud Provider:
A person, organization or entity responsible for making a service available to Cloud Consumers.
3. Cloud Auditor:
A party that can conduct an independent assessment of cloud services, information system operations,
performance and security of the cloud implementation.
4. Cloud Broker:
An entity manages the use, performance, and delivery of cloud services, and negotiates relationships
between Cloud Providers and Cloud Consumers.
5. Cloud Carrier:
The intermediary that provides connectivity and transport of cloud services from Cloud Providers to Cloud
Consumers.
According to National Institute of Standards and Technology (NIST), Cloud computing is a model for
enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing
resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and
released with minimal management effort or service provider interaction. This cloud model is composed of
five essential characteristics, three service models, and four deployment models.
Software as a Service (SaaS). The apa ilit pro ided to the o su er is to use the pro ider’s appli atio s
running on a cloud infrastructure. The applications are accessible from various client devices through
either a thin client interface, such as a web browser (e.g., web-based email), or a program interface.
Platform as a Service (PaaS). The capability provided to the consumer is to deploy onto the cloud
infrastructure consumer-created or acquired applications created using programming languages, libraries,
services, and tools supported by the provider.
Infrastructure as a Service (IaaS). The capability provided to the consumer is to provision processing,
storage, networks, and other fundamental computing resources where the consumer can deploy and run
arbitrary software, which can include operating systems and applications. The consumer does not manage
or control the underlying cloud infrastructure but has control over operating systems, storage, and
10
deployed applications; and possibly limited control of select networking components (e.g., host firewalls).
Deployment Model: -
Private cloud. The cloud infrastructure is provisioned for exclusive use by a single organization comprising
multiple consumers (e.g., business units). It may be owned, managed, and operated by the organization, a
third party, or some combination of them, and it may exist on or off premises.
Community cloud. The cloud infrastructure is provisioned for exclusive use by a specific community of
consumers from organizations that have shared concerns (e.g., mission, security requirements, policy, and
compliance considerations). It may be owned, managed, and operated by one or more of the organizations
in the community, a third party, or some combination of them, and it may exist on or off premises.
Public cloud. The cloud infrastructure is provisioned for open use by the public. It may be owned,
managed, and operated by a business, academic, or government organization, or some combination of
them. It exists on the premises of the cloud provider.
Hybrid cloud. The cloud infrastructure is a composition of two or more distinct cloud infrastructures
(private, community, or public) that remain unique entities, but are bound together by standardized or
proprietary technology that enables data and application portability (e.g., cloud bursting for load balancing
between clouds).
1. Usability: All loud storage ser i es re ie ed i this topi ha e desktop folders for Ma ’s a d PCs. This
allows users to drag and drop files between the cloud storage and their local storage.
2. Bandwidth: You can avoid emailing files to individuals and instead send a web link to recipients through
your email.
3. Accessibility: Stored files can be accessed from anywhere via an Internet connection.
4. Disaster Recovery: It is highly recommended that businesses have an emergency backup plan ready in
the case of an emergency. Cloud storage can be used as a backup plan by businesses by providing a second
copy of important files. These files are stored at a remote location and can be accessed through an internet
connection.
5. Cost Savings: Businesses and organizations can often reduce annual operating costs by using cloud
storage; cloud storage costs about 3 cents per gigabyte to store data internally. Users can see additional
cost savings because it does not require internal power to store information remotely.
1. Usability: Be careful when using drag/drop to move a document into the cloud storage folder. This will
permanently move your document from its original folder to the cloud storage location.
2. Bandwidth: Several cloud storage services have a specific bandwidth allowance. If an organization
surpasses the given allowance, the additional charges could be significant. However, some providers allow
unlimited bandwidth. This is a factor that companies should consider when looking at a cloud storage
provider.
3. Accessibility: If you have no internet connection, you have no access to your data.
4. Data Security: There are concerns about the safety and privacy of important data stored remotely. The
possibility of private data commingling with other organizations makes some businesses uneasy.
5. Software: If ou a t to e a le to a ipulate our files lo all through ultiple de i es, ou’ll eed to
download the service on all devices.
11
References: -
1. http://www.sitesbay.com/cpp/cpp-function
2. https://www.tutorialspoint.com/cplusplus/cpp_pointers.htm
3. http://www.cplusplus.com/doc/tutorial/
4. http://www.studytonight.com/cpp/class-and-objects.php
12