Printer Friendly
The Free Library
14,557,847 articles and books
Member login
User name  
Password 
 
Join us Forgot password?

MySQL explained.


MySQL is a relational database management system relational database management system - relational database , or RDBMS (Relational DataBase Management System) See relational database and DBMS.

RDBMS - relational database
. This type of system stores one or more databases, each of which can contain tables of data of various types eg:
NAME               ADDRESS      CITY          STATE

Henry J. Tillman   321 Elm St   Sacramento      CA
John Smith         122 Oak St   New York City   NY
Amy Johnson        333 Poplar   Lane Chicago    IL


Relational Databases

While it is quite useful to store data in simple tables like this, the strength of a relational database system is that you can link data between multiple tables. For example you may have a separate table of names and phone numbers.
NAME               PHONE NO.

Henry J. Tillman   713-555-2395
John Smith         212-555-9344
Amy Johnson        312-555-2904


Because this table uses the same names as the address table, you can easily find the address and phone number for a name by connecting information in the two tables. By looking at several different tables, the database server can manage complex systems of data easily.

Client-Server Systems

MySQL, like most RDBMS systems, is a client-server system. In this type of system, a server manages the actual data storage. One or more clients can connect to the server, send it data or request data, and obtain.

Client-server systems are powerful because the server can focus on data management without worrying about the user interface or other issues. Different types of clients or multiple clients can connect to the server simultaneously. The MySQL client sends a request or query to the server. This may be a request for a certain record or group of records from a database, a request to add to the database, or any of several other types of requests. The server receives the query and sends a result back to the client.

The Anatomy of MySQL

MySQL consists of both client and server components.

Hardware

The MySQL server runs on many different types of hardware. PC systems running Linux or 32- bit Windows are the most common hardware used. The hardware required for the server depends on how busy the server will be with client requests.

Server Software

The MySQL server software is available from MySQL AB MySQL AB (founded 1995) is dual headquartered in Uppsala Sweden and Cupertino California USA. The company is the creator and owner of MySQL, a relational database management system.  at www.mysql.com/. The software is free for noncommercial use under Open Source Gnu Public Licence (legal) GNU public licence - Properly known as the General Public License. Improperly known as the General Public Virus. (GPL See GNU General Public License.

1. GPL - General Purpose Language.
2. GPL - ["A Sample Management Application Program in a Graphical Data-driven Programming language", A.L. Davis et al, Digest of Papers, Compcon Spring 81, Feb 1981, pp. 162-167].
). Users can download the software and install it on a Windows, Linux, or other machine.

Client Software

A simple MySQL monitor, is included with the server software. You can also use any client that know the correct protocols to communicate with the server.

Programming Languages

In addition to the existing MySQL clients, you can use programming languages such as PHI phi
n.
Symbol The 21st letter of the Greek alphabet.


PHI,
n See health information, protected.
? and Perl to create applications that can communicate with a MySQL server. This allows you to create custom client software for virtually any purpose.

MySQL Terminology

Databases in general, and MySQL in particular, use a few terms you may be unfamiliar with. The following is an overview of some of the MySQL terms you will encounter.

MySQL Server

The MySQL server is a software service that runs on a computer, typically a Unix or Windows machine. The MySQL server accepts requests from clients and sends results back to them.

MySQL Client

A MYSQL client is an application that sends requests to a MySQL server and works with the resulting data. A simple command-line client comes with the MySQL server software. Applications written in in Web languages such as PHP (PHP Hypertext Preprocessor) A scripting language used to create dynamic Web pages. With syntax from C, Java and Perl, PHP code is embedded within HTML pages for server side execution.  and Perl can act as customised MySQL clients.

Database

A database is a file structure for organizing data, and consists of one or more tables. The MySQL server can store any number of databases,, and clients can work with them concurrently.

Table

A table is a unit of data storage within a database. Each database can contain one or more tables. Tables are defined with a set number and type of columns, and can contain any number of rows.

Column or Field

The columns, or fields, define the types of data stored in a database table. For example, a table that stores a mailing list An automated e-mail system on the Internet, which is maintained by subject matter. There are thousands of such lists that reach millions of individuals and businesses. New users generally subscribe by sending an e-mail with the word "subscribe" in it and subsequently receive all new  may include columns called Name, Address, City, and State. A table can have one or more columns. Each column is defined with the type of data it will store--for example, a number, a string of text, or a date.

Row (or Record)

Each entry in the database is a row, and each row includes a data item for each column. For example, in a mailing list table, each combination of name and address would for one row of the table. Rows can be added, removed, or modified at any time. When clients request data, it is returned in rows. Rows are also known as records.

