0% found this document useful (0 votes)
5 views

1940PostgreSQL Development Essentials 1st Edition Kaur pdf download

The document provides information about the book 'PostgreSQL Development Essentials' by Manpreet Kaur and Baji Shaik, which focuses on developing programmatic functions for database applications. It includes details about the authors, their backgrounds, and the structure of the book, which covers various advanced topics in PostgreSQL. Additionally, it offers links to other related eBooks and resources available for download.

Uploaded by

ekartrauckr9
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

1940PostgreSQL Development Essentials 1st Edition Kaur pdf download

The document provides information about the book 'PostgreSQL Development Essentials' by Manpreet Kaur and Baji Shaik, which focuses on developing programmatic functions for database applications. It includes details about the authors, their backgrounds, and the structure of the book, which covers various advanced topics in PostgreSQL. Additionally, it offers links to other related eBooks and resources available for download.

Uploaded by

ekartrauckr9
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

PostgreSQL Development Essentials 1st Edition

Kaur pdf download

https://ebookname.com/product/postgresql-development-
essentials-1st-edition-kaur/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Game Development Essentials An Introduction 3rd Edition


Jeannie Novak

https://ebookname.com/product/game-development-essentials-an-
introduction-3rd-edition-jeannie-novak/

PostgreSQL High Availability Cookbook 2nd Edition Shaun


M. Thomas

https://ebookname.com/product/postgresql-high-availability-
cookbook-2nd-edition-shaun-m-thomas/

Marmalade SDK Mobile Game Development Essentials 1st


New edition Edition Sean Scaplehorn

https://ebookname.com/product/marmalade-sdk-mobile-game-
development-essentials-1st-new-edition-edition-sean-scaplehorn/

The First World War Geoffrey Jukes

https://ebookname.com/product/the-first-world-war-geoffrey-jukes/
Film Form and Culture 2002nd Edition Robert Kolker

https://ebookname.com/product/film-form-and-culture-2002nd-
edition-robert-kolker/

Fix Your Supply Chain How to Create a Sustainable Lean


Improvement Roadmap 1st Edition Paul Husby

https://ebookname.com/product/fix-your-supply-chain-how-to-
create-a-sustainable-lean-improvement-roadmap-1st-edition-paul-
husby/

RESTful Java with JAX RS 2 0 Second Edition Bill Burke

https://ebookname.com/product/restful-java-with-jax-
rs-2-0-second-edition-bill-burke/

The Crystal Bible Judy H Hall Et El

https://ebookname.com/product/the-crystal-bible-judy-h-hall-et-
el/

New Testament Apocrypha Vol 2 Writings Relating to the


Apostles Apocalypses and Related Subjects Wilhelm
Schneemelcher (Ed.)

https://ebookname.com/product/new-testament-apocrypha-
vol-2-writings-relating-to-the-apostles-apocalypses-and-related-
subjects-wilhelm-schneemelcher-ed/
Glencoe Science Modules Life Science Life s Structure
and Function Student Edition Glencoe Mcgraw-Hill

https://ebookname.com/product/glencoe-science-modules-life-
science-life-s-structure-and-function-student-edition-glencoe-
mcgraw-hill/
PostgreSQL Development
Essentials

Develop programmatic functions to create powerful database


applications

Manpreet Kaur
Baji Shaik

BIRMINGHAM - MUMBAI
PostgreSQL Development Essentials
Copyright © 2016 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the authors, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: September 2016

Production reference: 1200916

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.

ISBN 978-1-78398-900-3
www.packtpub.com
Credits

Authors Copy Editor

Manpreet Kaur Zainab Bootwala

Baji Shaik

Reviewers Project Coordinator

Daniel Durante Izzat Contractor

Danny Sauer

Commissioning Editor Proofreader

Julian Ursell Safis Editing

Acquisition Editor Indexer

Nitin Dasan Rekha Nair

Content Development Editor Graphics

Anish Sukumaran Jason Monteiro

Technical Editor Production Coordinator

Sunith Shetty Aparna Bhagat


About the Authors
Manpreet Kaur currently works as a business intelligence solution developer at an IT-based
MNC in Chandigarh. She has over 7 years of work experience in the field of developing
successful analytical solutions in data warehousing, analytics and reporting, and portal and
dashboard development in the PostgreSQL and Oracle databases. She has worked on
business intelligence tools such as Noetix, SSRS, Tableau, and OBIEE. She has a good
understanding of ETL tools such as Informatica and Oracle Data Integrator (ODI).
Currently, she works on analytical solutions using Hadoop and OBIEE 12c.

Additionally, she is very creative and enjoys oil painting. She also has a youtube channel,
Oh so homemade, where she posts easy ways to make recycled crafts.

Baji Shaik is a database administrator and developer. He is currently working as a database


consultant at OpenSCG. He has an engineering degree in telecommunications, and he
started his career as a C# and Java developer. He started working with databases in 2011
and, over the years, he has worked with Oracle, PostgreSQL, and Greenplum. His
background spans a wide depth and breadth of expertise and experience in SQL/NoSQL
database technologies. He has architectured and designed many successful database
solutions addressing challenging business requirements. He has provided solutions using
PostgreSQL for reporting, business intelligence, data warehousing, applications, and
development support. He has a good knowledge of automation, orchestration, and DevOps
in a cloud environment.

He comes from a small village named Vutukutu in Andhra Pradesh and currently lives in
Hyderabad. He likes to watch movies, read books, and write technical blogs. He loves to
spend time with family. He has tech-reviewed Troubleshooting PostgreSQL by Packt
Publishing. He is a certified PostgreSQL professional.

Thanks to my loving parents. Thanks to Packt Publishing for giving me this opportunity.
Special thanks to Izzat Contractor for choosing me, and Anish Sukumaran, Nitin Dasan,
and Sunith Shetty for working with me. Thanks to Dinesh Kumar for helping me write.
About the Reviewers
Daniel Durante started spending time with computers at the age of 12. He has built
applications for various sectors, such as the medical industry, universities, the
manufacturing industry, and the open source community. He mainly uses Golang, C, Node,
or PHP for developing web applications, frameworks, tools, embedded systems, and so
on. Some of his personal work can be found on GitHub and his personal website.

He has also worked on the PostgreSQL Developer's Guide, published by Packt Publishing.

I would like to thank my parents, brother, and friends, who’ve all put up with my insanity,
day in and day out. I would not be here today if it weren’t for their patience, guidance, and
love.

Danny Sauer has been a Linux sysadmin, software developer, security engineer, open
source advocate, and general computer geek at various companies for around 20 years. He
has administered, used, and programmed PostgreSQL for over half of that time. When he's
not building solutions in the digital world, he and his wife enjoy restoring their antique
home and teaching old cars new tricks.
www.PacktPub.com
eBooks, discount offers, and more
Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a
print book customer, you are entitled to a discount on the eBook copy. Get in touch with us
at customercare@packtpub.com for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and
eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book
library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Table of Contents
Preface 1
Chapter 1: Advanced SQL 5
Creating views 5
Deleting and replacing views 7
Materialized views 8
Why materialized views? 8
Read-only, updatable, and writeable materialized views 8
Read-only materialized views 9
Updatable materialized views 9
Writeable materialized views 10
Creating cursors 10
Using cursors 11
Closing a cursor 12
Using the GROUP BY clause 12
Using the HAVING clause 14
Parameters or arguments 14
Using the UPDATE operation clauses 15
Using the LIMIT clause 15
Using subqueries 16
Subqueries that return multiple rows 18
Correlated subqueries 18
Existence subqueries 19
Parameters or arguments 19
Using the Union join 20
Using the Self join 21
Using the Outer join 22
Left outer join 23
Right outer join 24
Full outer join 24
Summary 26
Chapter 2: Data Manipulation 27
Conversion between datatypes 27
Introduction to arrays 28
Array constructors 28
String_to_array() 31
Array_dims( ) 32
ARRAY_AGG() 32
ARRAY_UPPER() 34
Array_length() 34
Array slicing and splicing 34
UNNESTing arrays to rows 35
Introduction to JSON 37
Inserting JSON data in PostgreSQL 37
Querying JSON 38
Equality operation 38
Containment 38
Key/element existence 39
Outputting JSON 40
Using XML in PostgreSQL 41
Inserting XML data in PostgreSQL 41
Querying XML data 42
Composite datatype 42
Creating composite types in PostgreSQL 42
Altering composite types in PostgreSQL 44
Dropping composite types in PostgreSQL 45
Summary 45
Chapter 3: Triggers 46
Introduction to triggers 46
Adding triggers to PostgreSQL 47
Modifying triggers in PostgreSQL 52
Removing a trigger function 53
Creating a trigger function 54
Testing the trigger function 55
Viewing existing triggers 56
Summary 57
Chapter 4: Understanding Database Design Concepts 58
Basic design rules 58
The ability to solve the problem 58
The ability to hold the required data 59
The ability to support relationships 59
The ability to impose data integrity 59
The ability to impose data efficiency 59
The ability to accommodate future changes 59
Normalization 60
Anomalies in DBMS 60

