如果我使用 Access/Jet 作为 Web 应用程序的后端,应该注意哪些问题?
我需要知道在 microsoft access 中存储网站数据有哪些问题。
我知道我们可能会遇到很多问题
示例: - 数据库上的多个连接
谢谢
I need to know what are the concerns to store data in microsoft access for a web site.
I know we could have a lot of problem
example :
- Multiple connection on the database
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您将遇到的一个关键问题是可用性。具体来说,需要锁定用户进行维修和备份,这对于典型网站的 24/7 可用性需求可能不切实际。
并发性是您的第二大关注点。设计良好的 Access DB 通常可以支持多达 50 个用户,甚至可能支持几百个用户,具体取决于所需的特定访问类型(例如只读)。然而,当应用程序进行大量更新时,您将比大多数客户端-服务器类型数据库包更快地遇到并发问题。
忽略任何有关数据库大小可扩展性的评论。对于大多数应用程序,您不会接近 MS Access 在这方面的限制。
硬币的另一面是,切换到客户端-服务器数据库会增加大量复杂性和成本。因此,如果您正在构建一个小型内部使用网站,Access 也是一个合理的选择。这一切都是为了将您的要求与技术相匹配。
A key problem you will have is availability. Specifically the need to lock the users out to do repairs and make backups, which may not be practical for the 24/7 availability needs of a typical web site.
Concurrency is your #2 concern. A well designed Access DB can often support as many as 50 users, possibly even a few hundred depending on the specific types of access needed (read-only for instance). However, with an app doing a lot of updates you are going to have concurrency headaches much sooner than you would with most client-server type database packages.
Ignore any comments about scalability in terms of DB size. For most applications you won't come close to the limits of MS Access in that regard.
The flip side of the coin is that you add a lot of complexity and cost by switching to a client-server DB. So if you are building a small internal use web-site, Access can be a reasonable choice too. It is all about matching your requirements to the technology.
数据大小是另一个问题。对于更大的大小,您需要更强大的数据库引擎。
可扩展性、可用性、备份支持。
Data size is another concern. For larger sizes you need a more serious database engine.
Scalability, availability, backup support.
问题是它无法扩展——而且它确实不应该扩展。您必须为工作选择正确的工具。
现在就避免麻烦,选择 SQL Server(有免费版本 - 如果您有资格获得 BizSpark,您可以获得功能强大的免费版本)、MySQL 或 Postgres。
The problem is that it won't scale - and it really isn't meant to. You have to pick the right tool for the job.
Avoid the trouble now and pick SQL Server (there are free versions - if you qualify for BizSpark you can get powerful free versions), MySQL, or Postgres.
没有人提到的是,Jet/ACE 后端的工作效果如何(从网站的角度来看,不存在 Access 后端),这取决于您使用什么接口来访问其数据。
如果您使用 ODBC 或 DAO,则可能会遇到问题,因为它们都不是线程安全的。但是通过 OLEDB/ADO Classic 访问,您可以获得线程安全的访问。因此,在 Web 应用程序中使用 Jet/ACE 数据存储的唯一可行方法是 OLEDB/ADO Classic。
(我正在报道迈克尔·卡普兰多次说过的话,他对杰特的遗忘比我所知道的要多得多)
Something nobody has mentioned is that how well things work with a Jet/ACE back end (there is no such thing as an Access back end from the standpoint of a web site) is that it depends on what interface you use to access its data.
If you use ODBC or DAO, you can run into problems because neither is threadsafe. But Accessed via OLEDB/ADO Classic, you get threadsafe access. Thus, the only viable method for working with a Jet/ACE data store in a web application is OLEDB/ADO Classic.
(I am reporting what Michael Kaplan has said many times, and he has forgotten far more about Jet than I ever knew)
Access 数据库(根据我的经验)似乎在分配空间方面非常糟糕,因此它们的大小比预期的要大。我也遇到过数据损坏问题。
如果有人打开数据库进行编辑,则可能会锁定其他连接。
虽然所有数据库都需要维护,但尝试在一个非常大的数据库(1GB+)上运行“维护”(压缩和修复),看看会发生什么。它不仅可能会将用户拒之门外,而且很可能会破坏整个事情
Access databases (in my experience) seem to be very poor at allocating space so their size grows larger than expected. I've also had data corruption issues.
If someone has the database opened for editing, that could lock other connections out.
While all db's require maintenance, try running the "maintenance" (compact and repair) on an extremely large database (1GB+) and see what happens. Not only will it likely lock users out, but it could very well corrupt the whole thing