什么时候值得使用数据库? [英] At what point is it worth using a database?

查看:389
本文介绍了什么时候值得使用数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有关数据库的问题,什么时候值得深入一个。我主要是一个嵌入式工程师,但我正在编写一个应用程序使用Qt与我们的控制器接口。



我们有一个奇怪的地方,我们有足够的数据,实现一个数据库(大约700多个项目和增长)来管理一切,是可行的,但我不确定它是值得的时间,现在处理。我没有问题使用从excel生成的文件实现GUI和解析,但它是冗长乏味,难以跟踪甚至与VBA脚本。我一直在玩我们的数据转换为更易于管理的应用程序端与Microsoft Access,似乎运行良好。如果这样做,我只是一个步骤(或几个)使用SQL数据库和使用Qt库访问和修改它。



我没有管理数据在这个级别的经验和好奇什么可能是最好的方法来处理这一点。那么在这种情况下使用数据库的一些真正的好处是什么?我知道这很多可以是非常具体的应用程序,但一些一般的想法和建议如何跨越嵌入式/应用程序的编程线将是有帮助的。



这不是将数据库放在嵌入式项目中。它也不是通常使用较大数据库的业务类型应用程序。我正在为桌面上的单个用户设计一个GUI,以便与监视和配置目的的微控制器连接。






我决定使用SQLite。

解决方案

您可以在第一次启动这个项目时,数据库是有价值的:


  1. 您的应用程序演变为一些
    形式的数据驱动执行。

  2. 您的花费时间设计和
    开发外部数据存储
    结构。

  3. 在应用程序或
    组织之间共享数据



  4. 数据不再短,
    很简单。 >

    演变为数据驱动执行

    当数据更改但不执行时,这是数据驱动程序或部分程序是数据驱动的。一组配置选项是数据驱动功能的标志,但整个应用程序可能不是数据驱动的。在任何情况下,数据库可以帮助管理数据。 (数据库库或应用程序不必像Oracle一样庞大,但可以精简和像SQLite一样意思)。



    设计&外部数据结构的开发

    将问题发布到堆栈溢出有关序列化或转换树和列表以使用文件是您的程序已经使用数据库。此外,如果您花费任何时间设计算法来将数据存储在文件中,或者设计文件中的数据是研究数据库使用情况的好时机。



    共享数据

    无论您的应用程序是否与另一个应用程序,另一个组织或其他人共享数据,助攻。通过使用数据库,数据一致性更容易实现。问题调查的一个大问题是团队不使用相同的数据。客户可以使用一组数据;验证团队另一个和开发使用不同的一组数据。数据库使数据的版本控制更容易,并允许实体使用相同的数据。



    复杂数据
    程序从小表的硬编码数据。这演变成使用动态数据与地图,树和列表。有时,数据从简单的两列扩展到8或更多。数据库理论和数据库可以减轻组织数据的复杂性。让数据库担心管理数据并释放应用程序和开发时间。毕竟,数据的管理方式不如数据的质量和可访问性那么重要。



    数据复制
    通常,当数据增长时,对重复数据的吸引力越来越大。数据库和数据库理论可以最小化数据的重复。数据库可以配置为警告重复。



    移动到使用数据库有很多因素需要考虑。一些包括但不限于:数据复杂性,数据重复(包括部分数据),项目截止日期,开发成本和许可问题。如果你的程序可以更高效地运行数据库,那么这样做。数据库还可以节省开发时间(和金钱)。您和您的应用程序还可以执行其他任务,而不是管理数据。将数据管理留给专家。


    I have a question relating to databases and at what point is worth diving into one. I am primarily an embedded engineer, but I am writing an application using Qt to interface with our controller.

    We are at an odd point where we have enough data that it would be feasible to implement a database (around 700+ items and growing) to manage everything, but I am not sure it is worth the time right now to deal with. I have no problems implementing the GUI with files generated from excel and parsed in, but it gets tedious and hard to track even with VBA scripts. I have been playing around with converting our data into something more manageable for the application side with Microsoft Access and that seems to be working well. If that works out I am only a step (or several) away from using an SQL database and using the Qt library to access and modify it.

    I don't have much experience managing data at this level and am curious what may be the best way to approach this. So what are some of the real benefits of using a database if any in this case? I realize much of this can be very application specific, but some general ideas and suggestions on how to straddle the embedded/application programming line would be helpful.

    This is not about putting a database in an embedded project. It is also not a business type application where larger databases are commonly used. I am designing a GUI for a single user on a desktop to interface with a micro-controller for monitoring and configuration purposes.


    I decided to go with SQLite. You can do some very interesting things with data that I didn't really consider an option when first starting this project.

    解决方案

    A database is worthwhile when:

    1. Your application evolves to some form of data driven execution.
    2. Your spending time designing and developing external data storage structures.
    3. Sharing data between applications or organizations (including individual people)
    4. The data is no longer short and simple.
    5. Data Duplication

    Evolution to Data Driven Execution
    When the data is changing but the execution is not, this is a sign of a data driven program or parts of the program are data driven. A set of configuration options is a sign of a data driven function, but the whole application may not be data driven. In any case, a database can help manage the data. (The database library or application does not have to be huge like Oracle, but can be lean and mean like SQLite).

    Design & Development of External Data Structures
    Posting questions to Stack Overflow about serialization or converting trees and lists to use files is a good indication your program has graduated to using a database. Also, if you are spending any amount of time designing algorithms to store data in a file or designing the data in a file is a good time to research the usage of a database.

    Sharing Data
    Whether your application is sharing data with another application, another organization or another person, a database can assist. By using a database, data consistency is easier to achieve. One of the big issues in problem investigation is that teams are not using the same data. The customer may use one set of data; the validation team another and development using a different set of data. A database makes versioning the data easier and allows entities to use the same data.

    Complex Data Programs start out using small tables of hard coded data. This evolves into using dynamic data with maps, trees and lists. Sometimes the data expands from simple two columns to 8 or more. Database theory and databases can ease the complexity of organizing data. Let the database worry about managing the data and free up your application and your development time. After all, how the data is managed is not as important as to the quality of the data and it's accessibility.

    Data Duplication Often times, when data grows, there is an ever growing attraction for duplicate data. Databases and database theory can minimize the duplication of data. Databases can be configured to warn against duplications.

    Moving to using a database has many factors to be considered. Some include but are not limited to: data complexity, data duplication (including parts of the data), project deadlines, development costs and licensing issues. If your program can run more efficiently with a database, then do so. A database may also save development time (and money). There are other tasks that you and your application can be performing than managing data. Leave data management up to the experts.

    这篇关于什么时候值得使用数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