简体   繁体   English

我应该使用哪个DB服务器?

[英]Which DB Server should I use?

I have to develop a new (desktop) app for a small business. 我必须为小型企业开发一个新的(桌面)应用程序。 This business currently has an Access database with millions of records. 此业务目前具有包含数百万条记录的Access数据库。 The file size is about 1.5 GB. 文件大小约为1.5 GB。 The boss told me that searching on this DB is very slow. 老板告诉我,在这个数据库上搜索非常慢。 The DB consists of a single table with about 20 fields. 数据库由一个包含大约20个字段的表组成。

I also think the overall DB design isn't great. 我也认为整体数据库设计不是很好。 I thought to use another DB server with a new design to improve both performance and efficiency. 我想使用另一个带有新设计的数据库服务器来提高性能和效率。

Considering this is a relatively small business, I don't want to spend much for a DB license, so I want to ask you what would you do. 考虑到这是一个相对较小的业务,我不想花太多钱购买数据库许可证,所以我想问你会做什么。

  • Continue to use Access, maybe improving and optimizing the DB in some way 继续使用Access,可能会以某种方式改进和优化数据库
  • Buy a DB server license (in this case, which one?) 购买数据库服务器许可证(在这种情况下,哪一个?)
  • ? (any idea?) (任何想法?)

Things like SQL Server Express , MySQL and PostgreSQL are available for free, no license purchase necessary. SQL Server ExpressMySQLPostgreSQL这样的东西是免费提供的,无需购买许可证。

For improving search speeds, you will probably also want to look at things like what indexes are defined for the table, what exactly searches are doing, et cetera. 为了提高搜索速度,您可能还需要查看为表定义的索引,搜索的确切内容等等。

2nd the recommendation for Firebird. Firebird推荐的第二名。 We've been using it for about 5 years and never had an issue. 我们已经使用它大约5年了,从来没有遇到过问题。 Cross platform, embedded & server deployments... brilliant. 跨平台,嵌入式和服务器部署......精彩。 Oh, and Free as in Beer. 哦,和啤酒一样自由。 Mozilla Public LIcense. Mozilla Public LIcense。

Put me down as another recommendation for Firebird. 把我作为Firebird的另一个推荐。 We use it with our commercial Point of Sale product. 我们将其与我们的商业销售点产品一起使用。 We have it installed at over 1,000 sites, with databases as large as 40+ Gigabytes. 我们在超过1,000个站点安装了它,数据库大到40+千兆字节。 It's fast, stable, simple, easy to deploy, and requires no management. 它快速,稳定,简单,易于部署,无需管理。

Your could replace the Access Database with a SQL Server database that will scale well moving forward. 您可以使用SQL Server数据库替换Access数据库,该数据库可以很好地向前扩展。 You can use SQL Server Express which is free and supports databases up to 4Gb I beleive. 您可以使用免费的SQL Server Express ,并支持最高4Gb的数据库。

SQL Server Express . SQL Server Express Free for database size up to 10 GB. 数据库大小最高可达10 GB。

I warmly recommend MySQL. 我热烈推荐MySQL。 Its sometimes free and is easy to install on both Windows and linux. 它有时是免费的 ,很容易安装在Windows和Linux上。

There are also a lots of great free tools to manage its content like tables, users, indexes etc... 还有很多很棒的免费工具来管理其内容,如表格,用户,索引等......

SQL Server Express is a perfect fit for this. SQL Server Express非常适合这种情况。 http://www.microsoft.com/express/database/ http://www.microsoft.com/express/database/

You can take a look at Firebird 你可以看看Firebird

Firebird is one of the best database for desktop application and will allways be free. Firebird是桌面应用程序的最佳数据库之一,并且总是免费的。

Some tools exist to convert database from access to firebird. 存在一些工具来将数据库从访问转换为firebird。

I would look into if the big table needs to be broken up into smaller ones(rarely needed, but still) and also what indexes are on it. 我会研究一下大表是否需要分解成较小的表(很少需要,但仍然存在)以及它上面的索引。 And for Database software I would recommend PostgreSQL. 对于数据库软件,我会推荐PostgreSQL。 It is free, easy to use(and I consider it easy to setup, though others beg to differ), and it is fast enough for enterprise applications. 它是免费的,易于使用(我认为它很容易设置,尽管其他人不同),并且它对于企业应用程序来说足够快。