[ ii ]
First normal form 62
Second normal form 62
Third normal form 63
Common patterns 64
Many-to-many relationships 64
Hierarchy 65
Recursive relationships 66
Summary 67
Chapter 5: Transactions and Locking 68
Defining transactions 68
ACID rules 69
Effect of concurrency on transactions 70
Transactions and savepoints 70
Transaction isolation 71
Implementing isolation levels 72
Dirty reads 72
Non-repeatable reads 73
Phantom reads 74
ANSI isolation levels 74
Transaction isolation levels 75
Changing the isolation level 75
Using explicit and implicit transactions 76
Avoiding deadlocks 76
Explicit locking 77
Locking rows 77
Locking tables 78
Summary 79
Chapter 6: Indexes and Constraints 81
Introduction to indexes and constraints 81
Primary key indexes 82
Unique indexes 83
B-tree indexes 84
Standard indexes 85
Full text indexes 86
Partial indexes 86
Multicolumn indexes 88
Hash indexes 89
GIN and GiST indexes 89
Clustering on an index 90
Foreign key constraints 91

[ iii ]
Unique constraints 92
Check constraints 94
NOT NULL constraints 95
Exclusion constraints 96
Summary 96
Chapter 7: Table Partitioning 97
Table partitioning 97
Partition implementation 102
Partitioning types 107
List partition 107
Managing partitions 109
Adding a new partition 109
Purging an old partition 110
Alternate partitioning methods 111
Method 1 111
Method 2 112
Constraint exclusion 114
Horizontal partitioning 116
PL/Proxy 117
Foreign inheritance 118
Summary 121
Chapter 8: Query Tuning and Optimization 122
Query tuning 122
Hot versus cold cache 123
Cleaning the cache 124
pg_buffercache 127
pg_prewarm 129
Optimizer settings for cached data 130
Multiple ways to implement a query 132
Bad query performance with stale statistics 134
Optimizer hints 136
Explain Plan 141
Generating and reading the Explain Plan 141
Simple example 142
More complex example 142
Query operators 143
Seq Scan 143
Index Scan 143
Sort 144
Unique 144

[ iv ]
LIMIT 144
Aggregate 144
Append 144
Result 144
Nested Loop 145
Merge Join 145
Hash and Hash Join 145
Group 145
Subquery Scan and Subplan 145
Tid Scan 145
Materialize 146
Setop 146
Summary 146
Chapter 9: PostgreSQL Extensions and Large Object Support 147
Creating an extension 147
Compiling extensions 149
Database links in PostgreSQL 150
Using binary large objects 153
Creating a large object 154
Importing a large object 154
Exporting a large object 155
Writing data to a large object 155
Server-side functions 155
Summary 156
Chapter 10: Using PHP in PostgreSQL 157
Postgres with PHP 157
PHP-to-PostgreSQL connections 158
Dealing with DDLs 161
DML operations 162
pg_query_params 163
pg_insert 164
Data retrieval 165
pg_fetch_all 165
pg_fetch_assoc 166
pg_fetch_result 167
Helper functions to deal with data fetching 168
pg_free_results 168
pg_num_rows 168

[v]
pg_num_fields 168
pg_field_name 168
pg_meta_data 168
pg_convert 169
UPDATE 171
DELETE 172
COPY 172
Summary 174
Chapter 11: Using Java in PostgreSQL 175
Making database connections to PostgreSQL using Java 175
Using Java to create a PostgreSQL table 178
Using Java to insert records into a PostgreSQL table 179
Using Java to update records into a PostgreSQL table 180
Using Java to delete records into a PostgreSQL table 181
Catching exceptions 182
Using prepared statements 184
Loading data using COPY 184
Connection properties 186
Summary 187
Index 188

[ vi ]
Preface
The purpose of this book is to teach you the fundamental practices and techniques of
database developers for programming database applications with PostgreSQL. It is targeted
to database developers using PostgreSQL who have basic experience developing database
applications with the system, but want a deeper understanding of how to implement
programmatic functions with PostgreSQL.

What this book covers


Chapter 1, Advanced SQL, aims to help you understand advanced SQL topics such as views,
materialized views, and cursors and will be able to get a sound understanding of complex
topics such as subqueries and joins.

Chapter 2, Data Manipulation, provides you the ability to perform data type conversions
and perform JSON and XML operations in PostgreSQL.

Chapter 3, Triggers, explains how to perform trigger operations and use trigger functions in
PostgreSQL.

Chapter 4, Understanding Database Design Concepts, explains data modeling and


normalization concepts. The reader will then be able to efficiently create a robust database
design.

Chapter 5, Transactions and Locking, covers the effect of transactions and locking on the
database.The reader will also be able to understand isolation levels and understand multi-
version concurrency control behavior.

Chapter 6, Indexes And Constraints, provides knowledge about the different indexes and
constraints available in PostgreSQL. This knowledge will help the reader while coding and
the reader will be in a better position to choose among the different indexes and constraints
depending upon the requirement during the coding phase.

Chapter 7, Table Partitioning, gives the reader a better understanding of partitioning in


PostgreSQL. The reader will be able to use the different partitioning methods available in
PostgreSQL and also implement horizontal partitioning using PL/Proxy.
Preface

Chapter 8, Query Tuning and Optimization, provides knowledge about different mechanisms
and approaches available to tune a query. The reader will be able to utilize this knowledge
in order to write a optimal/efficient query or code.

Chapter 9, PostgreSQL Extensions and Large Object Support, will familiarize the reader with
the concept of extensions in PostgreSQL and also with the usage of large objects' datatypes
in PostgreSQL.

Chapter 10, Using PHP in PostgreSQL, covers the basics of performing database operations
in PostgreSQL using the PHP language, which helps reader to start with PHP code.

Chapter 11, Using Java in PostgreSQL, this chapter provides knowledge about database
connectivity using Java and creating/modifying objects using Java code. It also talks about
JDBC drivers.

What you need for this book


You need PostgreSQL 9.4 or higher to be installed on your machine to test the codes
provided in the book. As this covers Java and PHP, you need Java and PHP binaries
installed on your machine. All other tools covered in this book have installation procedures
included, so there's no need to install them before you start reading the book.

Who this book is for


This book is mainly for PostgreSQL developers who want to develop applications using
programming languages. It is also useful for tuning databases through query optimization,
indexing, and partitioning.

Conventions
In this book, you will find a number of text styles that distinguish between different kinds
of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Database
views are created using the CREATE VIEW statement. "

[2]
Preface

A block of code is set as follows:


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;

Any command-line input or output is written as follows:


CREATE VIEW view_name AS
SELECT column1, column2
FROM table_name
WHERE [condition];

New terms and important words are shown in bold.

Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or disliked. Reader feedback is important for us as it helps us
develop titles that you will really get the most out of. To send us general feedback, simply
e-mail feedback@packtpub.com, and mention the book's title in the subject of your
message. If there is a topic that you have expertise in and you are interested in either
writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you
to get the most from your purchase.

[3]
Preface

Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-
we would be grateful if you could report this to us. By doing so, you can save other readers
from frustration and help us improve subsequent versions of this book. If you find any
errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting
your book, clicking on the Errata Submission Form link, and entering the details of your
errata. Once your errata are verified, your submission will be accepted and the errata will
be uploaded to our website or added to any list of existing errata under the Errata section of
that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/conten


t/support and enter the name of the book in the search field. The required information will
appear under the Errata section.

Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At
Packt, we take the protection of our copyright and licenses very seriously. If you come
across any illegal copies of our works in any form on the Internet, please provide us with
the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated


material.

We appreciate your help in protecting our authors and our ability to bring you valuable
content.

Questions
If you have a problem with any aspect of this book, you can contact us
at questions@packtpub.com, and we will do our best to address the problem.

[4]
Advanced SQL
1
This book is all about an open source software product, a relational database called
PostgreSQL. PostgreSQL is an advanced SQL database server, available on a wide range of
platforms. The purpose of this book is to teach database developers the fundamental
practices and techniques to program database applications with PostgreSQL.

In this chapter, we will discuss the following advanced SQL topics:

Creating views
Understanding materialized views
Creating cursors
Using the GROUP BY clause
Using the HAVING clause
Understanding complex topics such as subqueries and joins

Creating views
A view is a virtual table based on the result set of an SQL statement. Just like a real table, a
view consist of rows and columns. The fields in a view are from one or more real tables in
the database. Generally speaking, a table has a set of definitions that physically stores data.
A view also has a set of definitions built on top of table(s) or other view(s) that does not
physically store data. The purpose of creating views is to make sure that the user does not
have access to all the data and is being restricted through a view. Also, it's better to create a
view if we have a query based on multiple tables so that we can use it straightaway rather
than writing a whole PSQL again and again.

Database views are created using the CREATE VIEW statement. Views can be created from a
single table or multiple tables, or another view.
Advanced SQL

The basic CREATEVIEW syntax is as follows:


CREATE VIEW view_name AS
SELECT column1, column2
FROM table_name
WHERE [condition];

Let's take a look at each of these commands:

CREATE VIEW: This command helps create the database's view.


SELECT: This command helps you select the physical and virtual columns that
you want as part of the view.
FROM: This command gives the table names with an alias from where we can fetch
the columns. This may include one or more table names, considering you have to
create a view at the top of multiple tables.
WHERE: This command provides a condition that will restrict the data for a view.
Also, if you include multiple tables in the FROM clause, you can provide the
joining condition under the WHERE clause.

