The submission collects several small utilities 'wrapping' Yannick Maret's 'mym' Matlab/MySQL interface, available from
http://sourceforge.net/projects/mym
Their application is illustrated by script mydemo.m, which uses the FEX download data presented in FEX submission 'A week on File Exchange'. First, we read the data (6 mixed-type columns, over 1 million rows) from a text file into a MySQL table, using 'load infile', passed through the basic mym interface. Next, we retrieve the table's structure and contents into Matlab workspace using TBATTR and TBREAD, and take the data back to MySQL with TBWRITE.
We observe that text-file-mediated exchange, accommodated on MySQL's side by 'load infile' and 'select into outfile', is a vastly superior option for large datasets; TBREAD and TBWRITE (the latter operating through multiple-row 'insert values' flushes) are more convenient for small datasets with many columns.
Citar como
Dimitri Shvorob (2024). Access a MySQL database (https://www.mathworks.com/matlabcentral/fileexchange/17897-access-a-mysql-database), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Agradecimientos
Inspirado por: MySQL Database Connector, Myblob, A Powerful Sidekick: Using MySQL for High-Volume Data Manipulation in Matlab, The Twain Shall Meet: Facilitating Data Exchange between SAS and Matlab, Analyze FEX download data
Inspiración para: MySQL shortcut files, queryMySQL
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
mym utilities/
mym utilities/html/
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 | BSD |