89545

89545



The csv Storage Engine

The CSV storage engine Stores data in text files using comma-separated values format.

The CSV storage engine is always compiled into the MySQL server.

To examine the source for the CSV engine, look in the storage/csv directory of a

MySQL source

distribution.

When you create a CSV table, the server creates a table format file in the database directory. The file

begins with the table name and has an . f rm extension. The storage engine also creates a data file.

Its name begins with the table name and has a . CSV extension. The data file is a plain text file. When

you storę data into the table, the storage engine saves it into the data file in comma-

separated values

format.

my3ql>CREATE TABLE test (i INT NOT NULL, c CHAR(10) NOT NOLL)

->ENGINE = CSV;

Query OK, 0 rows affected (0.12 sec)

mysql>INSERT INTO test VALUES(1,'record one'),(2,'record two');

Query OK, 2 rows affected (0.00 sec)

Records: 2 Duplicates: 0 Warnings: 0 mysql>SELECT * FROM test;

i 1

—+-----

1 c |

1 1

I record

one |

2 1

| record

two |

—+-----

2 rows in set (0.00 sec)

Creating a CSV table also creates a corresponding Metafile that Stores the State of the table and the

number of rows that exist in the table. The name of this file is the same as the name of the table with the extension CSM.

If you examine the test. CSV file in the database directory created by executing the preceding

statements, its contents should look like this:

"1","record one"

"2","record two"



Wyszukiwarka

Podobne podstrony:
MySQL databases are relational. A relational database Stores data in separate tables rather than put
Federated Storage Engine Overview When you create a table using one of the standard storage engines
Replication and blackhole Tables The BLACKHOLE storage engine accepts data but discards it and does
“ELEVATOR OF SUNFLOWER” CONSTRUCTION OF THE ELEVATOR STORAGE OF SUNFLOWER SEEDS IN THE CAPACITY OF 8
Electrical Engineering in English Study engineering and live in the heart of
3.    Principles of engine operation simulation in test-bench examination in the
bild167 The AZA Rangę These engines are manufactured in the J.A.P. Factory and are of łhe Two Strok
image020 TABLE3 Engine type Weięht, in los. Max. hp Spceific power— hp/lb. Economy
Power Control UnitHydrogen Storage Tank Stores hydrogen gas compressed at extremety high pressu
6 Abstract The whole application we have created from the basis in Java technology, using applicatio
Table of contents The impact of Edward Snowdens case on privacy    191 of data in
Stahl676 bmp 200 WALTER R. STAHL tempted to explain data in human coordinationdisturbances (Parkins
suzuki rm25004 TROUBLESHOOTING 18-3 Complaint Possible Cause Remedy Engine runs poorly in Exhaus
InnoDB Data Storage and Compression Ali user data in InnoDB tables is stored in pages comprising a B
Administering the Database with SQL-Based Management Tools In addition to using the graphical user i
Specifying the Time Period for Which to Display Statistics In the Real-Time: Last Hour modę, thc dat

więcej podobnych podstron