100% found this document useful (1 vote)
21 views62 pages

Beginning MySQL 1st Edition Robert Sheldon Instant Download

Beginning MySQL, authored by Robert Sheldon and Geoff Moes, is a comprehensive guide to understanding and utilizing MySQL, a popular relational database management system. The book covers essential topics such as installation, database design, and data manipulation, making it suitable for both beginners and those looking to enhance their SQL skills. It includes practical exercises and insights from the authors' extensive experience in database management and programming.

Uploaded by

sexbirg601
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
21 views62 pages

Beginning MySQL 1st Edition Robert Sheldon Instant Download

Beginning MySQL, authored by Robert Sheldon and Geoff Moes, is a comprehensive guide to understanding and utilizing MySQL, a popular relational database management system. The book covers essential topics such as installation, database design, and data manipulation, making it suitable for both beginners and those looking to enhance their SQL skills. It includes practical exercises and insights from the authors' extensive experience in database management and programming.

Uploaded by

sexbirg601
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Beginning MySQL 1st Edition Robert Sheldon - PDF

Download (2025)

https://ebookultra.com/download/beginning-mysql-1st-edition-
robert-sheldon/

Visit ebookultra.com today to download the complete set of


ebooks or textbooks
Here are some recommended products for you. Click the link to
download, or explore more at ebookultra.com

Beginning Silverlight 3 1st Edition Robert Lair

https://ebookultra.com/download/beginning-silverlight-3-1st-edition-
robert-lair/

Beginning iOS 3D Unreal Games Development 1st Edition


Robert Chin

https://ebookultra.com/download/beginning-ios-3d-unreal-games-
development-1st-edition-robert-chin/

Algebra and Trigonometry 1st Edition Sheldon Axler

https://ebookultra.com/download/algebra-and-trigonometry-1st-edition-
sheldon-axler/

Learning MySQL First Edition Williams

https://ebookultra.com/download/learning-mysql-first-edition-williams/
MySQL 4th Edition Paul Dubois

https://ebookultra.com/download/mysql-4th-edition-paul-dubois/

Master of the Game Sidney Sheldon

https://ebookultra.com/download/master-of-the-game-sidney-sheldon/

Head First PHP MySQL 1st Edition Lynn Beighley

https://ebookultra.com/download/head-first-php-mysql-1st-edition-lynn-
beighley/

High Availability MySQL Cookbook 1st Edition Alex Davies

https://ebookultra.com/download/high-availability-mysql-cookbook-1st-
edition-alex-davies/

Oculomotor Systems and Perception 1st Edition Sheldon M.


Ebenholtz

https://ebookultra.com/download/oculomotor-systems-and-perception-1st-
edition-sheldon-m-ebenholtz/
Beginning MySQL 1st Edition Robert Sheldon Digital
Instant Download
Author(s): Robert Sheldon, Geoff Moes
ISBN(s): 9780764579509, 0764579509
Edition: 1
File Details: PDF, 11.98 MB
Year: 2005
Language: english
Beginning MySQL®

Robert Sheldon and Geoff Moes

TEAM LinG - Live, Informative, Non-cost and Genuine !


Beginning MySQL®
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2005 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 0-7645-7950-9
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
1B/RW/QT/QV/IN
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections
107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or
authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood
Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be
addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317)
572-3447, fax (317) 572-4355, e-mail: [email protected].
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO
REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE
CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT
LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED
OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED
HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE
UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR
OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A
COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE
AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION
OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF
FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE
INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY
MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY
HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services or to obtain technical support, please contact our
Customer Care Department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317)
572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be
available in electronic books.
Library of Congress Cataloging-in-Publication Data
Sheldon, Robert, 1955-
Beginning MySQL / Robert Sheldon and Geoff Moes.
p. cm.
Includes bibliographical references and indexes.
ISBN 0-7645-7950-9 (paper/website : alk. paper)
1. SQL (Computer program language) 2. MySQL (Electronic resource) I. Moes, Geoff, 1963- II. Title.
QA76.3.S67S54 2005
005.75'65--dc22
2004031058
Trademarks: Wiley, the Wiley Publishing logo and related trade dress are trademarks or registered trademarks of
John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without
written permission. MySQL is a registered trademark of MySQL AB Limited Company. All other trademarks are
the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor
mentioned in this book.
TEAM LinG - Live, Informative, Non-cost and Genuine !
About the Authors

Robert Sheldon
Robert Sheldon’s MySQL programming is rooted in ten years of experience working with SQL, as it is
implemented not only in a MySQL environment, but also within SQL Server, Microsoft Access, and Oracle
environments. He has programmed with SQL directly through database interfaces and script files and
indirectly through PHP, JSP, ASP, and ASP.NET applications that connected to various databases
and issued SQL statements. Robert has also managed the maintenance and development of Web sites and
online tools, which has included performing project analysis, developing functional specifications,
and managing database and Web development. He has designed and implemented various Microsoft
Access, SQL Server, and MySQL databases, as well as developed and implemented a variety of Web-based
solutions. In all these roles, he has had to perform numerous types of ad hoc queries and modifications,
build databases, create and modify database objects, create and review embedded statements, and
troubleshoot system- and data-related problems.

In addition to having a technical and SQL background, Robert has written or co-written nine books on
various network and server technologies, including two that have focused on SQL Server design and
implementation, one on SQL programming (based on the SQL:1999 standard), and one on Microsoft
Office Access 2003. The books that Robert has written contain training material that is designed to teach
users specific skills and to test their knowledge of the material covered. Having contracted as the senior
developmental editor for the Microsoft certification team, he brought to these books his experience devel-
oping exam items that helped to focus readers on the skills necessary to perform specific tasks. Robert
has also written and edited a variety of other documentation related to SQL databases and other computer
technologies. He works as an independent technical consultant and writer in the Seattle area.

Geoff Moes
Geoff Moes is a software architect and developer who has designed and implemented databases in
MySQL as well as having designed and implemented software systems in PHP, Java/J2EE, and ASP.NET
that have utilized MySQL databases through various database connectivity interfaces. Geoff received his
bachelor’s degree in Computer Science from Virginia Tech and has worked in the software industry for
18 years. He specializes in software and database architecture and development as it relates to Web-
based systems. He has worked with several database products in addition to MySQL, including SQL
Server, DB2, and Oracle. He has also developed a variety of software applications that have connected to
various databases using several different languages and platforms including Java J2EE/JDBC/EJB,
C++/ODBC, and ASP.NET/ODBC/OLEDB.

Geoff’s publishing credits include “Passing Arrays Between Jscript and C++” (September 7, 2000,
ASPToday.com, under WROX) and three articles published in Windows & .NET Magazine (online):
“Common Internet Hacker Attacks” (December 1, 1998), “Remote Web Administration, Part 2”
(November 1, 1998), and “Remote Web Administration, Part 1” (October 1, 1998). Geoff works as an
independent software consultant in the Washington D.C. metro area. When he is not in front of the
keyboard, he enjoys photography, mountain biking, hiking, and international travel.

TEAM LinG - Live, Informative, Non-cost and Genuine !


Credits
Acquisitions Editor Vice President and Publisher
Debra Williams Cauley Joseph B. Wikert

Development Editor Project Coordinator


Brian Herrmann Erin Smith

Technical Editor Quality Control Technician


David Mercer Brian H. Walls

Copy Editor Text Design and Composition


Nancy Hannigan Wiley Composition Services

Editorial Manager Proofreading and Indexing


Mary Beth Wakefield TECHBOOKS Production Services

Vice President & Executive Group Publisher


Richard Swadley

Acknowledgments