You can then query this view as though it were a table. (In PostgreSQL, at the time of
writing, views are read-only by default.) You can SELECT data from a view just as you
would from a table and join it to other tables; you can also use WHERE clauses. Each time
you execute a SELECT query using the view, the data is rebuilt, so it is always up-to-date. It
is not a frozen copy stored at the time the view was created.

Let's create a view on supplier and order tables. But, before that, let's see what the structure
of the suppliers and orders table is:
CREATE TABLE suppliers
(supplier_id number primary key,
Supplier_name varchar(30),
Phone_number number);
CREATE TABLE orders
(order_number number primary key,
Supplier_id number references suppliers(supplier_id),
Quanity number,
Is_active varchar(10),
Price number);
CREATE VIEW active_supplier_orders AS
SELECT suppliers.supplier_id, suppliers.supplier_name orders.quantity,
orders.price
FROM suppliers
INNER JOIN orders
ON suppliers.supplier_id = orders.supplier_id
WHERE suppliers.supplier_name = 'XYZ COMPANY'

[6]
Advanced SQL

And orders.active='TRUE';

The preceding example will create a virtual table based on the result set of the SELECT
statement. You can now query the PostgreSQL VIEW as follows:
SELECT * FROM active_supplier_orders;

Deleting and replacing views


To delete a view, simply use the DROP VIEW statement with view_name. The basic
DROPVIEW syntax is as follows:

DROP VIEW IF EXISTS view_name;

If you want to replace an existing view with one that has the same name and returns the
same set of columns, you can use a CREATE OR REPLACE command.

The following is the syntax to modify an existing view:


CREATE OR REPLACE VIEW view_name AS
SELECT column_name(s)
FROM table_name(s)
WHERE condition;

Let's take a look at each of these commands:

CREATE OR REPLACE VIEW: This command helps modify the existing view.
SELECT: This command selects the columns that you want as part of the view.
FROM: This command gives the table name from where we can fetch the columns.
This may include one or more table names, since you have to create a view at the
top of multiple tables.
WHERE: This command provides the condition to restrict the data for a view. Also,
if you include multiple tables in the FROM clause, you can provide the joining
condition under the WHERE clause.

Let's modify a view, supplier_orders, by adding some more columns in the view. The
view was originally based on supplier and order tables having supplier_id,
supplier_name, quantity, and price. Let's also add order_number in the view.

CREATE OR REPLACE VIEW active_supplier_orders AS


SELECT suppliers.supplier_id, suppliers.supplier_name orders.quantity,
orders.price,order. order_number
FROM suppliers

[7]
Advanced SQL

INNER JOIN orders


ON suppliers.supplier_id = orders.supplier_id
WHERE suppliers.supplier_name = 'XYZ COMPANY'
And orders.active='TRUE';;

Materialized views
A materialized view is a table that actually contains rows but behaves like a view. This has
been added in the PostgreSQL 9.3 version. A materialized view cannot subsequently be
directly updated, and the query used to create the materialized view is stored in exactly the
same way as the view's query is stored. As it holds the actual data, it occupies space as per
the filters that we applied while creating the materialized view.

Why materialized views?


Before we get too deep into how to implement materialized views, let's first examine why
we may want to use materialized views.

You may notice that certain queries are very slow. You may have exhausted all the
techniques in the standard bag of techniques to speed up those queries. In the end, you will
realize that getting queries to run as fast as you want simply isn't possible without
completely restructuring the data.

Now, if you have an environment where you run the same type of SELECT query multiple
times against the same set of tables, then you can create a materialized view for SELECT so
that, on every run, this view does not go to the actual tables to fetch the data, which will
obviously reduce the load on them as you might be running a Data Manipulation
Language (DML) against your actual tables at the same time. So, basically, you take a view
and turn it into a real table that holds real data rather than a gateway to a SELECT query.

Read-only, updatable, and writeable materialized views


A materialized view can be read-only, updatable, or writeable. Users cannot perform DML
statements on read-only materialized views, but they can perform them on updatable and
writeable materialized views.

[8]
Advanced SQL

Read-only materialized views


You can make a materialized view read-only during creation by omitting the FOR UPDATE
clause or by disabling the equivalent option in the database management tool. Read-only
materialized views use many mechanisms similar to updatable materialized views, except
they do not need to belong to a materialized view group.

In a replication environment, a materialized table holds the table data and resides in a
different database. A table that has a materialized view on it is called a master table. The
master table resides on a master site and the materialized view resides on a materialized-
view site.

In addition, using read-only materialized views eliminates the possibility of introducing


data conflicts on the master site or the master materialized view site, although this
convenience means that updates cannot be made on the remote materialized view site.

The syntax to create a materialized view is as follows:


CREATE MATERIALIZED VIEW view_name AS SELECT columns FROM table;

The CREATE MATERIALIZED VIEW command helps us create a materialized view. The
command acts in way similar to the CREATE VIEW command, which was explained in the
previous section.

Let's make a read-only materialized view for a supplier table:


CREATE MATERIALIZED VIEW suppliers_matview AS
SELECT * FROM suppliers;

This view is a read-only materialized view and will not reflect the changes to the master
site.

Updatable materialized views


You can make a materialized view updatable during creation by including the FOR UPDATE
clause or enabling the equivalent option in the database management tool. In order for
changes that have been made to an updatable materialized view to be reflected in the
master site during refresh, the updatable materialized view must belong to a materialized
view group.

When we say “refreshing the materialized view,” we mean synchronizing the data in the
materialized view with data in its master table.

[9]
Advanced SQL

An updatable materialized view enables you to decrease the load on master sites because
users can make changes to data on the materialized view site.

The syntax to create an updatable materialized view is as follows:


CREATE MATERIALIZED VIEW view_name FOR UPDATE
AS
SELECT columns FROM table;

Let's make an updatable materialized view for a supplier table:


CREATE MATERIALIZED VIEW suppliers_matview FOR UPDATE
AS
SELECT * FROM suppliers;

Whenever changes are made in the suppliers_matview clause, it will reflect the changes
to the master sites during refresh.

Writeable materialized views


A writeable materialized view is one that is created using the FOR UPDATE clause like an
updatable materialized view is, but it is not a part of a materialized view group. Users can
perform DML operations on a writeable materialized view; however, if you refresh the
materialized view, then these changes are not pushed back to the master site and are lost in
the materialized view itself. Writeable materialized views are typically allowed wherever
fast-refreshable, read-only materialized views are allowed.

Creating cursors
A cursor in PostgreSQL is a read-only pointer to a fully executed SELECT statement's result
set. Cursors are typically used within applications that maintain a persistent connection to
the PostgreSQL backend. By executing a cursor and maintaining a reference to its returned
result set, an application can more efficiently manage which rows to retrieve from a result
set at different times without re-executing the query with different LIMIT and OFFSET
clauses.

The four SQL commands involved with PostgreSQL cursors are DECLARE, FETCH, MOVE, and
CLOSE.

[ 10 ]
Advanced SQL

The DECLARE command both defines and opens a cursor, in effect defining the cursor in
memory, and then populates the cursor with information about the result set returned from
the executed query. A cursor may be declared only within an existing transaction block, so
you must execute a BEGIN command prior to declaring a cursor.

Here is the syntax for DECLARE:


DECLARE cursorname [ BINARY ] [ INSENSITIVE ] [ SCROLL ] CURSOR FOR query
[ FOR { READ ONLY | UPDATE [ OF column [, ...] ] } ]

DECLARE cursorname is the name of the cursor to create. The optional BINARY keyword
causes the output to be retrieved in binary format instead of standard ASCII; this can be
more efficient, though it is only relevant to custom applications as clients such as psql are
not built to handle anything but text output. The INSENSITIVE and SCROLL keywords exist
to comply with the SQL standard, though they each define PostgreSQL's default behavior
and are never necessary. The INSENSITIVE SQL keyword exists to ensure that all data
retrieved from the cursor remains unchanged from other cursors or connections. As
PostgreSQL requires the cursors to be defined within transaction blocks, this behavior is
already implied. The SCROLL SQL keyword exists to specify that multiple rows at a time
can be selected from the cursor. This is the default in PostgreSQL, even if it is unspecified.

The CURSOR FOR query is the complete query and its result set will be accessible by the
cursor when executed.

The [FOR { READ ONLY | UPDATE [ OF column [, ...] ] } ] cursors may only be
defined as READ ONLY, and the FOR clause is, therefore, superfluous.

Let's begin a transaction block with the BEGIN keyword, and open a cursor named
order_cur with SELECT * FROM orders as its executed select statement:

BEGIN;
DECLARE order_cur CURSOR
FOR SELECT * FROM orders;

Once the cursor is successfully declared, it means that the rows retrieved by the query are
now accessible from the order_cur cursor.

Using cursors
In order to retrieve rows from the open cursor, we need to use the FETCH command. The
MOVE command moves the current location of the cursor within the result set and the CLOSE
command closes the cursor, freeing up any associated memory.

[ 11 ]
Advanced SQL

Here is the syntax for the FETCH SQL command:


FETCH [ FORWARD | BACKWARD]
[ # | ALL | NEXT | PRIOR ]
{ IN | FROM }
cursor

cursor is the name of the cursor from where we can retrieve row data. A cursor always
points to a current position in the executed statement's result set and rows can be retrieved
either ahead of the current location or behind it. The FORWARD and BACKWARD keywords
may be used to specify the direction, though the default is forward. The NEXT keyword (the
default) returns the next single row from the current cursor position. The PRIOR keyword
causes the single row preceding the current cursor position to be returned.

Let's consider an example that fetches the first four rows stored in the result set, pointed to
by the order_cur cursor. As a direction is not specified, FORWARD is implied. It then uses a
FETCH statement with the NEXT keyword to select the fifth row, and then another FETCH
statement with the PRIOR keyword to again select the fourth retrieved row.
FETCH 4 FROM order_cur;

In this case, the first four rows will be fetched.

Closing a cursor
You can use the CLOSE command to explicitly close an open cursor. A cursor can also be
implicitly closed if the transaction block that it resides within is committed with the COMMIT
command, or rolled back with the ROLLBACK command.

Here is the syntax for the CLOSE command, where Cursorname is the name of the cursor
intended to be closed:
CLOSE
Cursorname;

Using the GROUP BY clause


The GROUP BY clause enables you to establish data groups based on columns. The grouping
criterion is defined by the GROUP BY clause, which is followed by the WHERE clause in the
SQL execution path. Following this execution path, the result set rows are grouped based
on like values of grouping columns and the WHERE clause restricts the entries in each group.

[ 12 ]
Exploring the Variety of Random
Documents with Different Content
groups, in low, cool, and even moist places. Its trunk probably attains to 140
feet in height; and the top of its stem is crowned by a gorgeous crest of fan-
shaped leaves, which are employed in the manufacture of straw hats.

CHAPTER VII.

ANIMAL LIFE IN THE PRAIRIES OF THE OLD WORLD:—HERBIVOROUS


ANIMALS.

TO the prodigal Flora of the Tropics, which we shall soon see displaying in
the virgin forests its exuberant fecundity, corresponds a Fauna no less rich,
and marked by a singular variety.
This Fauna offers, especially in the Old World, an impressive character
of power, strength, superior force—I had almost said, majesty. In truth, if
we do calmly compare the mammals and the birds of tropical America with
those which roam the wild plains of Africa, Hindostan, the Indo-Chinese
peninsula, and the great islands of the Indian Ocean, we cannot but
recognize the evident superiority of the latter. The anthropoid Ape, the
enormous Pachyderms, Elephant, Rhinoceros, Hippopotamus, Giraffe, and,
among animals of the same order, the Antelopes, many of which attain the
dimensions of the Horse, belong exclusively to the Eastern Hemisphere.
The genus Camel, represented in Asia by the Bactrian Camel, in Africa by
the Dromedary, is but weakly typified in South America by the Lama, the
Vicuña, and the Alpaca, not inelegant in form, but of a markedly inferior
stature. And what equality is there between the lordly Tiger of the rank
Indian jungles, and the sleek, stealthy Jaguar of the American wilderness?
Or who will venture to compare the so-called “Lion of America,” the Puma
or Cougouar, with the regal quadruped which makes the hot Libyan wastes
re-echo with his terrible roar?
Among the Birds, the Phenicoptera, with its disproportionate legs and
neck, distributed over all the ancient continent below 40° of latitude, and
the Ostrich, properly so called, are much superior in dimensions to their
analogues on the other side of the Atlantic, the American Flamingo and the
Nandou. So do the Eagles and Vultures of Europe, Asia, and Africa prevail
in numbers and force over those of the New World. And the ancient
continent can likewise claim as its own the gigantic Epiornis, the wonderful
“Roc Bird” of the well-known Oriental legend, whose petrified eggs and
some of whose fossil bones have been discovered in Madagascar. It is true,
however, that the greatest of living Raptores, the Condor, inhabits
exclusively the Cordillera of the Andes:—
“Stands solitary, stands immovable
Upon some highest cliff, and rolls his eye,
Clear, constant, unobservant, unabashed,
In the cold light, above the dews of morn.”—(W. S. Landor.)

But the balance is re-established by the Erpetological and Entomological


Fauna of the New World, which can oppose its huge Boas, its Caïmans and
Pythons, to the Crocodiles and Gavials of Africa and Asia; its Crotali and
Trigonocephali to the Najas of India, the Echidnas of the Cape, and the
Cerastes of Egypt and the Sahara; while the Bull Frog of the United States
and the Pipa of Guiana are only found on the banks of the vast lonesome
swamps of the new continent. As far as the Desert World is concerned, in
both hemispheres the legions are innumerable, and their energies
commensurate to the greatness of the continual work of destruction and
purification which they seem destined to accomplish in all tropical
countries.
It is unnecessary to carry any further the parallel between the two
hemispheres. We shall more clearly detect their analogies and differences
by pursuing the study, already opened up in the Steppes and Seas of Sand,
of the principal species proper to the various forms of the Desert, the
different regions and divisions of the Savage World.
Yet I must confess that the difficulties of the study increase with the
extent of the field we are called upon to explore. The Steppes and
Wildernesses of Sand constitute, both in Africa and Asia, regions which are
clearly defined, and the poverty both of their fauna and their flora fixes a
definite limit to the researches of the naturalist. Such is not the case in the
immense countries which now lie before us. Instead of sighing, like
Alexander, for more worlds to conquer, the student of science is ever
deploring the impossibility of exhausting even a single division of the grand
work before him. “Art is long; life is short.” The most industrious among us
can never rise to the full height of his glorious task; must always remain
like a child on the shore of the ocean of truth, and be content with the few
shells his nerveless hand contrives to gather. In the wide regions we are
about to traverse we feel at every step the colossal character of the
enterprise. Every instant their aspect changes; Nature never repeats herself;
their products vary with the latitude, the climate, and the soil. To pass in
review all the trees and plants and flowers which flourish there, all the
animals and peoples which dwell among them, would be nothing less than
to embrace in a vast encyclopædia the description and history of two
organic kingdoms. But such is not the design of the present volume. I have
not undertaken to give an exact picture of nature, which would task to the
uttermost the powers of men of such diverse genius as Humboldt, Owen,
Lyell, Darwin, Tyndall, Hooker, and Ruskin, but to sketch the bold outlines
and more prominent features of the physiognomy of the Desert World, and
not to reproduce its more minute details.
My embarrassment, then, arises less from the multitude and infinite
variety of the objects we have to examine, than from the difficulty of
harmonizing the study with the divisions of this work. How, in fact, can I
establish a positive distinction between the animals of the Prairies or the
Savannahs and those of the Forests, between those of the latter and the
animals proper to the Mountains? For such a purpose it is needful that each
of these forms of the Desert World should possess its peculiar fauna; which
is true only within very narrow limits. In reality, most animals inhabit or
frequent, according to circumstances, sometimes one district, sometimes
another, without its being possible to assign with any amount of precision
their habitual, or simply their occasional, abode.
I shall avail myself, therefore, of the liberty allowed to every writer who
does not design a purely didactical work, by not unnecessarily troubling
myself whether the animals whose organization or characteristics attract our
notice, particularly affect a low or elevated locality, the shady wood or open
plain, the pestilential swamp or the river-watered valley, and by permitting
myself, except in the case of some evident and constant partiality, to place
them where the most eminent observers assure us they are really, if not
exclusively, met with.
On this account, the plains, more or less densely wooded and broken up,
which occupy the greater portion of the African Continent, will readily
furnish us with the opportunity of studying the majority of animals
indigenous to that continent, and, in general, to the entire Tropical zone of
the Old World. In fact, nearly all the genera of Mammals, Birds, and
Reptiles, are there represented by their most characteristic types. Clothed
with a luxuriant vegetation; watered by periodical rains and numerous
streams; intersected by thick masses of forests, groves, and thickets;
relieved from monotonous uniformity by mountain and ravine, by marshes
and lakes of vast extent,—these fields ever exhibit that aspect of busy life
under which we love to represent to ourselves the earth when she first
emerged from the boiling seas of Chaos, when the forces which had seethed
within her bowels for so many thousands of centuries had been tranquillized
by the Divine will, and she was despatched on her mysterious course to be
the theatre of man’s glorious destiny.

During the daytime silence and solitude prevail over the open plains. It is
the hour when most animals seek, under the foliage of the trees, among the
tall rank grasses, in the bosom of the waters or under the surface of the
earth, a shelter against the swift burning arrows of the sun, and repose
immovable in their different lairs. But when the great orb of day sinks
towards the horizon, all Nature seems to awake. More imperious needs
succeed to those of rest and slumber; hunger and thirst stimulate the most
sluggish into exertion. Then the reptile begins to stir in the mud where he
lay embedded; the herbivora return to their fresh pastures, and move
towards the rivers and ponds in whose waters they may slake their thirst;
the carnaria take the same road; they know that in the open plain they will
find victims for their murderous jaws. The Desert is astir with strange
sounds and mysterious voices; the air re-echoes the thousand discordant
cries which ring from the mountains and the rocks; black shadows pass, re-
pass, and flit to and fro, in every direction; terror, rage, agony, voracity, all
these instincts obtain expression in the dreadful concert; it is the orgie of the
appetites, the grand “Witches’ Sabbath” of Nature, whose furious animation
slackens towards the middle of the night, until, at sunrise, the lively accents
and joyous melodies of the birds, and the peaceful pastimes of the other
animals of the day, succeed to the lamentations and sinister invocations of
the prowlers of the darkness.
Hippopotamus and Crocodile of the River Nile.

In the foremost rank of the great animals to which the fauna of Asia and
Africa owes its superiority, I have named the huge Pachyderms,[123] those
mighty colossi which may be regarded as the analogues, in the terrestrial
creation, of the Cetacean giants of the marine creation. The Pachyderms
formed in Cuvier’s system a sufficiently natural order, which modern
systematists have dismembered, and, as I believe, a little arbitrarily. This
order comprised, besides the elephants, the hippopotami, the rhinoceroses,
and the tapirs, all the Porcidæ family, and even the Solidungulates, such as
the horse and ass. In the present work I shall adopt Cuvier’s division. The
elephant is the denizen of the forests where, in a succeeding chapter, we
shall encounter both him and the rhinoceros. But the hippopotamus belongs
incontestably to the fauna of the plain. His name (from the Greek) signifies
“River Horse.” And, indeed, he lives in the rivers, the pools, the deep
marshes; his manners are essentially amphibious. He dives and swims with
a surprising ease and agility, considering the enormous bulk of his body,
and the shortness of his heavy, unwieldy legs. He is able to remain a long
time under water. His colour is a brownish-black, and his proportions, ten to
twelve feet in length, and eight to ten in height. His head is immensely
large; the mouth cavernous in its prodigious width; the teeth immensely
strong, the incisors and canines of the lower jaw being long, and curved
forwards; these canines or tusks sometimes measure more than two feet in
length, and weigh upwards of six pounds each. Those in the upper jaw are
much smaller, and the front teeth are of a moderate size. The broad thick
lips are beset with scattered tufts of short bristles; the small quick eyes are
placed very near the top of the head; the small ears are slightly pointed, and
lined with short thick hair. His food mainly consists of the coarse herbage
that flourishes on the banks of lakes and rivers; but Milne Edwards speaks
of three or four of them standing knee-deep in the water, forming an
irregular line, and pouncing upon the fish brought within their reach by the
rapid currents. At night time they abandon their watery haunts to prowl
among the sugar-cane plantations, the fields of millet and rice, which they
devour with eagerness. Their march is so impetuous, that they break down
every barrier; nothing can resist them.
The hippopotamus is spread over all eastern and southern Africa; is
found in Nubia, Ethiopia, Abyssinia; at the Cape, the Senegal and the
Congo. Both the settlers and the natives of these countries hunt them with
ardour for the sake of the ivory they yield, nor is their flesh despised by a
keen appetite and vigorous stomach. Sometimes they excavate, in the
animal’s ordinary route, a tolerably deep pit, beset with sharp pointed poles,
and concealed by a covering of leafy branches: sometimes, in the shade of
the evening, they lie in ambuscade among the bushes, and aim at his huge
bulk the deadly bullet, as he comes up from the water, labouring and
bellowing. It is necessary to aim well at his head; for the rest of his body is
almost as invulnerable as that of Achilles.
Here is a lively picture from Sir Samuel Baker’s valuable volumes, in
which the hippopotamus is a foremost figure.
“We were towing through high reeds,” he says,[124] “the men invisible,
and the rope mowing over the high tops of the grass, when the noise
disturbed a hippopotamus from his slumber, and he was immediately
perceived close to the boat. He was about half-grown, and in an instant
about twenty men jumped into the water in search of him, thinking him a
mere baby; but as he suddenly appeared, and was about three times as large
as they had expected, they were not very eager to close. However the reis
pluckily led the way, and seized him by the hind leg, when the crowd of
men rushed in, and we had a grand tussle. Ropes were thrown from the
vessel, and nooses were quickly slipped over his head; but he had the best
of the struggle, and was dragging the people into the open river; I was
therefore obliged to end the sport by putting a ball through his head. He was
scored all over by the tusks of some other hippopotamus that had been
bullying him.”
After conquering your enemy, kill him and eat him: such is the maxim of
savage life. It was carried out by Sir Samuel Baker and his men, much to
the satisfaction of the conquerors. “A new dish!” exclaims our traveller;
“there is no longer mock-turtle soup; real turtle is mock hippopotamus. I
tried boiling the fat, flesh, and skin together, the result being that the skin
assumes the appearance of the green fat of the turtle, but is far superior. A
piece of the head thus boiled, and then soused in vinegar, with chopped
onions, cayenne pepper, and salt, throws brawn completely in the shade.”
The same traveller relates that the natives on the shores of the Albert
N’yanza, previous to embarking on a voyage, cast a handful of beads into
the lake, to propitiate the hippopotamus, that their canoe may not be upset.
The genus Tapir is wanting in Africa; but we find a species, Tapirus
Indicus, in India and the Indian Archipelago, where it was first noticed by
Diard and Duvaucel. These naturalists saw an individual of this species at
Barrackpore, near Calcutta, whither he had been imported from the island
of Sumatra. “I was much surprised,” says Diard, “that so large an animal
had not hitherto been discovered; but I was much more so, on seeing in the
Asiatic Society’s Museum the head of a similar animal, a native of Malacca,
which had been sent to the Society, on the 29th of April 1806, by M.
Faghuarie, governor of that province.” This tapir is as common at Malacca
as the rhinoceros and elephant. In size he closely approaches the common
ass. He is black all over, except the ears, which are fringed with white, and
on the back, which is of a pale gray. His habits are identical with those of
the American tapirs, to be described hereafter.
Rhinoceros.
African Phacocœrus (Chœripotamus Africanus).

In the African plains, from Nubia and Senegal to the Cape, we meet with
a Pachyderm intermediate between the hippopotamus and the wild boar:
this is the Phacocœrus, which was known to the ancients, and designated by
credulous Ælian the Sus tetrakeros, or “Boar with Four Horns.” He has no
horns, however, but only, beneath each ear, a horny protuberance, which
greatly disfigures his head, and procures him the popular appellation of the
“Warty Hog”—the “Bush Vark,” or “Bush Hog” of South Africa
(Chœripotamus Africanus). He has four projecting tusks, and long sharp
tufted ears. His stature, his feet, his tail, the mane of stiff bristles which
garnishes his neck, identify him with the wild boar; but his body, almost
naked on the flanks and hinder part, likens him to an hippopotamus. He is
gregarious, of fierce and brutal habits, and lives chiefly in the bushes or tall
herbage.
The Daw and the Quagga.

The Solidungulæ (or Solid-hoofed), which roam among the wide


pasturages of the Tropical regions of the Ancient World, contrast, by the
elegance of their forms and the beauty of their clothing, with the unwieldy
Pachyderms, of rugged and swarthy hide, placed by Cuvier under the same
classification. The Wild Horse does not exist in these latitudes, though we
may find there the most beautiful species of the genus: the Hémione, the
Onagra, the Zebra, the Daw, and the Quagga. The Hemionus (“half-ass”),
which we are endeavouring to acclimatize in Europe, and numerous
specimens of which may be seen in the Zoological Gardens of London and
Paris, is of a clear brown colour all over the body, except the belly and legs,
which are white. His mane is short, and his tail garnished only with a tuft of
hairs at the extremity. The species is Asiatic, and appears to have originated
in India, whence it spread westward into Asia Minor, and northward into the
Steppes which stretch to the base of the Himalayas. The modern names are
Koulem, Kiang, and Dziggethai (or “Mountain Ass”). He roams in great
troops across the dreary Asiatic deserts, and is fond of bitter and saline
herbage, and brackish water. Now, as of old, he has “the range of the
mountains for his pasture,” and the “salt places” for his dwelling. His
swiftness and wariness render his chase an exciting pastime, and in Persia
he is considered the noblest of game.
The Hemippus (“half horse”), a species closely allied to the Hemionus, is
a native of the fertile districts of Syria and Arabia. Another species, the
Tarpan, roams the Steppes of Tartary, and is with great difficulty tamed to
the use of man. He is of a reddish colour, but the mane and tail are black,
and along the back runs a black stripe. The Onagra, Onager, or Wild Ass of
Tartary, is represented in Abyssinia by a smaller variety, of very graceful
form, whose hide exhibits already, upon the legs, some of those well-
defined stripes which so magnificently adorn the “outer vestment” of the
Quagga, the Daw, and, especially, the Zebra.
All these Solidungulæ are identical in habits and character: social among
themselves, they are fierce and mistrustful towards other animals. When in
peril, they seek safety at first by rapid flight; but if driven to bay, they
assume a courageous bearing, assail their enemies intrepidly, and frequently
compel them to retreat. It is even asserted that the Quagga (Asinus Quagga)
will mingle with herds of domestic animals, and defend them against the
attacks of beasts of prey. According to Dr. Gray, this animal derives his
name from his voice, which resembles the barking of a dog, or a sound like
Couagg, or Quag. Pennant calls him the Quacha. He resembles the horse in
his haughty bearing and rapid movements. His head, neck, mane, and
shoulders are blackish-brown, banded with white; the stomach, hind parts,
and legs are whitish; the dorsal line is black; the ears have two irregular
black bands and a white tip. In the Daw, the blackish-brown tint extends
over all the upper parts of the body, as well as the stripes, which are
alternately black and light brown. The Quagga and the Daw belong to
Southern Africa, and especially to Caffraria. The habitat of the Zebra
appears to be more extended in range. He is found even as far north as
Abyssinia. He was known to the Romans under the name of the
Hippotigres, and figured in the sanguinary sports of the Amphitheatre.
Assuredly he is the handsomest species of the genus Equus (Horse). He is
as tall as the Hemionus; his legs are shapely, his mien and bearing full of
spirit; he has a well-proportioned head, and a coat of incomparable richness
of design, with the skin lustrous, and large black stripes symmetrically
arranged over the whole body, on a ground of pure white.
Zebras (Equus Zebra).

Africa, as I have said above, is the native country of the large


Ruminants. Not less remarkable than the Camel in the fantastic originality
of his form, which matches the exquisite richness of his skin, the gigantic
Giraffe (Camelopardalis Giraffa) is distributed over nearly the whole
continent south of the Sahara. Sometimes he even ventures into the Desert;
but most frequently his long neck and tall legs are seen in the fertile plains
of Negroland, the Soudan, the Senegal, and Nubia. “His head,” says a
popular zoologist, “resembles that of the camel in the absence of a naked
muzzle, and in the shape and organization of the nostrils, which are oblique
and narrow apertures, defended by the hair which grows from their margins,
and surrounded by cutaneous muscular fibres, by which the animal can
close them at will. This is a beautiful provision for the defence of the air
passages, and the irritable membrane lining the olfactory cavities, against
the fine particles of sand which the storms of the Desert raise in almost
suffocating clouds. The large, dark, and lustrous eyes of the giraffe, which
beam with a peculiarly mild but fearless expression, are so placed as to take
in a wider range of the horizon than is subject to the vision of any other
quadruped. While browsing on his favourite acacia, the giraffe, by means of
his laterally-projecting orbits, can direct his sight so as to anticipate a
threatened attack in the rear from the stealthy lion, or any other foe of the
Desert. To an open attack he sometimes makes a successful defence by
striking out his powerful and well-armed feet; and the king of beasts is said
to be frequently repelled and disabled by the wounds which the giraffe has
thus inflicted with his hoofs.” The lion, however, seldom attacks him unless
he can surprise him in a state of repose, when he will leap upon his victim’s
back and tear him to pieces.
Le Vaillant has justly observed that if precedency among animals were
determined by their height, the giraffe would hold the first rank. The most
careless observer must be impressed by the enormous length of his fore-
legs, and his long tapering neck, which enables him to browse upon the
fresh foliage and green young shoots of the loftiest trees; nor can he fail to
admire his small and elevated head, his brilliant beaming eyes, and his
mildness of aspect. Unusual as are the animal’s proportions, they are not
inharmonious, and his appearance is eminently picturesque. When full
grown, he measures seventeen feet from the top of the head to the fore-feet.
This, however, is a maximum. It should be added that his fore-legs are not
so much longer than the hind, but the shoulders are extraordinarily high.
The animal’s colour is a light fawn, marked with numerous darker spots.
His horns consist of two porous bony substances, about three inches long,
which form, as it were, a part of the skull.

A Lion rending a Giraffe.

Several species of antelopes and wild oxen traverse in numerous herds


the wide prairies of Africa and Asia. Among the African species, I may
name the Bubalus, which lives principally in the north-west, and whose
keen stout horns, disposed like the prongs of a pitchfork, render him
exceedingly formidable; the Gnu, or Connochetæ (Catoblepus Gnu), which
inhabits the wild karoos and hilly districts of South Africa, in migratory
herds, and is distinguished by the weird ugliness of his head, with its curved
horns, and its beautiful flowing mane, white at the base, and black at the
tips; the Oreas Lanna, improperly called the “Cape Eland” (Antilope
Oreas), a graceful animal, as large as the horse, and five feet high at the
shoulder, with straight pointed horns, whose great strength is augmented by
a spiral wreath; and the Oryx (Oryx gazella), Egyptian Antelope, or Pasom,
somewhat superior in size to a deer, with horns three feet long, black hoofs
and horns, a white head, and neck and upper part of the body of a pale
bluish-gray.
Tropical Asia presents but a very small number of Antelopes, properly so
called, of which the Nylghau, or White-footed Antelope (Partux picta) is
the largest. Its face is long and narrow; its black, round, and pointed horns,
though only about seven inches long, are slightly curved forwards; the
broad ears are fringed with white hairs; along the top of the deep narrow
neck runs a slight mane of black hair, which is continued to some distance
down the back; a long hanging tuft of a similar colour adorns the breast.
This animal is said to have abounded in the forests between Delhi and
Lahore in the days of Aurungzebe, and formed one of the objects of the
chase with that “king of kings” during his expedition to Cashmere. The
Hindoo name, “Nyl-ghau,” signifies “blue ox,” which is true of the male,
but the female is a pale brown. He is a courageous animal, very difficult to
tame; travellers affirm that when attacked he throws himself on his knees,
and in this position moves forward, until, suddenly leaping to his feet, he
rushes impetuously upon his enemy, and smites him vigorously with his
sharp horns.
I must not omit to particularize, among the great Ruminants of the
Tropical regions of the Old World, the Buffaloes, or Wild Oxen, which feed
in immense troops in the fertile and well-watered prairies. The two African
species or varieties which are best known are, the Buffalo of Caffraria, and
the Short-horned Buffalo. The former is not confined to the Caffre country,
as his name would lead one to suppose; but ranges as far as Abyssinia. His
horns, very wide, and close together at the base, form, above the eyes, a
kind of helmet very useful to the animal in pushing aside the bushes that
impede his progress. His hair is rough and black over the whole body. The
short-horned buffalo has a smooth brown skin, muzzle nearly black, ears
large, horns arched and of moderate dimensions.

1. Antelope Gnu. 2. Oreas Lanna (or Eland). 3. Striped or Banded Gnu.

These buffaloes, despite of their ferocious aspect and savage habits, are
wholly inoffensive, and in all cases of danger are tempted at first to take to
flight; but should they be pressed too closely, or wounded, their irascible
and vindictive disposition speedily displays itself. When the negroes hunt
the buffalo, says Paul Gervais, they are very careful to attack isolated
individuals only, because, in the herds of these animals some will always be
found disposed to avenge the death of their companions, and pursue the
hunters to the uttermost. In their excesses of fury they strike the ground
with their horns; dash their bodies against the trees in which their enemies
have taken refuge; sometimes they will spend their rage upon one another,
or upon the bodies of those of their kind which have been brought low.
Asia is the home of the Common Buffalo (Bos bubalus), and from
thence he has migrated into several islands of the Indian Archipelago,
Eastern Europe, and even into Italy. In France and Great Britain he has long
been domesticated. But there also exist in several Indian provinces some
savage species of the Arnee Buffalo (Bos Arni of Dr. Shaw), easily
recognized by his horns of prodigious size and length, which frequently
measure six feet in length, and eighteen inches in circumference at the base.
Travellers have asserted that nearly all the herbivora, and in particular
the more feeble and timorous, evince a marked preference for open and
level places; to such an extent, that the herds of antelopes, gazelles, and
zebras may be seen abandoning their pastures when the herbage is
unusually luxuriant. It is in the thickets, the matted and almost impenetrable
jungles, and among the tall rank grasses, that the beast of prey glides
stealthily and unseen upon his intended victim. Where the surface of the
ground is smooth and bare, the herbivora can descry an approaching enemy,
and take to flight or make ready for defence. It is not, however, the carnaria
that they have most cause to dread, but man; not less cruel he than the
stealthy lion or the prowling tiger, and far more formidable since European
commerce has furnished the savage with firearms. He quickly learns to
make use of these; but prior to their introduction into wilderness, prairie,
and forest, he had devised against his prey various more or less successful
means of destruction.
In Central Africa, for instance, the Bakouain Negroes, to capture en
masse buffaloes, zebras, giraffes, antelopes, and even rhinoceroses, which
gather in crowds around the grateful waters, construct a colossal and all-
devouring snare, which they call a Hopo.
An African Hopo, or Snare for Herbivorous Animals.

“This snare,” says Dr. Livingstone,[125] “consists of two very stout and
very high fences, approaching each other so as to assume the shape of a V;
at the apex of the angle, instead of completely joining them, they are
prolonged in a straight line, forming an alley about fifty paces in length,
abutting on a ditch which may measure from four to five yards square, and
be from six to eight feet deep. Trunks of trees are arranged cross-wise on
the borders of this trench, chiefly on the side from which the animals will
arrive, and upon the opposite one, by which they will endeavour to escape.
These trees form an advanced border above the ditch, rendering flight
impossible, and the whole is carefully covered over with reeds, which hide
the snare, and make it resemble a trap placed among the herbage. As the
two fences are often a mile in length, while the base of the triangle which
they define is nearly of the same dimensions, a company who form around
the hopo a circle of three to four miles in circumference, by gradually
drawing it closer, are certain to collect a great quantity of game. The hunters
direct by their cries the animals which they surround, and cause them to
reach the summit of the hopo. Men concealed at this point then fling their
javelins into the midst of the affrighted herd, which, dashing headlong
through the solitary opening it can find, involves itself in the narrow alley
leading to the ditch. The animals fall in pell-mell, until the snare is filled
with a living mass, which enables the others to escape by passing over the
bodies of the victims. The spectacle is horrifying; the hunters, intoxicated
by the pursuit, and no longer controlling themselves, strike these graceful
animals with a delirious joy, while the poor creatures, crushed to the bottom
of the abyss beneath the weight of the dead and dying, raise from time to
time the pile of carcasses, by struggling, in the midst of their agony, against
the burden which suffocates them.”
Of the corral in which the Cingalese entraps the elephant, and of the
ingenious snares laid by the Malay or the Indian for the murderous tiger, I
shall speak hereafter. Between man and the carnivora it was natural that a
deadly war should be incessantly waged; but humanity would seem to
dictate towards the inoffensive herbivora a less sanguinary hostility.

CHAPTER VIII.

ANIMAL LIFE IN THE PRAIRIES OF THE OLD WORLD, CONTINUED:—THE


CARNIVORA.

NEXT to man, the most dangerous enemies of the peaceful herbivora are the
great Carnivora of the Felidæ genus, in whose first rank zoologists and
poets were formerly wont to place the lion.
The so-called “king of animals,” however, has of late years lost much of
his prestige. Observant travellers have watched him with a jealous and
suspicious eye; intrepid hunters have dared to measure themselves against
him, and to beard him in his retreats. Our popular heroes suffer greatly by
this close examination. Achilles to his Myrmidons, I suspect, was less
godlike than he appeared to the warriors of Troy, who saw him only in the
rush and tumult of the battle. Certain it is that the researches of modern
science have stripped the lion of most of the splendid attributes with which
romance had invested him. Here is a glowing picture:—
“The lion,
Who long has reign’d the terror of the woods,
And dared the boldest huntsman to the combat,
When caught at length within some hidden snare,
With foaming jaws he bites the toils that hold him,
And roars, and rolls his fiery eyes in vain,
While the surrounding swains wound him at pleasure.”—(Nathaniel
Rowe.)
But the fact is, that with all his prodigious strength, his terrible teeth and
claws, his imposing physiognomy and attitudes, he is an animal more
prudent than courageous, and very unlike the highly-coloured portrait
which Buffon painted. There have not been wanting well-accredited
authorities to accuse him of cowardice; as our own countryman
Livingstone, and the Frenchman Delegorgue. According to the latter, he is
but a nocturnal robber, whom a ray of light disconcerts, or the barking of
dogs, and the shouts of men, women, and children, or a blow from a well-
applied whip, will frequently put to flight. Even if provoked, or wounded by
man, he will often refuse to fight to the last extremity; or if he accept the
challenge, and succeed in harassing his antagonist, he contents himself by
breaking a limb or two, by marking his chest with his teeth and nails, after
which he leaves him and goes his way. “I have known,” says Delegorgue,
“an intrepid hunter who, twice in seven years, had been treated in this
fashion by a wounded lion; the first encounter cost him two broken limbs;
the second, six fractures, without counting the deep scars left by his claws
on several parts of the body. Another, named Vermaës, in his daring, was
held for more than a minute by a lion, and got quit with four deep marks of
his canine teeth; glorious scars, which he showed to me with an air of lively
satisfaction.” Livingstone records a similar adventure which befell himself
with a lion at which he had aimed a couple of shots. The wounded animal
turned upon his aggressor, harried him, severely injured an arm, and then
directed his wrath against one of the doctor’s companions, whom he seized
by the shoulder. He intended, in all probability, to administer a similar
correction to this individual, when suddenly the two bullets he had received
produced their effect, and he fell dead.
These facts prove, at least, that if the lion is not brave he is not
malicious, and that the reputation for generosity which he has borne from
remote times was not undeserved. It is only in his old age that the lion
willingly enters upon a regimen of human flesh, from sheer want of power
to obtain any other easily. When a lion is too old, says Livingstone, to
provide himself with game by hunting, he frequently enters into the very
villages and kills the goats; if, then, a woman or a child go out at night, he
makes them equally his prey; and as thenceforth he has no other means of
subsistence, he continues to feed himself in this manner. Hence has arisen
the saying, that if a lion once tastes human flesh he prefers it to all other
kinds. The beasts which attack man are invariably aged lions. When one of
them conquers the fear inspired by man so far as to approach a village and
seize the goats, the inhabitants invariably say, “His teeth are worn out, and
he will soon kill somebody;” and feeling the necessity of defending
themselves, they hunt him immediately.
It is generally believed, on the authority of Buffon, that the lion lives in
retirement with his mate, that he hunts in solitary dignity, and will suffer no
other carnaria, not even one of his own race, to hunt in his own domain.
This is an error. Lions, on the contrary, often assemble in a “hunting-party,”
four or five in number, when they fly at “high game,” such as a buffalo or a
giraffe. M. Vardon saw three lions throw themselves at once on a buffalo
which he had just wounded with a musket-shot. “During the day-time, in
winter,” says Delegorgue, “you may frequently see troops of lions, which
assemble together for the purpose of marking off and driving the game
towards the ravines, or wooded glens difficult of access, where some of
their companions are posted; these are strict battues, conducted without any
noise, the odours of the lions being sufficient to enforce the retreat of the
herbivora which they pursue.” The lion himself may, in his turn, be chased
and tracked with dogs, like a wild boar, a wolf, or a stag; but most
frequently the hunters pursue and shoot him on foot, and this is but a
pleasure-jaunt for a man of sang-froid, if a good shot, and well acquainted
with the animal’s habits.
We know that the roar of the lion—that is, of the hungry lion—is
considered the most terrible of cries, which inspires all the animals, and
even man, with unconquerable dread. It appears, however, that man—to say
nothing of his dogs—speedily grows accustomed to it, and that the lion, in
his turn, cannot be frightened by the barking of the latter. A very curious
fact, remarked by Livingstone, is the singular resemblance of the lion’s roar
to the cry of the ostrich. “I have carefully inquired,” says the great African
traveller, “the opinion of Europeans who have heard both. I have asked
them if they could discover the least difference between the roar of the one
and the cry of the other. They have all informed me that they could not
perceive any, at whatever distance the animal might be placed. The voice of
the lion, generally, is deeper than the ostrich’s; but up to the present time I
have only been able to distinguish it with certainty because it is heard
during the day, and the ostrich’s during the night.”
Lions were formerly common enough in all Southern Asia, Persia, Asia
Minor, and even Greece. They long ago disappeared from these countries,
and are rarely met with now-a-days in Hindostan. The Indian lion is smaller
than his African congener; his mane is shorter and less abundant, and
several naturalists signalize him as a distinct species, intermediary between
the true African lion and the American puma. There are three varieties of
Asiatic lions: the Bengal, the Persian or Arabian, and the maneless lion of
Goojerat—the latter confined to a very narrow district. The African “king of
beasts” is spread over the entire continent from the Mediterranean to the
Cape of Good Hope; but the species includes three kinds: the Barbary lion,
with a deep yellowish-brown fur and a full flowing mane; the Senegal,
whose fur is of a brighter yellow, and whose mane thinner; and the Cape, of
which there are two varieties, one brown, the other yellowish; the former
being the fiercer and more powerful animal.
A lion of the largest size measures about eight feet from the nose to the
tail, and the tail itself about four feet. The male has usually a thick shaggy
mane; the head is large, with rounded ears, and the face covered with short
close hair; great strength and muscular force distinguish his conformation;
and the tail terminates in a tuft of hair, which is not fully developed until he
is six or seven years old.
In Africa the lion has for his fellows the Leopard and the Panther. Many
writers at one time confounded these two Felidæ, and even classified them
with the Indian tiger. For the vulgar, every great cat with a spotted skin is a
tiger. But scientific naturalists neither apply this name to the American
jaguar nor to other spotted Felidæ of the Old or New World; and it is with
difficulty they now agree to recognize in the Leopard and the Panther two
ill-defined varieties of the same species. Assuredly they exhibit very
marked differences. The Leopard is nearly as large as the lion; his limbs are
robust, his head is strong. From nose to tail he measures four feet, his tail is
two feet and a half long, and his body so flexible that he accomplishes the
most surprising leaps, and swims, and climbs trees, or crawls along the
ground, serpent-like, with admirable ease. Compared with the jaguar and
panther of naturalists, he is uniformly of a paler and more yellowish colour,
and rather smaller, while the spots on his skin are rose-formed, or consist of
several dots partially united into a circular figure in some instances, and in
others into a quadrangular, triangular, or other less determinate forms. The
lower part of the neck and inner parts of the limbs are white; the spots are
continued upon the tail, which is long, and black at the extremity.

The African Leopard.

The Panther is larger than the leopard, measuring about six feet and a
half from nose to tail, which is itself about three feet long. On his sleek hide
the spots are disposed in circles of four or five, with, usually, a central spot
in each circle, in which, as well as in his deeper colour, he differs from the
leopard. Both are handsome, stealthy, and ferocious animals; supple, agile,
and muscular. The leopard (Felis leopardus) is a native of Africa,
principally ranging along its western coast and on the confines of the
Sahara. The panther (Felis pardus) is also an African denizen, though
likewise found in Arabia, Persia, and Hindostan. During the day he lurks in
the thickets and among the tall grasses, but when the shades of night
descend he issues from his lair, and haunts the brooks and pools whither the
herbivora resort to quench their thirst. There, upon some rock, he lies in
ambuscade, commanding the track pursued by innocent victims, and darting
with unerring precision upon the first which presents itself.
Neither leopard nor panther often ventures to assail man. When attacked
by him, they seek at first to make their escape, and only turn at bay when
escape is impossible. In Java, and some other of the great Indian islands,
there exists a black panther, which has gained, it is difficult to say how, the
reputation of extraordinary ferocity and daring. Sometimes, in the world of
man, great reputations are built upon equally slight foundations. He owes
his fame to the imagination of the natives, and differs from his congeners in
no single respect but the blackish colour of his skin. A skilful naturalist,
who was for some years a resident in Java, relates that, while botanizing in
the fields and jungles early in the day, he frequently roused the black
panthers in their lairs. At first he was somewhat startled by the apparition of
an animal of such terrible renown, but seeing him turn tail very quickly on
his approach, he soon grew re-assured, and troubled himself no more at
these rencontres than if he had met a dog or a cat.

We now come to the most formidable of all the Carnaria: the Tiger,
properly so called, or Royal Tiger, whose portrait Buffon has been pleased
to paint with his boldest brush and most glowing colours, without any other
motive apparently than a love of antithesis, or the artist’s desire to give
force and effect to a striking picture. He had endowed the king of animals
with all the regal qualities his imagination could suggest, and by way of
contrast he ascribed to the tiger the lowest and cruellest instincts. He
painted him as the Moloch of the brute creation; the Domitian, Caligula, or
Nero of the jungles. He was blood-thirsty, treacherous, cowardly, and
hideous. His limbs were too short, his head was too large, he was ill-
proportioned; in a word, on the unfortunate beast he poured out all the vials
of his satiric wrath.
With this pièce de fantaisie it would be curious to contrast the graver and
more authentic description of the impartial Daubenton. He asserted that the
tiger was very little known to Europeans, and that in France there existed
but a single specimen, and that a very badly prepared one, in the “Cabinet
du Roi.” But we are now better informed, and the tiger, perhaps, up to a
certain point, is rehabilitated. Let us take him first in his physical aspect. All
travellers agree in describing him as the handsomest of animals. He has not
the grave countenance, the majestic attitudes of the lion; but he has all the
grace, all the suppleness, all the lively and undulatory movements of the
domestic cat. He does not stand so high upon his legs as the lion, and he
lacks that full flowing mane which invests the physiognomy of the latter
with a human and truly noble air; but all the parts of his head and body,
despite of Buffon, are admirably proportioned. Not quite so tall as the lion,
and less robust in appearance, he is endowed with a surprising vigour. He
can carry off, while in full career, and making the most rapid leaps, the
heaviest prey—a kid, for instance, an antelope of full size, even a bull, it is
said, and, necessarily, a man. Finally, his skin, symmetrically striped, like a
zebra’s, with wavy bands of brown and black, on a reddish ground, with the
contour of the face, the chin and belly of the purest white, defies all
comparison. The stripes of his head, legs, and tail are disposed with
irreproachable symmetry in curves of the most graceful character. So much
for his physical character; let us pass to his moral.
His appetites, and consequently his manners and instincts, differ but little
from those of the other Felidæ, and, in particular, of the lion. While he has a
keen love of living flesh and warm blood, he does not scorn to return, under
the pressure of hunger, to a dead prey already partially devoured. Like all
the carnaria, a sagacious instinct prompts him to kill in provision for
coming as well as for present hunger. This is the reason that Buffon has
stigmatized him as “unnecessarily cruel.”
“The bound with which he throws himself upon his prey,” says an
English naturalist, “is as wonderful in its extent as it is terrible in its
effects.” Pennant justly observes that the distance which it clears in this
deadly leap is scarcely credible. Man is a mere puppet in his gripe; and the
Indian buffalo is not only borne down by the ferocious beast, but carried off
by his enormous strength. If he fails in his spring, it has been said that he
will take to flight. This may be true in certain instances; but, in general, far
from slinking away, he pursues the affrighted prey with a speedy activity
which is seldom exerted in vain. Hence we are led to the observation of
Pliny celebrating his swiftness, for which the Roman zoologist has been
censured, and apparently most unjustly; nor is he the only author among the
ancients who notices his speed. Appian speaks of the swift tiger as the
offspring of the zephyr. Pliny, says Pennant, has been frequently taken to
task by the moderns for calling the tiger “animal tremendæ velocitatis;”
they allow it great agility in its bounds, but deny it swiftness in pursuit. Two
travellers of authority, both eye-witnesses, confirm what Pliny says: the
one, indeed, only mentions in general his vast fleetness; the other saw a trial
between one and a swift horse, whose rider escaped merely by getting in
time amidst a circle of armed men. The chase of this animal was a favourite
diversion with the great Cam-Hi, the Chinese monarch, in whose company
our countryman, Mr. Bell, that faithful traveller, and the Perè Gerbillon, saw
these proofs of the tiger’s speed.
The Latin “tigris” is from a Persian word signifying “swift as an arrow,”
which we find incorporated in the name of the river Tigris.
The tiger’s habits are essentially nocturnal, and almost aquatic. His
favourite haunts are the banks of rivers and lakes, not only because he may
there pounce upon the herbivora which come to drink, but because he can
there satisfy himself with a banquet of fish. To this he is as partial as any
European epicure, and in angling his skill and dexterity are not unworthy of
an Izaak Walton. He is the “complete angler” of the carnivorous world! He
swims admirably, and in pursuit of his prey never hesitates at the most
tremendous “header,” so that the Arnee Buffaloes, which traverse immense
distances by yielding themselves to the swift river-currents, have more
cause to dread his attacks than those of the crocodiles.
Buffon has calumniated the tiger by accusing him of cowardice, while,
as we have seen, he has not less grossly flattered the lion by representing
him as the perfect type of intrepidity. During the day the tiger, after having
supped freely, sleeps in his den; he avoids man, and when aroused by the
hunters, his first movement is one of flight. But by night or day, if he be an
hungered, no obstacle arrests, no peril daunts him; and he pounces upon
man as he would upon any other prey. He penetrates into isolated
habitations; breaks into the villages, and sometimes even into the towns;
seizes the domestic animals in their very stables; men even within the
shelter of their own houses; and sometimes devours his spoil upon the spot;
sometimes, if he fears pursuit, drags it off to his secret lair.
At Goa, in a butcher’s stall, was slain a tiger which had fallen asleep
there after gorging himself with food; and in the vicinity of that once
famous, but now degraded city, a cross marks the spot where a Portuguese
officer, marching at the head of his men, was seized before their eyes by a
tiger, and carried off before they could make the slightest effort to save him.
Tigers are found in India, in the Indo-Chinese Peninsula, at Borneo, at
Java, and at Sumatra. Civilization has hunted them out of the Celestial
Empire, but they are met with in Tartary, even in extremely cold latitudes.
The tigers of the North a beneficent Nature has furnished with much longer
hair than their congeners of the Tropical zone, and they seem to form a
distinct variety of the species. Wherever the tiger exists, war à l’outrance is
declared between man and him! It is a vendetta which has been handed
down from the remotest antiquity, and is as bitter now as in any past
generation. Every year hundreds of persons fall victims to his appetite and
his prowess; every year hundreds of his race are shot down by the relentless
sportsman, or ensnared and killed by the peasants, whose cattle and whose
lives he threatens.
By the Malays and the half-savage Indians who dwell among the Indo-
Chinese jungles, he is hunted in the same way that the African negroes hunt
the lion and the leopard. When the presence of one of these scourges
becomes known in a district, they place some dainty bait on the bank of the
river where he drinks and plants himself every night, and they form an
ambush among the thickets, taking care to mark the direction of the wind. It
is not long before the tiger directs his steps towards the enticing booty, and
the hunters’ arrows or musket-balls stretch him dead, in most cases, before
he can seize it.
A vast amount of pompous preparation attaches to the tiger-hunt of
India. It is a sumptuous expedition, commanded by some distinguished
chief—an European officer, a native prince, or a stranger of rank—in which
each person has his allotted station and particular duties. Usually the
hunters are mounted on elephants, so that the tiger cannot reach them on the
back of the colossus, without being arrested by the trunk of the latter or his
formidable tusks. Each sportsman provides himself with three or four rifles,
besides revolvers and cutlasses. Formerly the Hindu rajahs made use in this
chase of arrows and lances, but now they greatly prefer the European
weapons. The expedition is never an impromptu affair. It is always
organized against an enemy whose presence has been discovered in the
district, and whose den is pretty well known. The march commences at
sunrise, that the beast may be surprised while enjoying his siesta, after the
fatigues and the plunder of the night. Suddenly awaking, says Mr.
Stocqueler,[126] he bounds out of the jungle, and is saluted by a discharge
which often proves sufficient; but sometimes the animal is safe and sound,
or only wounded; then he furiously springs upon the first elephant within
his reach. If the hunter has not time to plant a ball in his chest or head, the
position of the mahout, or driver, is very critical; for, placed on the
elephant’s neck, he has no other defence than the sharp iron-pointed stick
which he uses to guide his colossal steed. Fortunately the hunters are
arrayed in a compact mass, and a few well-directed shots terminate the
struggle.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like