Primary Key

In order to access a single record in a database table, the server needs a unique identifier With reference to a given (possibly implicit) set of objects, a unique identifier is any identifier which is guaranteed to be unique among all identifiers used for those objects and for a specific purpose.  for each row. The primary key is a column chosen to be this unique identifier. For example, the name would be an appropriate primary key for an address database. Each table can have one primary key consisting of one or more columns.

Index

The database server stores extra information about the values used in the primary key field in an index. This allows for faster searching by this field. You can also specify that other fields in a table be indexed if they will be searched on frequently. These indexes are each known as secondary keys.

Query

Each request that a MySQL client sends to a server is called a query. Queries use SQL SQL
 in full Structured Query Language.

Computer programming language used for retrieving records or parts of records in databases and performing various calculations before displaying the results.
, or Structured Query Language See SQL.

Structured Query Language - SQL
. A query can request one or more rows of data, or request that an action be performed--for example, adding a new row or deleting an existing row.

SQL

SQL, or Structured Query Language, is the language used in MySQL queries. SQL is a standardized language that uses commands to perform various functions on the database server. Examples of SQL commands include INSERT to add a row to a table and SELECT to find one or more rows within a table.

Other Database Systems

MySQL, it is actually just one of several database management systems, also known as DBMS (DataBase Management System) Software that controls the organization, storage, retrieval, security and integrity of data in a database. It accepts requests from the application and instructs the operating system to transfer the appropriate data.  that you may find useful. Many of these systems use similar languages and can be used interchangeably and you can choose whichever server fits the needs of your application. MySQL is neither the simplest nor the most sophisticated of database systems. The following are some of the other popular systems, ranging from simpler than MySQL to far more sophisticated.

Flat File Database A flat file database describes any of various means to encode a data model (most commonly a table) as a plain text file. Flat files
A flat file is a file that contains records, and in which each record is specified in a single line.
 

The most basic of databases does not use aDBMS at all. Applications can simply store data in one or more files. This is the traditional approach used by applications such as spreadsheets. Languages such as Perl have features that allow you to use DBMS-like features to manage simple files.

The advantage of this is that it can run on many platforms and does not require a database server but it offers few of the advantages of a true database management system.

PostgreSQL

PostgreSQL is another popular DBMS and an alternative to MYSQL. It is free and open source software See free software and open source. . PostgreSQL supports some features of the SQL language beyond what MYSQL supports, and offers features like transaction support that may make it a better choice for high-end applications. PostgreSQL can be run on most Linux and UNIX systems.

Microsoft SQL Server A relational DBMS from Microsoft that is a major component of the Windows Server System. It is Microsoft's high-end client/server database and is closely integrated with Microsoft Visual Studio and the Microsoft Office System.  

While Access is a simple desktop database, Microsoft SQL Server is a full-featured client-server DBMS. The server software runs exclusively on Windows NT (Windows New Technology) A 32-bit operating system from Microsoft for Intel x86 CPUs. NT is the core technology in Windows 2000 and Windows XP (see Windows). Available in separate client and server versions, it includes built-in networking and preemptive multitasking. , 2000 and XP systems. The advantages of SQL Server An earlier relational DBMS from Sybase and from Microsoft. Sybase introduced SQL Server in 1988 for various Unix versions. In that same year, with help from IBM, Sybase created an OS/2 version that Microsoft licensed and branded as Microsoft SQL Server.  include its wide support in Windows-based applications and its reliability, which has led to its use by many corporations, banks, and even stock exchanges.

MicrosoftAccess

The Microsoft Access A database program for Windows, available separately or included in the Microsoft Office suite. Access is programmable using Visual Basic for Applications (VBA). Access can read Paradox, dBASE and Btrieve files, and using ODBC, Microsoft SQL Server, SYBASE SQL Server and Oracle data.  is by far the most popular desktop database software suite and is available as part of the Microsoft office Microsoft's primary desktop applications for Windows and Mac. Depending on the package, it includes some combination of Word, Excel, PowerPoint, Access and Outlook along with various Internet and other utilities.  Suite Access uses an internal DBMS that stores data in local files, and the ability to share files between networked computers is limited. Nevertheless, it is it is useful for simple applications and has a friendly user interface. Access can also work as a client for Microsoft SQL Server, and includes tools to simplify the migration of Access databases to SQL Server.

Oracle