As with any publication, too many people were involved in the development of Beginning MySQL to
name them all, but we would like to acknowledge those who we worked with the closest in order to
complete this project in a timely manner (and with our sanity still somewhat intact). Our special thanks
goes to Debra Williams-Cauley, the acquisitions editor at John Wiley & Sons, Inc., who pulled this project
together in such a professional and responsive manner. And we particularly want to thank Brian Herrmann,
the development editor on this book who patiently and efficiently (and pleasantly, we might add) kept
this project moving forward, while always paying attention to details and answering our never-ending
stream of questions. We also want to acknowledge David Mercer, the technical editor, for his grasp of the
subject matter and his invaluable input into the book. In addition, we want to acknowledge all the edi-
tors, proofreaders, indexers, designers, illustrators, and other participants whose efforts made this book
possible. Finally, we want to thank our agent, Margot Maley Hutchison, at Waterside Productions, Inc.,
for her help in moving forward on this project and for tending to all the details.

TEAM LinG - Live, Informative, Non-cost and Genuine !


Contents

Acknowledgments v
Introduction xxv

Chapter 1: Introducing the MySQL Relational Database Management System 1


Databases and Database Management Systems 2
What Is a Database? 2
The Hierarchical Model 3
The Network Model 5
The Relational Model 6
Database Management Systems 7
The MySQL RDBMS 8
The Open-Source Movement 9
The SQL Framework 9
What is SQL? 10
A Brief History of SQL 11
The Nonprocedural Nature of SQL 14
SQL Statements 14
Types of Execution 26
Implementation-Specific SQL 31
Data-Driven Applications 32
The Application Server 32
Connecting to a MySQL Database 33
Creating a Data-Driven Application 35
Summary 40
Exercises 42

Chapter 2: Installing MySQL 43


Getting Started 43
Making the Preliminary Decisions 44
Selecting a Version of MySQL 44
Selecting a Platform to Run MySQL 44
Selecting a MySQL Distribution Type 45
Selecting an Edition of MySQL 46
Downloading Distribution Files 46

TEAM LinG - Live, Informative, Non-cost and Genuine !


Contents
Installing MySQL 48
Using RPM Files to Install MySQL on Linux 49
Using a Tar File to Install MySQL on Linux 51
Creating the User and Group Accounts 51
Copying the Tar File 52
Unpacking the Distribution File 53
Initializing the Installation 54
Starting the MySQL Server 55
Installing MySQL on Windows 57
Running the Installation Program 57
Configuring the MySQL Server 61
Editions of the MySQL Server 64
Testing Your MySQL Installation 65
Verifying Your Linux Installation 65
Verifying Your Windows Installation 68
Summary 70
Exercises 71

Chapter 3: Working with MySQL 73


Understanding the MySQL Directory Structure 73
MySQL File Storage 74
File Storage for a Linux RPM Installation 74
File Storage for a Linux Tar Installation 75
File Storage for a Windows Installation 76
The Data Directory 77
The mysql Database 78
The Grant Tables 79
Using the MySQL Programs 83
Specifying Program Options 83
Specifying Options at a Command Prompt 83
Specifying Options in a Configuration File 85
Server-Related Programs, Scripts, and Library Files 88
Client Programs 89
The mysql Utility 90
Using mysql in Interactive Mode 90
Using mysql in Batch Mode 97
Assigning Account Passwords 100
Setting Up a Configuration File 103
Summary 106
Exercises 107

vi TEAM LinG - Live, Informative, Non-cost and Genuine !


Contents

Chapter 4: Designing a Relational Database 109


The Relational Model 109
Data Normalization 111
First Normal Form 111
Second Normal Form 113
Third Normal Form 115
Relationships 116
One-to-One Relationships 117
One-to-Many Relationships 117
Many-to-Many Relationships 119
Creating a Data Model 119
Identifying Entities 122
Normalizing Data 124
Identifying Relationships 125
Refining the Data Model 126
Designing the DVDRentals Database 127
Summary 136
Exercises 137

Chapter 5: Managing Databases, Tables, and Indexes 139


Managing Databases 139
Creating Databases 140
Modifying Databases 142
Deleting Databases 142
Managing Tables 142
Creating Tables 143
Creating Column Definitions 144
Defining a Column’s Nullability 152
Defining Default Values 153
Defining Primary Keys 154
Defining Auto-Increment Columns 155
Defining Foreign Keys 156
Defining Table Types 158
Creating Tables in the DVDRentals Database 160
Modifying Tables 167
Deleting Tables 169
Managing Indexes 171
Index Types 171
Creating Indexes 172
Defining Indexes When Creating Tables 172
Adding Indexes to Existing Tables 175
Removing Indexes 179

TEAM LinG - Live, Informative, Non-cost and Genuine ! vii


Contents
Retrieving Information About Database Objects 179
Using SHOW Statements 180
Using Database-Related SHOW Statements 180
Using Table-Related SHOW Statements 181
Using DESCRIBE Statements 183
Summary 187
Exercises 188

Chapter 6: Manipulating Data in a MySQL Database 189


Inserting Data in a MySQL Database 189
Using an INSERT Statement to Add Data 190
Using the <values option> Alternative of the INSERT Statement 191
Using the <values option> Alternative to Insert Data in the DVDRentals Database 195
Using the <set option> Alternative of the INSERT Statement 203
Using a REPLACE Statement to Add Data 205
Using the <values option> Alternative of the REPLACE Statement 206
Using the <set option> Alternative of the REPLACE Statement 208
Updating Data in a MySQL Database 210
Using an UPDATE Statement to Update a Single Table 211
Using an UPDATE Statement to Update Joined Tables 216
Deleting Data from a MySQL Database 219
Using a DELETE Statement to Delete Data 219
Deleting Data from a Single Table 220
Deleting Data from Joined Tables 222
Using a TRUNCATE Statement to Delete Data 226
Summary 227
Exercises 227

Chapter 7: Retrieving Data from a MySQL Database 229


The SELECT Statement 230
Using Expressions in a SELECT Statement 238
Using Variables in a SELECT Statement 241
Using a SELECT Statement to Display Values 243
The SELECT Statement Options 245
The Optional Clauses of a SELECT Statement 249
The WHERE Clause 250
The GROUP BY Clause 254
The HAVING Clause 259
The ORDER BY Clause 261
The LIMIT Clause 265
Summary 267
Exercises 268

viii TEAM LinG - Live, Informative, Non-cost and Genuine !


Contents

Chapter 8: Using Operators in Your SQL Statements 269


Creating MySQL Expressions 269
Operator Precedence 270
Grouping Operators 271
Using Operators in Expressions 272
Arithmetic Operators 272
Comparison Operators 277
Logical Operators 291
Bitwise Operators 296
Sort Operators 302
Summary 306
Exercises 306

Chapter 9: Using Functions in Your SQL Statements 309


Comparing and Converting Data 310
Comparison Functions 310
GREATEST() and LEAST() Functions 310
COALESCE() and ISNULL() Functions 311
INTERVAL() and STRCMP() Functions 312
Control Flow Functions 314
IF() Function 314
IFNULL() and NULLIF() Functions 315
CASE() Function 316
Cast Functions 320
Managing Different Types of Data 322
String Functions 323
ASCII() and ORD() Functions 323
CHAR_LENGTH(), CHARACTER_LENGTH(), and LENGTH() Functions 323
CHARSET() and COLLATION() Functions 324
CONCAT() and CONCAT_WS() Functions 325
INSTR() and LOCATE() Functions 325
LCASE(), LOWER(), UCASE(), and UPPER() Functions 326
LEFT() and RIGHT() Functions 327
REPEAT() and REVERSE() Functions 327
SUBSTRING() Function 328
Numeric Functions 333
CEIL(), CEILING(), and FLOOR() Functions 333
COT() Functions 333
MOD() Function 334
PI() Function 334
POW() and POWER() Functions 334
ROUND() and TRUNCATE() Functions 334
SQRT() Function 335