I also recommend Firebird . 我也推荐Firebird

Its key advantages for your scenario are (from top of my head): 它的主要优势在于(从我的头脑中):

  • embedded version. 嵌入式版本。 You can ship it with your application - no separate installation kit needed, no .NET dependencies etc. 您可以随应用程序一起发货 - 不需要单独的安装工具包,也不需要.NET依赖项等。

  • later on you can scale seamlessly to the full client-server model. 稍后,您可以无缝扩展到完整的客户端 - 服务器模型。 No code changes required. 无需更改代码。

  • very small footprint 占地面积很小

  • the entire database is stored in a single file. 整个数据库存储在一个文件中。 Much easier to deploy compared with other solutions. 与其他解决方案相比,部署更容易。

  • you can have your server on any platform you want: Windows, Linux, MacOSX etc. Of course, you can have your client also on the same platforms but since you mentioned Access, I suppose that you have a Windows application. 你可以在任何你想要的平台上安装你的服务器:Windows,Linux,MacOSX等。当然,你可以让你的客户端也在同一个平台上,但是既然你提到了Access,我想你有一个Windows应用程序。

  • no need for server administration. 无需服务器管理。 It just works. 它只是有效。

我也推荐PostgreSQL(特别是作为MySQL的替代品)

No-one ever seems to mention it, but Oracle also do a free-as-in-free-beer version of their database: Oracle Express Edition (aka XE). 似乎没有人提及它,但甲骨文也做了一个免费的啤酒版本的数据库: Oracle Express Edition (又名XE)。 It is limited to 1 CPU, 1GB RAM and 4GB of user data but that sounds plenty big enough for your application. 它仅限于1个CPU,1GB RAM和4GB用户数据,但听起来足够大,适合您的应用程序。

As for your database design, just one table sounds more like a spreadsheet than a database application. 至于您的数据库设计,只有一个表听起来更像电子表格而不是数据库应用程序。 Probably you have lots of denormalised data. 可能你有很多非规范化数据。 Splitting those out into smaller de-duplicated tables might well speed up certain queries. 将这些拆分为较小的重复数据删除表可能会加快某些查询速度。 However if you only have twenty columns there may not be a lot of scope for tuning. 但是,如果您只有20列,则可能没有很多调整范围。

As for recommendation, the question is, which products do you know? 至于推荐,问题是,您知道哪些产品? If you have a familiarity with Access then I suggest you try to optimize your existing database. 如果您熟悉Access,我建议您尝试优化现有数据库。 I have worked with Access databases which store several million rows and they performed well enough. 我使用过存储数百万行的Access数据库,它们表现得非常好。 After all, there is no guarantee that moving the same design to a different product will automatically make things run x times faster. 毕竟,无法保证将相同的设计移动到不同的产品会自动使运行速度提高x倍。 Another advantage of Access as a tool is that it comes with a built-in front-end tool. Access作为一种工具的另一个优点是它带有内置的前端工具。 If you move from Access you may need to think about re-building your application. 如果从Access迁移,您可能需要考虑重新构建应用程序。

Wow, folks have a lot of platform recommendations for you. 哇,伙计们为你提供了很多平台建议。

Let me just say this. 我来说吧。

If you feel like there are design issues as well as platform issues, why not try the design changes first? 如果您觉得存在设计问题以及平台问题,为什么不首先尝试设计更改? These are changes you are likely to make anyway. 这些都是您可能会做出的改变。

If they make no performance difference in Access, you are no worse off, since these changes improve maintainability on any platform. 如果他们在Access中没有性能差异,那么您就不会变得更糟,因为这些更改可以提高任何平台的可维护性。

Then you can try other platforms with the knowledge that you have a solid design, and that you have not wasted any time. 然后你可以尝试其他平台,知道你有一个坚实的设计,并且你没有浪费任何时间。

SQLite也可以成为候选者。

I would recommand not going with express anything - yep your small but what if the busness takes off and need much higher loads in the future - surely thats the way you want it to go ?? 我建议不要用快递做什么 - 是的,你的小,但如果公共汽车起飞并且将来需要更高的负载怎么办 - 当然这就是你希望它去的方式? do not want to have to switch db layers / run 2 .. 不想切换db层/ run 2 ..

I would look at MySQL or Firebird (used to borland interbase) both very high quality. 我会看看MySQL或Firebird(曾经是borland interbase)都非常高质量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM