| Working with Database |
| |
| Introduction |
| |
| What is Database? |
| |
| A database is a structured collection of records or data that is stored in a
computer system. The structure is achieved by organizing the data according to
a database model. The model in most common use today is the relational model.
Other models such as the hierarchical |
| |
| A database is an organized collection of data that is useful to us. The data inside in a database can be modified, deleted or new data can be added. |
| |
| They are stored in the form of records as shown in the table below: |
| |
 |
| |
| The above table shows a single record. The columns-Associate_TID, Associate_name, Age ,Commission are the fields or attributes, while the row containing the corresponding the values-900678432, Smith, 28, 25000 is a single record. There can be a number of records in a table and number of tables in a database. |
| |
| The tables in a database are related to each other through one/more attributes/fields. A Database is diagrammatically shown below. It consists of two tables-Associate and Asso_INFO. While Associate stores information regarding an Associate TID, dept and salary, the table Associate_INFO stores TID, name and date of join of the Associate. The common link between the tables is established by the field Asociate-TID. |
| |
 |
| |
| Why use MySQL? |
| |
| If you're looking for a free or inexpensive database management system, several are available from which to choose: MySQL, PostgreSQL, one of the free-but-unsupported engines from commercial vendors, and so forth. |
| |
| When you compare MySQL with other database systems, think about what's most important to you: Performance, support, features (SQL conformance, extensions, and so forth), licensing conditions and restrictions, and price all are factors to take into account. Given these considerations, MySQL has many attractive features to offer: |
| |
. Speed:
MySQL is fast. The developers contend that MySQL is about the fastest database you can get.
. Ease of use:
MySQL is a high-performance but relatively simple database system and is much less complex to set up and administer than larger systems.
. Query language support.
MySQL understands SQL, the language of choice for all modern database systems.
. Capability
Many clients can connect to the server at the same time. Clients can use multiple databases simultaneously. You can access MySQL interactively using several interfaces that let you enter queries and view the results:
command-line clients, Web browsers, or X Window System clients. In addition, a variety of programming interfaces are available for languages such as C, Perl, Java, PHP, and Python.
. Connectivity and security:
MySQL is fully networked, and databases can be accessed from anywhere on the Internet, so you can share your data with anyone, anywhere.
. Portability:
MySQL runs on many varieties of UNIX, as well as on other non-UNIX systems, such as Windows and OS/2. MySQL runs on hardware from home PCs to high-end servers.
. Small size:
MySQL has a modest distribution size, especially compared to the huge disk space footprint of certain commercial database systems.
. Availability and cost
MySQL is an Open Source project, freely available under the terms of the GNU General Public License (GPL). This means that MySQL is free for most in-house uses. (If you want to sell MySQL or services that require it, that is a different situation and you should contact MySQL AB.)
. Open distribution:
MySQL is easy to obtain; just use your Web browser. If you don't understand how something works or are curious about an algorithm, you can get the source code and poke around in it. If you don't like how something works, you can change it. If you think you've found a bug, report it; the developers listen.
. MySQL is a relational database management system:
A relational database stores data in separate tables rather than putting all the data in one big storeroom. This adds speed and flexibility.
The SQL part of "MySQL" stands for "Structured Query Language.
SQL is the most common standardized language used to access databases and is defined by the ANSI/ISO SQL Standard. The SQL standard has been evolving since 1986 and several versions exist. |
| |
| |
|
| |
| |