TEAM LinG - Live, Informative, Non-cost and Genuine ! ix


Contents
Date/Time Functions 339
ADDDATE(), DATE_ADD(), SUBDATE(), DATE_SUB(), and EXTRACT() Functions 339
CURDATE(), CURRENT_DATE(), CURTIME(), CURRENT_TIME(), CURRENT_TIMESTAMP(),
and NOW() Functions 341
DATE(), MONTH(), MONTHNAME(), and YEAR() Functions 342
DATEDIFF() and TIMEDIFF() Functions 344
DAY(), DAYOFMONTH(), DAYNAME(), DAYOFWEEK(), and DAYOFYEAR() Functions 344
SECOND(), MINUTE(), HOUR(), and TIME() Functions 345
Summarizing Data 349
Summary Functions 350
AVG() Function 350
SUM() Function 351
MIN() and MAX() Functions 352
COUNT() Function 353
Bit Functions 354
Performing System Operations 358
Encryption Functions 358
ENCODE() and DECODE() Functions 358
PASSWORD(), MD5(), SHA(), and SHA1() Functions 359
System-Related Functions 361
CURRENT_USER(), SESSION_USER(), SYSTEM_USER(), and USER() Functions 361
CONNECTION_ID(), DATABASE(), and VERSION() Functions 361
INET_ATON() and INET_NTOA() Functions 362
Query and Insert Functions 362
FOUND_ROWS() Function 362
LAST_INSERT_ID() Function 363
Summary 366
Exercises 366

Chapter 10: Accessing Data in Multiple Tables 369


Creating Joins in Your SQL Statements 369
Joining Tables in a SELECT Statement 370
Creating Full Joins 373
Creating Outer Joins 385
Creating Natural Joins 391
Joining Tables in an UPDATE Statement 393
Joining Tables in a DELETE Statement 394
Creating Subqueries in Your SQL Statements 396
Adding Subqueries to Your SELECT Statements 396
Working with Comparison Operators 396
Working with Subquery Operators 399
Working with Grouped Data 403

x TEAM LinG - Live, Informative, Non-cost and Genuine !


Contents
Adding Subqueries to Your UPDATE Statements 410
Adding Subqueries to Your DELETE Statements 411
Creating Unions That Join SELECT Statements 414
Summary 417
Exercises 418

Chapter 11: Exporting, Copying, and Importing Data 421


Exporting Data Out of a Table 421
Exporting Data to an Out File 423
Exporting Data to a Dump File 430
Copying Data into a Table 431
Copying Data into a New Table 432
Copying Data into an Existing Table 435
Using the INSERT Statement to Copy Data 435
Using the REPLACE Statement to Copy Data 436
Importing Data into a Table 438
Using the mysql Utility to Import Data 438
Using the LOAD DATA Statement to Import Data 438
Using the source Command to Import Data 444
Using the mysql Command to Import Data 446
Using the mysqlimport Utility to Import Data 449
Summary 452
Exercises 453

Chapter 12: Managing Transactions 455


Introducing Transactions 455
Performing a Transaction 457
Performing a Basic Transaction 457
The START TRANSACTION Statement 458
The COMMIT Statement 458
The ROLLBACK Statement 459
Statements That Automatically Commit Transactions 460
Adding Savepoints to Your Transaction 463
The SAVEPOINT Statement 464
The ROLLBACK TO SAVEPOINT Statement 465
Setting the Autocommit Mode and Transaction Isolation Level 468
Setting the Autocommit Mode 468
Setting the Transaction Isolation Level 472
Data Anomalies in a Transaction 472
Transaction Isolation Levels 475
Using the SET TRANSACTION Statement 476

TEAM LinG - Live, Informative, Non-cost and Genuine ! xi


Contents
Locking Nontransactional Tables 479
The LOCK TABLES Statement 480
The UNLOCK TABLES Statement 480
Summary 483
Exercises 483

Chapter 13: Administering MySQL 485


Performing Administrative Tasks 485
Managing System Variables 494
Retrieving System Variable Settings 495
Using the SHOW VARIABLES Statement to Retrieve Server System Variable Settings 495
Using the SELECT Statement to Retrieve Dynamic System Variable Settings 497
Using the SHOW STATUS Statement to Retrieve Server Status Variable Settings 498
Modifying the Server Configuration 502
Specifying System Settings at the Command Line 502
Specifying System Settings in an Option File 503
Specifying System Settings at Runtime 503
Managing Log Files 506
Working with Error Log Files 506
Enabling Query and Binary Logging 507
Setting Up Query Logging 507
Setting Up Binary Logging 507
Summary 515
Exercises 516

Chapter 14: Managing MySQL Security 517


The Access Privilege System 517
MySQL Grant Tables 518
The user Table 518
The db Table 520
The host Table 521
The tables_priv Table 522
The columns_priv Table 523
MySQL Privileges 524
MySQL Access Control 527
Authenticating Connections 527
Verifying Privileges 529
Managing MySQL User Accounts 533
Adding Users and Granting Privileges 533
Using the GRANT Statement 533
Using the SHOW GRANTS Statement 545

xii TEAM LinG - Live, Informative, Non-cost and Genuine !


Contents
Setting Passwords for MySQL User Accounts 551
Using the SET PASSWORD Statement 551
Using the FLUSH PRIVILEGES Statement 551
Dropping Users and Revoking Privileges 553
Using the REVOKE Statement 553
Using the DROP USER Statement 555
Summary 558
Exercises 559

Chapter 15: Optimizing Performance 561


Optimizing MySQL Indexing 561
Optimizing SQL Queries 565
Optimizing Data Retrieval 566
Using the EXPLAIN Statement 566
Using the OPTIMIZE TABLE Statement 571
Understanding the SELECT Statement Guidelines 573
Optimizing Data Insertion 577
Optimizing Data Modification and Deletion 578
Optimizing MySQL Tables 579
Optimizing Your System’s Cache 580
Summary 584
Exercises 584

Chapter 16: Managing Backup, Recovery, and Replication 587


Backing Up Your Database 588
Backing Up a Single Database 588
Backing Up the Entire Database 588
Backing Up Individual Tables 594
Backing Up Multiple Databases 594
Backing Up Specific Databases 595
Backing Up All Databases 595
Restoring Your Database 599
Reloading Your Database 600
Using the mysql Client Utility in Batch Mode to Reload Your Database 600
Using the mysql Client Utility in Interactive Mode to Reload Your Database 600
Updating the Restored Database from Binary Log Files 601
Restoring Data Directly from a Binary Log 601
Restoring Binary Log Data from a Text File 602
Enabling and Disabling Binary Logging 603
Replicating Your Database 606
Implementing Replication 608

TEAM LinG - Live, Informative, Non-cost and Genuine ! xiii


Contents
Managing Replication 610
Managing the Master Server 611
Managing the Slave Server 612
Summary 615
Exercises 616

Chapter 17: Connecting to MySQL from a PHP Application 617


Introduction to PHP 618
Building a Data-Driven PHP Application 619
Connecting to a MySQL Database 619
Retrieving Data from a MySQL Database 621
Processing the Result Set 622
Manipulating Data in PHP 623
Converting Date Values 625
Working with HTML Forms 626
Redirecting Browsers 627
Working with Include Files 627
Creating a Basic PHP Application 628
Inserting and Updating Data in a MySQL Database 639
Adding Insert and Update Functionality to Your Application 640
Deleting Data from a MySQL Database 660
Summary 664
Exercises 665

Chapter 18: Connecting to MySQL from a Java/J2EE Application 667


