Databases Reference
In-Depth Information
Importing Structure and Data
In this chapter, we will learn how to import data that we may have exported for
backup or transfer purposes. Exported data may also come from authors of other
applications, and could contain the whole foundation structure of these applications,
along with some sample data.
The current phpMyAdmin version (3.4) can import the following:
• Files containing MySQL statements (usually having a .sql suffix, but not
necessarily so)
• CSV iles (comma-separated values, although the separator is not necessarily
a comma); these files can be imported by phpMyAdmin itself or via the
MySQL LOAD DATA INFILE statement which enables the MySQL server to
handle the data directly rather than having phpMyAdmin parse it first
• Open Document Spreadsheet iles
• XML iles (generated by phpMyAdmin)
The binary column upload covered in Chapter 5 can be said to belong to the
import family.
Importing and uploading are synonyms in
this context.
In general, an exported file can be imported to the same database it came from or
to any other database; the XML format is an exception to this and a workaround is
given in the XML section later in the chapter. Also, a file generated from an older
phpMyAdmin version should have no problem being imported by the current
version, but the difference between the MySQL version at time of export and the
one at time of import might play a bigger role regarding compatibility. It's difficult
to evaluate how future MySQL releases will change the language's syntax, bringing
import challenges.
Search WWH ::




Custom Search