New Features of MySQL5 (cross-storage database tables)

Source: Internet
Author: User
Tags table definition

At present, a specific fact is that enterprise data continues to be distributed in various places of the enterprise, which may exist in the form of database tables of Different Storage types, database Administrators often need to log on to different physical servers to manage database objects on remote servers. The new technology of MySQL5, "cross-Class combined storage-type database tables", makes several databases distributed in different physical locations a single logical database form that is presented to end users, this simplifies access to all databases.
The federated tables database table launched by MySQL5 can join database objects stored on different database servers and generate one or more logical databases, any type of storage engine is the target of federated table definition, and these definitions fully support existing functions such as SELECT, INSERT, UPDATE, and DELETE. Different types of storage engines supported by MySQL5:

For example, assume that the tables in the following format are stored on a Linux Server:
 
If the database administrator wants to refer to the database stored on the linux server on windows server running different databases, the following federated table can be defined:

mysql> CREATE TABLE client (-> client_id int(11) NOT NULL, -> client_first_name varchar(20) NOT NULL,-> client_last_name varchar(40) NOT NULL,-> client_gender char(1) NOT NULL,-> client_year_of_birth int(4) NOT NULL, -> client_marital_status varchar(20) default NULL,-> client_street_address varchar(40) NOT NULL,-> client_postal_code varchar(10) NOT NULL,-> client_city varchar(30) NOT NULL,-> client_state_province varchar(40) NOT NULL-> client_phone_number varchar(25) NOT NULL, t NULL,-> client_household_income bigint(30) default NULL,-> client_country varchar(40) default NULL,-> broker_id int(11) NOT NULL) ENGINE=FEDERATED -> COMMENT = -> 'mysql://myuser:passueryword@192.164.3.2:3306/gim/client'; Query OK, 0 rows affected (0.20 sec)mysql> select count(*) from client;+----------+| count(*) |+----------+| 5600     |+----------+ 1 row in set (0.50 sec)
The above shows the usage of the federated table. (Bkjia.com tutorial)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.