Adbms Unit 1
Adbms Unit 1
Adbms Unit 1
3. Middleware architecture.
There is still plenty of hard, brain-twisting, arm-twisting work ahead to get this
next generation of technologies into and aligned with organizations. “We are
on the cusp of an unprecedented intelligence revolution, and a lot of the
enabling technologies—cloud, machine learning, artificial intelligence, real
time databases, next-generation memory technologies—are already
available,” said Leena Joshi, VP of product marketing at Redis Labs. “What is
needed is for enterprises to develop stacks that can tie all the piece parts
together without generating layers of additional complexity.” This, more than
anything, describes the job of data managers in the year 2018.
Here are key developments that need to top data managers’ to-do lists in
terms of technology focus this year:
Pilkington urges data managers to move away from the self-service goal and
work toward more collaborative “team-based, enterprise data preparation and
analytics.” Such collaboration “will create a data-driven culture by bringing
analysts together for the common purpose of getting answers—answers that
are founded in the cross-business insights necessary to profoundly impact
operational processes and the bottom line. Teams will be able to create, find,
access, validate, and share governed, trustworthy datasets and models for
true enterprise collaboration and faster, more strategic decision making.
VIRTUAL ASSISTANTS
Another technology development that is fueled by data is the rise of virtual
assistants. The cutting-edge web companies are employing this type of
solution, and it is coming to mainstream enterprises as well. Google, for
example, is thriving with its Google Now virtual assistant, “which is only
getting smarter because of its ability to use available data from web
interactions to provide a personal experience for users,” observed Luc
Burgelman, CEO of NGDATA.
The most important part of creating virtual assistants will be the data and
having the data drive actions and decisions, Burgelman noted. “This means
considering all data—including real-time and behavioral data—and learning
from all channels to create connected experiences customers expect.
Powering these customer interactions through the understanding of all this
detail will be critical for companies.”
CLOUD ADVANCES
Cloud computing, which has been a major force in the IT and data
management space for close to a decade, continues to reshape database
technologies as well. Cloud is increasingly the home of “systems of insight”
that support advanced data analytics and artificial intelligence capabilities,
said Roman Stanek, CEO and founder at GoodData. In Stanek’s view, a
“unified technology platform in the cloud is the future of analytics and data in
the cloud.” Data in the cloud is growing rapidly, and there is no way to
manage that other than through a system of insight, he added. The industry is
facing a confluence of trends, he noted. These include data growing
exponentially and old BI failing, while advances in BI such as machine
learning and predictive analytics make it ripe to take off.
Not only will there be systems of insight in the cloud, but multiple clouds for
multiple use cases as well. Lately, there’s been movement to multi-cloud
strategies, especially as more applications and innovations open up. “Most
companies don’t set out to adopt a multi-cloud strategy,” said Jaspreet Singh,
CEO and founder of Druva. “Rather, they choose to work with cloud vendors
for specific use cases, and when we take a step back, we see a multi-cloud
implementation. In that regard, multi-cloud is not a strategy, it’s an outcome of
these decisions.
LATENCY BUSTERS
The move toward real-time computing and real-time enterprises is also
shaping the database technology landscape this year. At the same time, many
of the technologies with which data management teams are working may add
more latency into transactions and computing jobs. “While moving to real-time
is a trend, it competes directly with the move to microservices, distributed
logs, and asynchronous stream processing,” said John Hugg, founding
engineer and manager of developer outreach at VoltDB. “All of these things
can make our systems more resilient and dynamic, but they often compound
latency problems. Things that used to be a single network round trip might
become dozens of asynchronous network messages.”
Nowhere is the need for real-time and reduced latency felt more strongly than
in efforts to leverage the Internet of Things (IoT). Capturing data in real time,
tied to IoT, can be effective only with systems capable of cost-effectively
handling large data volumes with very low latencies, said Joshi of Redis Labs.
“Being able to implement adaptive applications powered by machine learning
in real time is a critical aspiration for most enterprises, but real-time databases
that can power such applications with built-in capabilities are most likely to
make these aspirations a reality.” Joshi added that another critical force in
making the data-driven enterprise a reality is the shift in hardware technology,
which puts more cost-effective memory such as flash within reach of
applications. “Datasets that can deliver the real-time performance of memory
but with the cost-effectiveness of flash are likely to create a competitive edge
for enterprise,” she said.
Metadata is also key to the success of AI, as well. “When AI can be leveraged
to automatically and accurately append metadata attributes to information, the
whole game changes,” said Greg Milliken, senior VP of marketing for M-Files.
“AI can automatically evaluate the file contents for specific terms like a
customer name, project, or case as well as the type or class of document—a
contract, invoice, project plan, financial report—and then apply those
metadata attributes to the file. This automatically initiates workflow processes
and establishes access permissions, so only authorized people can access
the information—such as the project team, the HR department, or those
managing a specific case.” The result, Milliken continued, “is a more intelligent
and streamlined information environment that not only ensures consistency in
how content is organized, but also that information is intelligently linked to
other relevant data, content, and processes to deliver a 360-degree view of
structured data and unstructured content residing in different business
systems.”
Hadoop “does enable a lot of tools which are focused on streaming and it also
enables quicker access to the core insights on large datasets which is not
really possible or would mean a long wait on more traditional technologies,
said Concannon. “This, to me, is all about making more data available at
decision time.”
Introduction to PL/SQL
PL/SQL Database Objects
Proced ures in PL/SQL
PL/SQL is a block-structured language that enables developers to
combine the power of SQL with procedural statements.
A stored procedure in PL/SQL is nothing but a series of declarative
SQL statements which can be stored in the database catalogue. A
procedure can be thought of as a function or a method. They can
be invoked through triggers, other procedures, or applications on
Java, PHP etc.
All the statements of a block are passed to Oracle engine all at
once which increases processing speed and decreases the traffic.
Advantages:
• They result in performance improvement of the application. If a
procedure is being called frequently in an application in a single
connection, then the compiled version of the procedure is
delivered.
• They reduce the traffic between the database and the
application, since the lengthy statements are already fed into
the database and need not be sent again and again via the
application.
• They add to code reusability, similar to how functions and
methods work in other languages such as C/C++ and Java.
Disadvantages:
• Stored procedures can cause a lot of memory usage. The
database administrator should decide an upper bound as to
how many stored procedures are feasible for a particular
application.
• MySQL does not provide the functionality of debugging the
stored procedures.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Comments --
AS
BEGIN
-- Query --
END
GO
Example:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Comments --
AS
BEGIN
-- Query --
END
GO
Example:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Example:
DROP PROCEDURE GetStudentDetails
Functions in PL/SQL
A function can be used as a part of SQL expression i.e. we can use
them with select/update/merge commands. One most important
characteristic of a function is that unlike procedures, it must return
a value.
Syntax to create a function:
CREATE [OR REPLACE] FUNCTION function_name
[(parameter_name type [, ...])]
BEGIN
// program code
[EXCEPTION
exception_section;
END [function_name];
Advantages:
1. We can make a single call to the database to run a block of
statements thus it improves the performance against running
SQL multiple times. This will reduce the number of calls
between the database and the application.
2. We can divide the overall work into small modules which
becomes quite manageable also enhancing the readability of
the code.
3. It promotes reusability.
4. It is secure since the code stays inside the database thus
hiding internal database details from the application(user). The
user only makes a call to the PL/SQL functions. Hence security
and data hiding is ensured.
Packages in PL/SQL
•
•
1. Embedded SQL
2. Dynamic SQL
Em bed d ed SQL
Embedded SQL is a method of inserting inline SQL statements
or queries into the code of a programming language, which is
known as a host language. Because the host language cannot
parse SQL, the inserted SQL is parsed by an embedded SQL pre-
processor.
Dynamic SQL
Dynamic Structured Query Language (SQL) is a SQL version that
facilitates the generation of dynamic (or variable) program
queries. Dynamic SQL allows a programmer to write code that
automatically adjusts to varying databases, environments, servers
or variables.
ODBC Standard
Open Database Connectivity (ODBC) is an interface standard for
accessing data and communicating with database systems,
regardless of the operating system (OS), database system (DS) or
programming language. This is accomplished by using ODBC
drivers that serve as a bridge between applications and database
systems.
In 1992, a group of manufacturers introduced the ODBC model as
a communications solution for the large number of OSs, DSs and
applications written in different programming languages. For
example, an application written in C to access an Oracle
database in UNIX had to be rewritten if the application changed to
Windows, or if the database platform was moved to Sybase.
These manufacturers recognized the need for an intermediate
translation mechanism and created a set of protocols and
application programming interfaces (APIs), which was the first
ODBC model.
Advantages:
• Simple implementation
• Establishes effective communication between processors through
single memory addresses space.
• Above point leads to less communication overhead.
Disadvantages:
Advantages:
• Failure of any processors would not stop the entire system (Fault
tolerance)
• Interconnection to the memory is not a bottleneck. (It was bottleneck in
Shared Memory architecture)
• Support larger number of processors (when compared to Shared
Memory architecture)
Disadvantages:
In Shared Nothing architecture, every processor has its own memory and
disk setup. This setup may be considered as set of individual computers
connected through high speed interconnection network using regular
network protocols and switches for example to share data between
computers. (This architecture is used in the Distributed Database System).
In Shared Nothing parallel database system implementation, we insist the
use of similar nodes that are Homogenous systems. (In distributed database
System we may use Heterogeneous nodes)
Advantages:
Disadvantages:
• Non-local disk accesses are costly. That is, if one server receives the
request. If the required data not available, it must be routed to the
server where the data is available. It is slightly complex.
• Communication cost involved in transporting data among computers.
Storage Manager
QUERY PROCESSOR
A query processor is one of the major components of a relational database or an
electronic database in which data is stored in tables of rows and columns. It
complements the storage engine, which writes and reads data to and from storage
media.
Basic Operation
A user, or an applications program, interacts with the query processor and the query
processor, in turn interacts with the storage engine. Essentially, the query processor
receives an instruction or instructions written in Structured Query Language (SQL),
chooses a plan for executing the instructions and carries out the plan.
Optimization
The SQL syntax is transformed into a series of operations that can be performed on
data and its indices. The raw query plan, as it is known, is optimized to make it more
efficient before it is executed.
Separation
Effectively, a user specifies the result that he or she wants to achieve and the query
processor determines how the result is achieved. In this way, the query processor
separates the user from the unnecessary details of how a query is executed.