Introduction to Java/J2EE 667
Building a Java/J2EE Web Application 669
Importing Java Classes 669
Declaring and Initializing Variables 670
Connecting to a MySQL Database 671
Retrieving Data from a MySQL Database 672
Processing the Result Set 673
Manipulating String Data 674
Converting Values 675
Working with HTML Forms 677
Redirecting Browsers 678
Including JSP Files 678
Managing Exceptions 679
Creating a Basic Java/J2EE Web Application 679
Inserting and Updating Data in a MySQL Database 692
Adding Insert and Update Functionality to Your Application 693
Deleting Data from a MySQL Database 716

xiv TEAM LinG - Live, Informative, Non-cost and Genuine !


Contents
Summary 721
Exercises 721

Chapter 19: Connecting to MySQL from an ASP.NET/C# Application 723


Introduction to ASP.NET/C# 724
Building an ASP.NET/C# Application 725
Setting up the ASP.NET Web Page 725
Declaring and Initializing Variables 725
Connecting to a MySQL Database 727
Retrieving Data from a MySQL Database 728
Processing the Result Set 729
Manipulating String Data 730
Converting Values 731
Working with HTML Forms 732
Redirecting Browsers 733
Including ASP.NET Files 733
Managing Exceptions 734
Creating a Basic ASP.NET/C# Application 735
Inserting and Updating Data in a MySQL Database 748
Adding Insert and Update Functionality to Your Application 750
Deleting Data from a MySQL Database 773
Summary 777
Exercises 778

Appendix A: Exercise Answers 781


Chapter 1 781
Exercises Solutions 781
Chapter 2 782
Exercises Solutions 782
Chapter 3 782
Exercises Solutions 782
Chapter 4 783
Exercises Solutions 783
Chapter 5 784
Exercises Solutions 784
Chapter 6 785
Exercises Solutions 785
Chapter 7 786
Exercises Solutions 786
Chapter 8 787
Exercises Solutions 787

TEAM LinG - Live, Informative, Non-cost and Genuine ! xv


Contents
Chapter 9 788
Exercises Solutions 788
Chapter 10 789
Exercises Solutions 789
Chapter 11 790
Exercises Solutions 790
Chapter 12 791
Exercises Solutions 791
Chapter 13 792
Exercises Solutions 792
Chapter 14 793
Exercises Solutions 793
Chapter 15 794
Exercises Solutions 794
Chapter 16 795
Exercises Solutions 795
Chapter 17 797
Exercises Solutions 797
Chapter 18 798
Exercises Solutions 798
Chapter 19 799
Exercises Solutions 799

Appendix B: MySQL APIs 801

Appendix C: MySQL 5 805


Stored Procedures 806
Triggers 807
Views 808

Index 811

xvi TEAM LinG - Live, Informative, Non-cost and Genuine !


Introduction

Welcome to Beginning MySQL, the definitive resource for anyone new to the MySQL database manage-
ment system. As the most popular open source database system in the world, MySQL has gained not only
recognition among its peers but a place of prominence in the worldwide technical industry, ensuring an
ever-growing need for information and training on how to implement a MySQL database and access and
manage data in that database.

Because of its ease of implementation, low overhead, reliability, and lower Total Cost of Ownership (TCO),
MySQL has made remarkable inroads in the database management system market. As a result, the number
of programmers who must connect to a MySQL database and embed SQL statements in their applications
is growing steadily. There are now over five million MySQL installations worldwide, and that number is
increasing rapidly. In addition, MySQL supports connectivity to numerous application languages and envi-
ronments, including C, C++, PHP, ASP, ASP.NET, Java, Perl, C#, and Python, and it can be implemented on
a number of platforms, including Windows, Linux, Unix, Solaris, FreeBSD, Mac OS, and HP-UX.

Corporate implementations continue to grow and include such companies as Yahoo!, Cox Communications,
Google, Cisco, Texas Instruments, UPS, Sabre Holdings, HP, and the Associated Press. Even NASA and the
U.S. Census Bureau have implemented MySQL solutions. MySQL has been proven to work in large deploy-
ments, while reducing system downtimes and administrative overhead and lowering hardware expendi-
tures and licensing costs.

As organizations continue to seek ways to cut their TCO, MySQL will continue to gain in popularity—
and its user-base will continue to grow. As a result, MySQL will gain further ground in becoming a
prominent force in the industry. To meet this demand, Beginning MySQL provides you with a valuable
resource and step-by-step learning tool that supplies you with the background information, examples,
and hands-on exercises that you need to implement MySQL and manage data in its databases. Concepts
are introduced in a logical manner, with each chapter building on the previous chapters. By the end of
this book, you’ll have a complete foundation in MySQL, its implementation, and the methods necessary
to connect to databases and manipulate data.

Who This Book Is For


Before beginning any book that covers a computer technology such as MySQL, it’s always useful to
know who the book is intended for, what assumptions are made about your level of knowledge, and
what system setup—if any—is required to perform the exercises in the book. Beginning MySQL is no
exception. So before you delve into the book too deeply, take a closer look at each of these issues.

Because MySQL is such a robust, flexible, and easy-to-implement application, a beginner’s book about
the product will benefit a wide audience, both at home and at the office. The primary audience for
Beginning MySQL can be any of the following readers:

❑ Experienced PHP, Java, or ASP.NET programmers who are developing applications that access
backend databases and who are new to MySQL

TEAM LinG - Live, Informative, Non-cost and Genuine !


Introduction
❑ Experienced application programmers in any language who are new to MySQL and who want
to better understand how to implement a MySQL database and use SQL as it is implemented in
MySQL
❑ Experienced SQL programmers new to MySQL
❑ Experienced database designers, administrators, or implementers who are migrating to MySQL
❑ First-time SQL programmers who have no database experience
❑ First-time database designers, administrators, or implementers new to MySQL
❑ Users new to application programming and databases

In addition to the primary audiences, Beginning MySQL can be useful to the following readers:

❑ The home user who wants to create simple databases for such information stores as address
books, CD collections, or recipes
❑ The home business owner who wants to create database applications for such tasks as managing
customers and contacts, tracking inventories, or recording orders
❑ Managers and owners of small businesses who need database solutions that are both easy and
inexpensive to implement
❑ Group managers in larger companies who need database solutions that meet immediate needs
in their groups
❑ Directors, staff, or volunteers at nonprofit organizations who require database solutions that are
simple and inexpensive to implement
❑ Any other individual who wants to learn how to create and manage a MySQL database that can
support various data-driven applications

Nearly anyone new to MySQL will be able to benefit from Beginning MySQL. In addition, users who
have had experience with earlier versions of MySQL or with other database products will be able to use
the book to refresh and expand their skills.

To benefit from Beginning MySQL, you do not have to have a strong background in databases or any
other computer technology. You should, however, have at least a basic understanding of the following:

❑ You should know to negotiate your way around your operating system environment. The book
focuses on implementing MySQL on Linux and Windows, so whichever one you choose, you
should know how to use that system to copy and access files, add programs, change system set-
tings, or whatever tasks are common to your particular environment. If you’re using a Unix-like
system other than Linux, you should find that much of the Linux-related information will apply
to your system.
❑ You will need to know how to use your Web browser to access the Internet and download files
and view information.
❑ You should know how to use a text editor to create and edit text files.

These requirements are all you really need to use Beginning MySQL successfully and learn about how to
implement MySQL databases and manage data in those databases. For Chapters 17, 18, or 19, you should
have at least basic knowledge of Web development techniques. These three chapters focus on developing
a Web application that accesses data in a MySQL database. Chapter 17 covers PHP, Chapter 18 covers

xviii TEAM LinG - Live, Informative, Non-cost and Genuine !


Introduction
JSP/Java, and Chapter 19 covers ASP.NET/C#. Each chapter assumes that you have a basic knowledge of
developing an application in that language and of Web development in general. If you’re new to these
technologies and you want to build an application in one of these languages, it’s recommended that you
first review documentation specific to that language and to Web development in general.

