Two users wanted to share the same database, originally written in MS Access, without conflicting with one another over a single MDB file.
I moved the tables from a simple MS Access database to MySQL using its Migration Toolkit (which works well, by the way) and set up Access to link to those tables via ODBC.
So far, I've run into the following:
You can't insert/update/delete rows in a table without a primary key (no surprise there).
AutoNumber fields in MS Access must be the primary key or they'll just end up as integer columns in MySQL (natch, why wouldn't it be the PK?)
The tables were migrated to MySQL's InnoDB table type, but the Access relationships didn't become MySQL foreign key constraints.
Once the database is in use, can I expect any other issues? Particularly when both users are working in the same table?
I had an application that worked likewise: an MS Access frontend to a MySQL backend. It was such a huge pain that I ended up writing a Win32 frontend instead. From the top of my head, I encountered the following problems:
Development of the ODBC link seems to have ceased long ago. There are various different versions floating around --- very confusing. The ODBC link doesn't support Unicode/UTF8, and I remember there were other issues with it as well (though some could be overcome by careful configuration).
You probably want to manually tweak your db schema to make it compatible with MS Access. I see you already found out about the needed surrogate keys (i.e., int primary keys) :-)
You should keep in mind that you may need to use pass-through queries to do more sophisticated SQL manipulations of the MySQL database.
Be careful with using lots of VBA, as that tends to corrupt your frontend file. Regularly compressing the database (using main menu, Tools | Database utilities | Compress and restore, or something like that --- I'm using the Dutch version) and making lots of backups is necessary.
Access tends to cause lots of network traffic. Like, really huge lots. I haven't been able to find a solution for that. Using a network monitor is recommended if you want to keep an eye on that!
Access insists on storing booleans as 0/-1. IMHO, 0/+1 makes more sense, and I believe it is the default way of doing things in MySQL as well. Not a huge problem, but if your checkboxes don't work, you should definitely check this.
One possible alternative would be to put the backend (with the data) on a shared drive. I remember this is well-documented, also in the help. You may want to have a look at some general advice on splitting into a frontend and a backend and code that automatically reconnects to the backend on startup; I can also send you some more sample code, or post it here.
Otherwise, you might also want to consider MS SQL. I don't have experience with that, but I presume it works together with MS Access much more nicely!
Two users wanted to share the same database, originally written in MS Access, without conflicting with one another over a single MDB file.I moved the tables from a simple MS Access database to MySQL u...
所谓的数据传输,其实是指
SQL
Server访问
Access
间的数据。
由于历史的原因,客户以前的数据很多都是在存入在文本
数据库
中,如Acess现在系统升级及
数据库
服务器如
SQL
Server后,经常需要访问文本
数据库
中的数据,所以就会产生这样的需求。
要完成标题的需要,在
SQL
Server中是一件非常简单的事情。
通常的可以有3种方式:1、BCP 2、分布式查询.分...
SQL
注入定义
sql
注入是指web应用程序对用户输入数据的合法性没有判断,
前端
传入
后端
的参数是攻击者可控的,并且参数带入
数据库
查询,攻击者可以构造不同的
sql
语句来实现对
数据库
的任意操作。可以进行数据查询、WebShell写入、命令执行等操作
SQL
注入漏洞的产生必须满足两个条件:1 参数用户可控 2 参数带入
数据库
查询
SQL
注入类型:
按
数据库
类型
Access
、Ms
SQL
、
MySQL
、Oracle、DB2等
按提交方式:
GET、POST、cookie、HTTP头、XFF
2、
前端
开发中的MVC/MVP/MVVM模式
一、
数据库
(
MySql
,Oracle,
SQL
Server)(基本的
数据库
操作语句,
sql
语句,存储过程,触发器)(JDBC编程)
1、
sql
语句——(
sql
结构化查询语言:structural query language)
2、
MySql
3、Oracle
4、...
Access
数据库
和
MySQL
数据库
有很多的不同点和区别。
首先,它们的
使用
场景不同。
Access
数据库
是微软Office套件中的一部分,主要面向个人用户和小型企业;而
MySQL
是一款开源的关系型
数据库
管理系统,主要面向大型企业和互联网应用。
其次,它们的数据处理能力也有所不同。
Access
数据库
支持的数据类型相对较少,而
MySQL
支持的数据类型比较全面。同时,
MySQL
还支持跨平台和多用户访问,具有更强的性能和安全性能。
再次,它们的数据存储结构也有所不同。
Access
数据库
采用单一文件存储结构,存储在本地磁盘上;而
MySQL
数据库
采用客户端/服务器模式,数据存储在服务器上,客户端可以通过网络协议访问。
最后,它们的开发语言和工具也不一样。
Access
数据库
采用Visual Basic和
Access
宏语言来进行开发和管理;而
MySQL
采用各种不同的编程语言和开发工具,如Java、PHP、Python等。
总之,
Access
数据库
和
MySQL
数据库
有很多的不同之处,其主要的区别体现在
使用
场景、数据处理能力、数据存储结构和开发语言和工具等方面。企业在选择
数据库
时,应根据自身需求和数据规模来选择合适的
数据库
。