Oracle is a high-end DBMS popular for use in corporate databases and in larger and more critical Web sites. It supports transactions and other features for high reliability, availability, and speed. Its server software runs under UNIX or Windows systems. Visit Oracle's Web site at www.oracle.com for more information

mSQL

Mini SQL from Hughes Technologies, known more popularly as mSQL, is another popular choice as the back end of Web sites. Similar to MySQL in language and functionality, mSQL's advantages are also similar to those of MySQL Its server software is lightweight can run on machines with limited resources, and is supported by many programming languages. It is commercial product, but free copies are available for educational users and nonprofit organizations Nonprofit Organization

An association that is given tax-free status. Donations to a non-profit organization are often tax deductible as well.

Notes:
Examples of non-profit organizations are charities, hospitals and schools.
.

DB2

IBM's DB2 is aDBMS with a long history in mainframe computing. The latest version, DB2 Universal Database runs under AIX (Advanced Interactive eXecutive) IBM's Unix-based operating system which runs on its Intellistation workstations and pSeries, p5, iSeries and i5 server families. , Windows, and most UNIX systems. It is another popular choice for banks and other corporations with critical data storage needs, and includes features that make it work well with Web standards Web standards is a general term for the formal standards and other technical specifications that define and describe aspects of the World Wide Web. In recent years, the term has been more frequently associated with the trend of endorsing a set of standardized best practices for  such as Java and XML XML
 in full Extensible Markup Language.

Markup language developed to be a simplified and more structural version of SGML. It incorporates features of HTML (e.g., hypertext linking), but is designed to overcome some of HTML's limitations.
.

Structured Query Language (SQL)

SQL (Structured Query Language) was first developed by IBM (International Business Machines Corporation, Armonk, NY, www.ibm.com) The world's largest computer company. IBM's product lines include the S/390 mainframes (zSeries), AS/400 midrange business systems (iSeries), RS/6000 workstations and servers (pSeries), Intel-based servers (xSeries)  and is now a standard maintained by the ANSI (American National Standards Institute, New York, www.ansi.org) A membership organization founded in 1918 that coordinates the development of U.S. voluntary national standards in both the private and public sectors. It is the U.S. member body to ISO and IEC. , or American National Standards Institute See ANSI.

(body, standard) American National Standards Institute - (ANSI) The private, non-profit organisation (501(c)3) responsible for approving US standards in many areas, including computers and communications. ANSI is a member of ISO.
. Most current DBMS systems follow the SQL standard to some degree. MySQL's query language A generalized language that allows a user to select records from a database. It uses a command language, menu-driven method or a query by example (QBE) format for expressing the matching condition.  is based on this standard. The following is an overview of some of the most important commands in MySQL. You can use these commands from any MySQL client, such as the MySQL Monitor

CREATE DATABASE

The CREATE DATABASE command creates the file structure for a new database and assigns it the name you specify. This command does not by itself store any data, but you must create a database before you can use it.

SHOW DATABASES

The SHOW DATABASES command displays a list of the databases that have been created on the MySQL server. The SHOW command can also be used to display tables for a database and other categories of information.

DROP DATABASE

The DROP DATABASE command deletes an existing database. Do not expect a friendly warning when using this command: The database is deleted instantly and without confirmation immediately, without confirmation, including all tables and rows. Use this command with extreme caution.

USE

The USE command selects a database for use by other commands. The database you specify with USE must already exist. The commands that work with tables and rows of data will only work if you have selected a database using this command.

CREATE TABLE

The CREATE TABLE command creates a table within the currently selected database. To create a table, you specify the fields (columns) it will contain and a field type for each one. The command can optionally include information about the keys and indexes available in the table. This command often requires multiple lines

DROP TABLE

The DROP TABLE command deletes a table from the currently selected database. All of the data stored in the table is permanently deleted and, as with the DROP DATABASE command, this happens instantly and without confirmation. Use this command with caution.

SHOW TABLES

The SHOW TABLES command displays a list of tables available in the currently selected database. You can use this command when you are unsure of the exact name of a table within the database.

INSERT

The INSERT command inserts a new row of data into an existing table within the currently selected database. You can specify a list of fields in the INSERT command along with values for each field.

UPDATE

The UPDATE command alters one or more existing rows of data within a table. The WHERE keyword can be used with this command to specify one or rows to alter. The command specifies new values for one or more of the fields within each row. These values can be based on existing fields or constant values specified within the command.

If you do not specify a WHERE clause, this command will update all of the rows in the table. While you will sometimes wish to update all of the rows, using UPDATE without a WHERE clause can cause loss of data if you are not careful.