What This Book Covers


The book uses a task-oriented structure that allows you to work through the steps necessary to install
MySQL 4.1 on Linux and Windows platforms, create and manage MySQL databases, query and manipu-
late data stored in those databases, administer the MySQL database management system, and connect to
MySQL databases from your PHP, JSP/Java, and ASP.NET/C# applications.

The next section, which describes the book’s structure, provides additional details about the specifics of
what the book covers.

How This Book Is Structured


Beginning MySQL provides you with an instructional tool that gives you a complete look at MySQL, how
it is implemented, and how it is accessed from various programming languages. The book takes a task-
oriented, step-by-step approach to explain concepts and demonstrate how those concepts are used in
real-world situations.

The structure of Beginning MySQL supports the complete beginner (those new to databases and SQL) as
well as those who are experienced with programming and other database products, but new to MySQL.
The book provides the conceptual and background information necessary for all readers to understand
individual topics, but each chapter is modular to support those readers who simply dip into different
parts of the book to use it as a reference. For example, someone completely new to databases might read
the book from cover to cover, applying information learned in one chapter to the material in the next
chapter. On the other hand, an experienced PHP programmer might want to reference only the chapters
related to SQL statements and PHP connectivity, without having to review chapters on database design
or administration.

Beginning MySQL describes and demonstrates each step necessary to create a MySQL database and access
and manage data in that database. Each chapter correlates with one of the primary tasks necessary to imple-
ment MySQL and to access data, either directly or through an application programming language. The
goal of the book is to provide you with a complete learning experience.

In Chapters 1 through 4, you are introduced to MySQL and relational databases. You are shown the steps
necessary to install MySQL on Windows and Linux, set up the initial MySQL configuration, and access
the MySQL server. You are also shown where to find MySQL components on your system and what tools
are available to access and manipulate data. Finally, you learn how to design a database that conforms to
the relational model. From this information, you will be ready to build a database in which you can store
and manage data.

Chapters 5 through 12 build on the concepts introduced to you in the first four chapters. These chapters
describe how to create databases that store data and help to enforce the integrity of that data. You then
learn how to insert data into those databases, update that data, and then delete the data. You also learn a
variety of methods to retrieve data from the database so that you can display exactly the data you need and
perform operations on that data. You are also shown the steps necessary to copy, import, and export data.

TEAM LinG - Live, Informative, Non-cost and Genuine ! xix


Other documents randomly have
different content
The Project Gutenberg eBook of Chitimacha
Notebook: Writings of Emile Stouff—A
Chitimacha Chief
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: Chitimacha Notebook: Writings of Emile Stouff—A Chitimacha


Chief

Author: Emile Stouff

Editor: Marcia G. Gaudet

