问题描述
我目前在MySQL中有一个数据库,我想在MS Access中导入。
I currently have a database in MySQL, which I'd like to import in MS Access.
是否可以在保持所有关系完好(即不导出到.csv或使用ODBC)的情况下执行此操作?
Is it possible to do this while keeping all relationships intact (i.e. without exporting to .csv, or by using ODBC)?
我是这个地区的noob,所以任何帮助是非常感谢。
I'm a noob in this area so any help is greatly appreciated.
谢谢。
推荐答案
您需要解决两个不同的问题:
You need to solve two different problems:
-
创建一个具有与MySQL数据库结构匹配的结构的空MS Access数据库。
Creating an empty MS Access database with a structure that matches the MySQL database structure.
从MySQL提取数据并加载进入MS Access。
Extracting the data from MySQL and loading it into MS Access.
这并不容易,因为不同的SQL数据库提供不同的结构特性,不同的数据类型等。使用MySQL越复杂,你在转换过程中就越可能遇到一些阻碍(例如,Access根本不支持触发器)。相反,如果你使用MySQL作为一个简单的数据存储,你可能会发现转换相当容易。
This is not easy because different SQL databases offer different structural features, different datatypes, and so on. The more complex your use of MySQL is the more likely you'll run into some show-stopper during the conversion (for instance, Access doesn't support triggers at all). Conversely if you're using MySQL as a simple data store you may find the conversion fairly easy.
要获得一个与你的MySQL数据库结构相同的MS Access数据库,你最好的办法是找到一个数据库定义/图表工具,提供逆向工程,并支持MySQL和MS Access。使用它将MySQL数据库反向工程为数据库图表,然后将底层数据库更改为MS Access并使用该工具生成数据库。
To get an MS Access database with the same structure as your MySQL database, your best bet is to find a database definition / diagramming tool that offers reverse engineering and supports both MySQL and MS Access. Use it to reverse engineer your MySQL database into a database diagram, then change the underlying database to MS Access and use the tool to generate a database.
查看(在纸上,无论如何)提供了您需要执行此操作的功能。
Check out Dezign For Databases which (on paper, anyway) offers the features you would need to do this.
为了泵送数据,有许多工具。这种操作通常被称为ETL(提取,翻译,加载)。
To pump the data across, there are any number of tools. This kind of operation is generically referred to as ETL (Extract, Translate, Load).
这篇关于使用OBDC将.sql导入MS Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!