DELETE

The DELETE command deletes one or more rows of data within an existing table. The WHERE clause should be used to specify the rows that will be deleted. Use this command with care: If you omit the WHERE clause, all rows of data within the table are deleted.

SELECT

The SELECT command retrieves one or more rows from a database. You can specify the columns to be returned or use the wildcard See wild cards and wildcard mask.  to return values for all columns in the order they appear in the table definition. You can use a WHERE clause to specify one or more conditions that rows must match in order to be returned. If you do not use a WHERE clause, the specified columns from all of the rows in the database are returned.

TO DOWNLOAD MYSQL

Before you can use MySQL, you need a working MySQL server. If you do not already have access to one you can download the MySQL software from the MySQL Web site, wwwmysql.com/, and install it on a computer running UNIX, Windows, or another supported operating system operating system (OS)

Software that controls the operation of a computer, directs the input and output of data, keeps track of files, and controls the processing of computer programs.
. MySQL is freely available for non-commercial use.

To access the downloadable files, click the Download link from the MySQL Web site are and then click the link for the version of MySQL

The current stable release is MySQL 3.23. Under this site's Download page, several different versions of MySQL are available. The version you should download depends on your operating system. For Windows, the choice is simple a ZIP file (1) A file that contains one or more files that have been compressed into the ZIP format. Also called a "ZIP archive," "zipped file" or "zipped archive," the ZIP algorithm is the most popular compression method in use.

Not Just the .
 is available with everything you need for installation.

The download for Red Hat Linux Red Hat Linux, assembled by Red Hat, was a popular, "middle-aged" Linux distribution (not as old as Slackware but older than Ubuntu) upon its discontinuation in 2004.[1]

Red Hat Linux 1.0 was released on November 3, 1994.
 and other versions that. support RPM packages is also simple. MySQL is divided, into several packages for its different components: server software, client software, shared libraries, development files, and benchmarking utilities. You can install these using the rpm command.

If you have a different version of Linux or UNIX, the next alternative is to download the binary distribution Binary distribution is when a country has 2 or more dominant cities (megacities). [1] Countries with binary distribution
  • Brazil (São Paulo, Rio de Janeiro)
  • China (Shanghai, Beijing, Shenzhen)
  • India (Mumbai, Delhi, Kolkata)
. These are stored as tar.gz files, one for each of the five components. The installation process for these is slightly more complex, but easier than installing from source code. Binary packages are available for Linux running under Intel (PC) systems, DEC Alpha See Alpha.

(processor) DEC Alpha - A RISC microprocessor from DEC. In November 1995, the Alpha was purportedly the fastest non-research chip used in commonly available workstations. It is superpipelined and superscalar.
, 1A64, Sun Sparc, and S/390. System.

Additional binary versions are available for other operating systems Operating systems can be categorized by technology, ownership, licensing, working state, usage, and by many other characteristics. In practice, many of these groupings may overlap. . If one is not available for your operating system, you can download the source code and compile and install it.

From: MySQL Wiley Publishing Inc. ISBN-7645-1692-2
COPYRIGHT 2004 A.P. Publications Ltd.
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2004, Gale Group. All rights reserved. Gale Group is a Thomson Corporation Company.

 Reader Opinion

Title:

Comment:



 

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:Standards--Databases; Relational Database Management System
Author:Moncur, Michael
Publication:Database and Network Journal
Geographic Code:1USA
Date:Apr 1, 2004
Words:2453
Previous Article:"RELAX NG.".(Book Browser)
Next Article:BS 7799 explained.(Standards--Security)(information security management)
Topics:



Related Articles
NUSPHERE MYSQL SUPPORTS LINUX, UNIX AND WINDOWS PLATFORMS.(Product Announcement)
DATABASE ENABLES DEVELOPMENT OF E-COMMERCE APPLICATIONS.
OPEN SOURCE SOFTWARE RECEIVES RECOGNITION THROUGH LINUX.(MySQL 4.1)
Netfirms offers MySQL databases.(Brief Article)
DATABASE MANAGEMENT TOOL COMBINES PHP SCRIPTING WITH MYSQL.
ARKEIA HOT BACKUP PLUG-IN COMPATIBLE WITH MYSQL.
MySQL V5--ready for prime time business intelligence.(DATABASE AND NETWORK INTELLIGENCE: White Paper)
O'Reilly.
O'Reilly.
MySQL--DBMS.(DEFINITIONS)

Terms of use | Copyright © 2009 Farlex, Inc. | Feedback | For webmasters | Submit articles