Release date: August 1, 2020 [eBook #62803]


Most recently updated: October 18, 2024

Language: English

Credits: Produced by Stephen Hutcheson and the Online Distributed


Proofreading Team at https://www.pgdp.net

*** START OF THE PROJECT GUTENBERG EBOOK CHITIMACHA


NOTEBOOK: WRITINGS OF EMILE STOUFF—A CHITIMACHA CHIEF
***
CHITIMACHA NOTEBOOK
Writings of Emile Stouff—A Chitimacha
Chief

Edited by Marcia Gaudet

Lafayette Natural History Museum and Planetarium


Lafayette, Louisiana
1986

i
ii
iii
Emile Stouff, Chief of the Chitimachas

iv
Chitimacha Chief Benjamin Paul and the Chitimacha children are
pictured with a pirogue near the Chitimacha reservation in
Charenton. The little girl is Jane Bernard Wilson, the boy in the
center is Arthur Darden, and the boy sitting in the pirogue is Gabriel
Darden.

(M.R. Harrington, 1908. Photo courtesy of Museum of the


American Indian, Heye Foundation)

v
TABLE OF CONTENTS
I. Introduction 3
II. The Chitimacha Story of Creation 5
III. History of the Chitimacha Indians 11
IV. Previous Publications about the Chitimachas 15
LIST OF PHOTOGRAPHS
I. Chitimacha Chief Benjamin Paul with children and canoe fa
cing page 1
II. Chitimacha family—Regis Darden 2
III. Chitimacha group—1908 4
IV. Three members of a Chitimacha family 10

2
The Regis Darden Chitimacha family. Pictured from left to right are
Lucy Mora Darden, Delphine Stouff (in back), Adelle Darden, Gaston
Darden, Regis Darden (in back), and Stacy Darden. Adelle Darden,
wife of Regis Darden, was known as “Gum DaDa.” Lucy Mora Darden
was the wife of Gaston Darden. Chitimacha baskets are pictured in
front of the group. Basket weaving is a traditional craft of the
Chitimacha Indians.

(M.R. Harrington, 1908. Photo courtesy of Museum of the


American Indian, Heye Foundation)
3
INTRODUCTION
Emile Stouff was Chief of the Chitimachas of Charenton, Louisiana,
from 1948 to 1968. After Chief Stouff died in 1978, his widow, Faye
Roger Stouff, discovered two notebooks in which he had recorded
some of the things about the Chitimachas that he had learned from
oral tradition. The two manuscripts were written in Emile Stouff’s
handwriting. Though Chief Stouff had no formal education, Mrs.
Stouff, who is not a Native American, taught him to read and write
after they were married and she came to live with him on the
Chitimacha land.

Mrs. Stouff said that her husband told her he had learned most of
the legends, stories, and myths that he knew from an aunt who
would sit him down and beat him with a cane to make him listen.
She would tell him, “You’ve got to learn this.” Learning the history,
religious beliefs, legends, and traditions of the tribe was apparently a
very important part of the education and development of the
Chitimachas.

There are two separate notebooks with writings by Emile Stouff. One
begins with the story of creation and deals with the beliefs of the
Chitimachas. The other deals more with the history since the white
man came. Previous publications about the Chitimachas have
presented parts of the legend about the cypress tree in Lake
Dauterive and the legend about the little bird of the Chitimachas.
Since Chief Stouff’s version of the history is from the perspective of
the Chitimachas, it differs somewhat from previously published
accounts. This is particularly evident in a comparison of the
Chitimacha account of the murder of St. Cosme with accounts that
rely on French historical sources.
Chief Stouff’s notebooks give an account of the Chitimacha beliefs
and history as they were passed down by oral tradition. He
recognized that this tradition would perhaps not be maintained, and
he attempted to record some of his knowledge of the people and
their culture. As such, his writings are of value and interest to
anyone who would like to know more about the Chitimachas.

In editing the notebooks, I have made as few changes as possible in


order to maintain the style and tone of Chief Stouff’s writing. The
changes from his original manuscript have been mainly to
standardize spelling and punctuation for clarity. For example, Chief
Stouff spelled Chitimacha several different ways (Chetamacha,
Chetimacha, Chitamacha) in his writing, and he usually used no
punctuation at all. Thus, he was writing just as he would have told
these stories orally to the next generation of Chitimachas.

Marcia Gaudet

4
Chitimacha Group with finished Chitimacha baskets. Pictured left to
right are Delphine Darden Stouff, the child—Constance Marie Stouff
(died at age 13), Clara Darden, and Octave Stouff, Sr. They are,
respectively, Emile Stouff’s mother, sister, great-aunt, and father.

(M.R. Harrington, 1908. Photo courtesy of Museum of the


American Indian, Heye Foundation)

MANUSCRIPT OF EMILE STOUFF


Last Chief of the Chitimachas
THE STORY OF CREATION
In the beginning, the Great Spirit looked at a great mass of water.
So he said, “There should be something solid for animals with
blood.” So he called upon the crawfish to dig down and bring up
some dirt, which they did. As they brought up the dirt, the water
receded. The crawfish is still working at it. The Great Spirit was
pleased. So he took the dirt and made all living things with it. When
he ran out of objects, he said, “This is good, but I must make one to
control these animals. I will make man.” So he chose some good clay
and made a clay man, but it was soft. “I shall bake it in the fire from
the sun,” he said. So he baked it, and when he took it out, it was
pale. So he just blew on it and set it aside. Then, the more he
looked at it, the more he was displeased with it. So he said, “I will
let it live, but I will make another one and leave it longer to darken
it.” He left it twice as long as before and when he took this one out,
it was black. So he set it aside and said, “I shall make another,” and
when he baked this one he cut the time in half, and it came out
exactly as he wanted it. So he made three—one white, one black,
and one red. He named that one pinikan, meaning Red.

Then he saw man needed a helpmate. “I made man out of dirt so I


will take part of man to make his helpmate so they will be as one,
and she will be known as female as she is part of the male.” After
looking the male over, he decided to make her out of bone. So he
took a rib from the rib case, right in front of the chest, leaving a
bone dangling. When man woke up, he saw this female sitting there.
He noticed she was built different and beautiful. When he started to
her, he cried, “Wo Man,” and they committed the first sin (as we
know it). The man said, “You should cover yourself up.” The female
said, “And so should you. I know, I will take the large leaves from
this tree and make each a cover.” She made the covers and tied
them on with a vine known today as the white vine. When they
heard the Great Spirit coming, they were ashamed, and hid from
him. So he called for them to “Come out wherever you are.” Then
the Great Spirit asked them, “Why are you hiding?” Then the male
said, “She looked so enticing that I went into her without your
permission.” The Great Spirit said, “For that you shall go out on the
earth and earn your living by the sweat of your brow. If you do not
work, you do not eat, and you, woman, you shall bear his offspring
in great pain. I did not intend to have but you two, but since it is this
way, you will be fruitful and multiply so your seed may be many, and
now that you are smart, I will give you the earth, but remember you
are made of her dirt and you shall return to her. She is your mother.
She will feed you and clothe you. She will give you the trees to 6
give you nuts and fruits for you to eat and at seasons for birds
to live in, and fur bearing animals. You will also enjoy its shade.
When you are tired, you may rest on the soft grass that will grow.
The tree will have many uses. It will be used to warm you in the
winter, to make rafts to float on the waters, and it will make your
homes for your protection against the cold winter. It will heat you
when it is cold. It will cook your food and its fire will be a blessing as
the flames leave by small parts into the skies. It will also tell you the
direction you must go so you need not ever get lost while you are
traveling. The seed you shall plant, the earth will help them grow so
you will have something to eat. She will separate and make streams
to harbor the fishes you will eat and for you to drink and bathe. So
protect the waters and keep them clean. Your life depends on its
purity just like the air you breathe. You may have my breath in you,
and if you disobey me, I will withdraw my breath and you will be no
more. And through my breath, I will be with you always. When you
are sick, the earth will bear roots and herbs for you to use. I will not
inflict any sickness that will not have herbs to cure. I will speak to
your medicine man through a coma only and only to this man I shall
designate the cures. I will speak to him only through a vision. No
one else shall see me again, and this man shall choose someone of
his kind and reveal this secret to any man worthy of him. To avoid
conflict, there will be only one in each group to speak to me. His
power strength will be as strong as his faith in me. I shall keep the
mother earth in my custody so I may destroy it any time that you
have lost faith in me and disobey my teaching. You will, at any time
I choose for you, return your body to the mother earth, but if you
love me and keep the faith your spirits will go to the Happy Hunting
Ground, where everything will be for your taking, and you will die no
more. But if you do not, your carcass will remain in mother womb
and return to dirt of which you were created.

“The earth will be for your use. Use it in any way you choose. But no
one can claim it as their own. It is not to be bought, sold, or rented,
because the earth is mine. Misuse it, and you shall repent for any
wrong use of the land or its streams. This I command you to live by,
so go out in the world that you have made for yourself and be
fruitful and multiply.”

That is the way the Indians said the Great Spirit gave it to the first
man, and it was in practice when the white man came into this
country. The Great Spirit showed them how to make coverups out of
animal skin, called breachcloths, and they were happy. Now the man
who was to do the treating found a certain herb that would put him
into a coma, so he would build a fire and drink a tea made from this
herb and dance around this fire chanting until this herb took effect.
Then he would pass out. While in this stage, he would communicate
with the Great Spirit which would tell him what to do or what to use
or whatever his desire was. Someone asked the medicine man to
describe the Great Spirit since he claims he saw him. The medicine
man said he would be hard to describe since he has no shape, and
yet he has many shapes. “The way I saw him is like a heavy mist.
He had no eyes, yet he saw everything. He has no ears, yet he hears
everything, even the unspoken word within you. He has no mouth,
yet he speaks. You have heard him speak to you within your head,
something to not do that is wrong, or he will say do do that that is
good. He is watching you always. You cannot hide from his sight no
matter where you are or what you are doing.”
Now the Indians had no Hell, no Devil. They thought that 7
returning to dirt and not going to the Happy Hunting Ground
was the worst thing that could happen to them. It was their code,
not religion. They lived by sort of Moses’ law—an eye for an eye, a
tooth for a tooth. Their chief and councilmen would decide. Now the
white man says that they found them worshipping the moon or
some stars. True, they knew he was up there somewhere, so some
would think he was the man in the moon, and thought he was some
bright star. They did not know. Nonetheless, they knew that there
was a power stronger than them. They could feel him in their mind.
They did not teach fear to their children like they would go to hell.
They taught them bravery, to fear no one. As long as they obeyed
the Great Spirit, they would be content.

A long time ago, no definite date, came among the Chitimacha a


strange, fair complected man who spoke their language, which
amazed the Indians. He was very smart. The Indians said he knew
everything. He taught them to make better crops by using fish
byproducts and even fish by their plants, and it would make them
grow healthy and strong. He helped them to substitute herbs when
one was not available at different seasons. Then came one day, he
told the Indians it was time for him to leave the Chitimacha and go
do his father’s work. He picked out a cypress tree and climbed to the
top. Then he told the Chitimachas, “Whenever you need rain for
your crops, come and wet this tree and it will rain according to your
needs.” And until this day, it works. It has been proven by many,
many people, white and black. All over South Louisiana, people
know about it and believe in it strongly. That is how the Indians
were blessed by the Great Spirit. He gives and he takes. The
Chitimacha did not think it feasible to ask the Great Spirit for
anything. All they taught their children was how to thank him for all
the good things they got from him. If something went wrong along
the way, you just checked the past—you have done something to
displease the Great Spirit. It has always been and still is until today.
So the Indians would punish themselves to try and please the Great
Spirit.
Now the Indian has been ridiculed for talking to the Great Spirit
which is an Indian belief. The white prophets of old spoke to their
gods. Why should it be unreasonable for an Indian to do the same
under the Great Spirit? Guidance as afore stated, the Chitimacha do
not believe Adam and Eve naked in the Garden of Eden ate an
apple; however, the white man says so, so the Indians do not deny
it, since they had to accept the white God, which is the same
Supreme Being with different names. They are both sacred to the
Chitimacha. Since the Indians could not read or write, all this was
handed down mouth to mouth. So many things might be left out and
some could have been added. We do not know for sure, yet some of
your strongest and oldest organizations do not have anything written
and are still going strong.

We do know that the Indians did not preach religion. They live it.
They have a ceremonial for everything, and it was all done with
respect to the Great Spirit. Their dances, their chanting was
somewhat like your unknown tongue of today, and it was always
done around a fire because we believe that fire has life. If you watch
a fire, you will notice part of the flame leaves the fire and goes up to
carry the message to the Great Spirit, thanking him for a good
harvest, good hunt, a good fish catch, and many other things.

The council would meet and decide what punishment should be for a
wrongdoer, such as if one committed murder and they decided he
should die also, the chief would tell him. So having no jail, he 8
would be free until his time came. Time was measured by the
moon. The council would decide how many moons he had left. Then
the criminal would return to meet his execution and if he did not
return, his mother or father or brother or his son would have to pay
for his crime, someone very close to him. Now in the killing of one in
a brawl, the living was not punished by death. He had to see that
the family of the deceased was fed and clothed until all were
capable of taking care of themselves. If he had only enough for one
family, he had to do without, so the dead man’s family would not
suffer hunger. Now if a squaw committed adultery, she was punished
by cutting the tip of her nose. She would be forever marked as an
unfaithful squaw. There is no punishment known today for the man.

Once an Indian had an eye sore the medicine man could not cure.
So he had to go into a coma and seek the aid of the Great Spirit.
After the preparation that the Great Spirit had instructed them to do,
he passed out, so to speak. The Great Spirit told him where to find
the herb that would cure any sore eye. It seems that the chief’s little
girl had died and was buried. The Great Spirit told him to go to the
grave of this little girl, and he will find a small vine growing from her
eye. Use that vine and leaves, and make an eye wash with it. He did
and the eyes were cured (and we were still using it till we were
forbidden by the medical association to use any herb), and many
herbs were found, like moner, and until today only one of the tribe
knows the herbs that were used since the beginning, which will not
be revealed to anyone. The Indians of today do not meet the
standard that the Great Spirit set, nor will they follow the ritual that
goes with it, so it will die out just like the other things the white man
deprived the Indians of, their way of living.

The chief duty was to see that everyone had something to eat
before he would eat. If some did not have any through no fault of
their own, everyone had to share what they had with the one that
had none. These were the unwritten laws that the Chitimacha lived
by. As far as this writer knows that is the way it was related a long
time ago. (I make no excuse for adding some or leaving some of it
out. As time goes on, perhaps some more will come to mind. If so, it
will be added to this brief resume of the one and only Great Spirit as
the Indians knew him before the white man came.)

The Indians knew how to make rain without the rain tree and how to
make the north wind blow to dry up the weather when necessary. I
have seen it work time after time. It is a secret given by the Great
Spirit for their use, but they were warned never to abuse it nor use it
to harm your fellow men. But such rituals cannot and will not be
revealed to the Indians of today. They are too well integrated with
the white man and his ways. It may not work for them, so let it die
out like so many rituals have. Like an old Indian chief once said,
“The campfire is dying out, the hunt is almost over.” But what will
happen to the songs and the folklore? They will soon die out also.
Everything an Indian does is done in a circle because all things are
round. The moon, the stars, the sun, the sky, the world is round. So
he must also do everything in a circle. The sun rises and circles
overhead until it disappears and returns to do the same thing again.
So does the moon. The stars do the same thing. Their homes were
built in circles. Their lives were lived in a circle from birth to death to
birth after death.

The extremely beautiful creation of the Chitimacha Indians is


amazingly similar to the Biblical Genesis. The animal was created
before man. So in this Divine Origin, they have a certain 9
proximity to the Great Spirit himself which serves the same
function as revealed scriptures in other religions. There are
intermediators or links between man and the Great Spirit. The Great
Spirit comes to the Indian vision involving animal forms. One old
Indian, the last we know of, received his spiritual power from visions
of a wolf and when he died in the house where an Indian still lives, a
pack of wolves came and ran around the house several times and
then left never to return as far as we know. We as Indians have lost
the communication with the Great Spirit. Then we still have a very
small bird that lives with the Indians, and it peeps things Indians
understand. It tells when someone is coming, when it is going to
rain, and many other things only an Indian understands. No Indian
was allowed to harm this little bird.

Indians see signs from all the wild animals—have some trait—an
Indian notices them very close, thinking they are the love of the
Great Spirit. Since he created them first, we regard all created
beings as sacred and important for everything.

This is the way it was told to me many years ago. So be it.


10

Three members of a Chitimacha family. Pictured left to right are


Felicia Mora Darden, Ernest Jack Darden, and Emma Darden
Bernard.

(M.R. Harrington, 1908. Photo courtesy of Museum of the


American Indian, Heye Foundation)
11
HISTORY OF THE CHITIMACHA INDIANS
I will try to write here what I know of the Chitimacha Indians as I
know it and what I heard from the old people.

The tribe once lived on Grand Lake from Bayou Portage, as that is
where the Sacred tree now stands, to the shell beach here in
Charenton. That is where they were living when one day a large
boat came up from where the sun rises. It stopped out in the lake a
distance from shore. The Indians were amazed at its size and stood
on shore looking when some men came ashore to see about coming
ashore. Since they did not speak the same language, they were
chased back to their ship. (They were Spanish.) Next day they
decided to come ashore by force, but the night before the chief
consulted the medicine man to find out what should he do. The
medicine man took some kind of herbs and burnt them and gathered
the ashes and told the chief if he would spread the ashes on the
shore line, not one would put the foot on land. So it was done by the
chief. They tried, but the warriors held them off as the chief stood
on the shell knolls with the ashes in hand throwing bits in the air.
They Spaniards were so badly defeated, they went off in their ship.
The Chitimacha, thinking they had chased them off for good, forgot
about them and again were enjoying life like it was.

Not too many moons later, the Spaniards came back to the Indians
on Bayou de Chittamach (known now as Bayou Lafourche) and
gathered the Houma Indian which they had defeated and enslaved
to fight the Chitimachas. Somehow they came up Bayou Teche and
attacked from that side. While they were fighting the Houma
Indians, the Spaniards came and landed on the lake side, which is
known now as the Shell Beach and attacked from that side. The
Chitimacha did not have a chance. Thousands were killed and
wounded and nothing to eat. We had to give up.
The enemy told the few remaining Chitimachas, “This is what we will
give you. You may remain here on this bayou and live. No harm will
come to you, but any Indian caught in the woods or lakeshore will
be shot on sight.”

This parcel of land we now hold is the very same place that they
were talking about.

We have no record of what happened to the Houmas that survived


the war. Perhaps the Spaniards took them home or they remained
here and intermixed with us. I do not know.

Hunting along the Bayou Teche was not so very good, so the Indians
had to eat whatever they could find such as acorns, wild fruit, and
some grass was edible until they could grow some vegetables. Then
life became more bearable.

Now that is the way I heard, true or not.

I do know that the Houma Indians were hated by all the old Indians
as late as the twenties. Few Houma Indians came over and were not
received by the old Indians with the exception of two women. I will
cover them later.

After the Spaniards settled, they had their first governor by the
name of Galvez. The year 1763, Galvez signed a treaty with 12
the Chitimachas for living so peaceful. He granted them 1100
acres of land on both sides of Bayou Teche.

There is no record I can find how they built the town of Charenton in
the middle of the grant. The older Indians did not say what
happened from then to the time when Spain sold out to France.

When the Frenchmen came over, they started to take over the land
that was donated to the Chitimachas which they claimed the French
had bought it all from Spain. The treaty was no more good.
Then the French started killing Indians. The Indians tried to fight
back, but were no match for Frenchmen who nearly wiped out the
Indians. They killed them like animals, slaughtered, murdered until a
few that remained gave up. So the French took them and made
slaves out of them, those able to work in the fields. The women
were made servants, the young ones taken by the French as
concubines. They were forced to lay with the men, as young as ten
years old. There were more men than there were Indian women, so
one Indian woman would satisfy the lust of five or six Frenchmen.

Then half breeds were born to the Indian women. Some of us still
have French names.

There were only about fifty Indians escaped to Plaquemine, Weeks


Island, and all about. Some of them came back here and lived pretty
peaceful with the French. They populated well.

By that time the Frenchmen decided that the Indian worship of the
Great Spirit was wrong. They must forget their way of living and live
like the Frenchmen. So they sent a missionary among the Indians to
teach them their invisible God. The Indians, ready to believe
anything to help their plight, believed what this man was saying. His
name was St. Cosmos. He was so pleased with his work, he talked
the Chief into letting him take some Indians to meet the General to
show him how they had accepted the white God. So the Chief
consented to let them go. He took six of the Indian braves and left.
It was not known where the French army was located. Anyhow,
when they got there the soldiers killed all the Indians. The priest
was outdone, so to speak, so he returned to the reservation. When
the Chief asked where were his men, the priest told him they were
all dead, shot by the French army. The chief was so very angry, he
ordered the priest killed and brought back to the French. So be it.
When the French woke up the next morning, there was the dead
priest. That is when all hell broke loose. The French hunted the
Chitimachas down and killed everyone in sight. Some Chitimachas
ran and hid all over the woods. Some went to what is now Weeks
Island, some got to Plaquemine. There were about fifty Chitimachas
remaining on the same land that is now the reservation.

At that time, O’Reilly was governor of Louisiana. He issued a


proclamation that the Indians could live there as long as they
remained peaceful and that they were on their own and that parcel
of land would show as a body of water on the map of Louisiana. This
map can be found in the archive of the state Capitol today.

Now about that time, Negro slaves were brought into the South. The
white plantation owners brought black slaves and began to let the
Indians go as they were not too good at work. So the free Indians
had no place to go but back to the Indian reserve with their half
breed French and Indian. It was assumed that is how the
Chitimachas got their names until today. Some of the ones that had
escaped started to come back and some did not. Some 13
remained in Plaquemine where some of them still show the
Indian trace. Of course, they are whites today. And that is how we of
today are descendants of that bunch of Indians. There is no record
of how many there were. We are a small tribe today.

Now there is not much said about the Chief. It seems like they lived
without a chief until the late 1700’s when one Chief, Soulier Rouge,
seems like he acquired a pair of red shoes. Somehow the French
started calling him Soulier Rouge. His first name was Eugene.
Nothing was said about his reign. Only when he died, his squaw took
over (Euginie) and that is when the land started to disappear. She
seems to be one of those Indians that lick white man’s boots just to
be with them. It is recorded that she sold Rose Pecot 610 acres for
$9.00 per acre and a man by the name of Alex Frere 640 acres of
land. The record shows that some of the money was divided among
some Indians at $40.00. That is the way it was recorded in the Court
House. The names on the record do not jive with any name of the
now Chitimachas. Somebody gave her an old Mexican silver crown
for a large acreage, but we cannot find out where, but we have the
crown. And it is recorded that in 1817 they leased 610 acres of 99
years. That was 168 years ago. It is also recorded that land was sold
the same year it was leased—which the sale is no good. Now my
lawyer told me that after the lease expires it cannot be re-leased by
the same party.

But we Chitimachas are a nation of people that are afraid to venture


as we may make the whites mad, and we seem as we do not want
that. We have the money to regain that property, but we do not
trust lawyers in this vicinity as we think they would work for the
white instead of the Indians, which was proven in the period of 1903
to 1910. One white lawyer named George Demerest and one civil
engineer named Fusilier contacted the Indians stating that (the
agreement with) Soulier Rouge and Alex Dardenne was illegal as
they could not read or write, that they could gain all that land back
for the Chitimachas. (I think John Paul might have been Chief then.)
The Indians had no money, so it was agreed that Demerest would
work for part of the land. It would not cost the Indians one penny.
So I guess the tribe, thinking that the land was lost anyhow, so
whatever they got back would be okay. So it was agreed that
Demerest would get 4/9 of the land for the Indians. The legal papers
were drawn and signed by both parties. So Demerest took to court
in Franklin. As to be expected, he lost the case. So the Indians must
have been a little outdone, but they figured the case was closed. But
they had signed to give George Demerest 4/9 of the land, win or
lose. So Demerest took all of Georgetown.

Fusilier surveyed the land and found that it was three acres short of
4/9, so he came over and started to measure three acres on Uncle
Regis’ land. He was stopped by a shotgun pointing at his head and
ordered to get off. So he did, and they thought that was the end of
it. I can remember that incident. They would laugh when they said
Regis was going to shoot Fusilier. But what they did not know was
that Demerest took out a lien on the land. The Indians ignored the
judgement until 1916, when Demerest foreclosed on the land, which
by now included all of the Chitimacha’s land. The lien was to be sold
on the courthouse steps. Now Tante MiMi was Chief Ben Paul’s wife.
She was in cahoots with one Sarah McIlhenny at Avery Island in a
basket trade. Miss Sarah would buy all the baskets the Chitimacha
women would make. The basket makers gathered at Tante 14
MiMi’s and decided to write to Miss Sarah and ask her help.
Being a very rich woman, they were sure that she would help. She
did not say she would or would not. She sent her lawyer to Franklin
to pay off the mortgage, and there was no sale. The land belonged
to Avery Island. Miss Sarah then made arrangements with Chief Ben
Paul to rent the land to some farmers and pay her back, as she did
not want the land. She only wanted her money back. So this was
done. The chief let some Negro farmers work on share as they had
no money to pay rental. Come harvest time, the Chief had a barn full
of corn and sweet potatoes and no market. The stuff just stayed
there and rotted. He sold some. Up to 1918, he had sold and paid
back $600.00, more or less.

In the meantime, McIlhenny lawyers were checking the title of the


property and found that the sale was illegal as some of the people
had title to the land, and the best thing for her to do was to petition
the B.I.A. (Bureau of Indian Affairs) to pay her back and take the
land in trust for the Indians. The B.I.A. hired a lawyer in Franklin
named C.J. Boatner to transact the deal in which he had all the
Indians sign the land over to the government, except some were not
available at the time. What the ignorant Indians did not know was
that this property was not a reserve any more. They were giving title
to the land, and were paying taxes on their property. The then Chief
who made the deal with Demerest did not have the authority to sign
any deal with anyone. So the government took over some private
land which is not lawful. This statement is recorded in the
courthouse and can be made available anytime. These records are
not in Franklin, as Franklin is twenty miles from here.

15
PREVIOUS PUBLICATIONS ABOUT THE
CHITIMACHAS
Hoover, Herbert T. The Chitimacha People. Phoenix: Indian Tribal
Series, 1975.

Kniffen, Fred. The Indians of Louisiana. Baton Rouge: Louisiana


Bureau of Educational Materials, Statistics and Research, College
of Education, Louisiana State University, 1965.

Orso, Ethelyn and E. Charles Plaisance. “Chitimacha Folklore,”


Louisiana Folklore Miscellany, vol. III, no. 4 (1975 for 1973), pp.
35-41.

Stouff, Faye. The Chetimachas of Charenton. Booklet published by


Lafayette Natural History Museum, 1974.

Stouff, Faye and W. Bradley Twitty. Sacred Chitimacha Indian Beliefs.


Pompano Beach, Florida: Twitty and Twitty, Inc., 1971.

Swanton, John R. Indian Tribes of the Lower Mississippi Valley and


the Adjacent Coast of the Gulf of Mexico. Washington, D.C.:
Smithsonian Institute, Bureau of American Ethnography, Bulletin
43, 1911; Reprinted 1970, Johnson Reprint Corp.

Taylor, Gertrude. “Early History of the Chitimacha,” Attakapas


Gazette, vol. XVI, no. 2 (Summer 1981), pp. 65-69.
Transcriber’s Notes
Silently corrected a few typos.
Retained publication information from the printed edition: this
eBook is public-domain in the country of publication.
In the text versions only, text in italics is delimited by
_underscores_.
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!

ebookultra.com

You might also like