我应该选择什么数据源?

发布于 2024-12-04 01:48:19 字数 321 浏览 1 评论 0原文

我想征求建议。

在我们的 Visual Basic 课程中,我们需要提交一个具有时间监控功能的工资系统。我已经准备好了我的系统的GUI界面。我的问题是,考虑到 30 名员工(这是我们的讲师告诉我们的),我应该使用什么样的数据集合。

我应该使用:

  1. 像每个字段一样存储它们的数组(员工编号、员工姓氏 )等)有自己的数组。

  2. 供我将它们存储在文本文件中的顺序文件(如果在文本文件中,我仍然可以检索该文本文件中的记录。)

  3. 数据库。

我需要关于我应该选择什么的建议。

I would like to ask for suggestions.

In our class in Visual Basic, we are required to turn in a payroll system with time monitoring. And I have prepared already the GUI interface of my system. My question is what kind of collection of data should I use, considering the employee population of 30 (that's what our instructor have told us.)

Should I use:

  1. Arrays to store them like every field (employee number, employee last name, etc.) has its own array.

  2. Sequential files for me to store them in a text file (and if in the text file, could I still retrieve the records inside that text file.)

  3. A Database.

I need suggestions on what should I choose.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

从来不烧饼 2024-12-11 01:48:19

数组就可以了,因为它们很容易根据您的项目大小实现。您可以为 Employers 创建一个类,并定义一个 Employers 数组以将其信息存储在您的应用程序中。

如果您想使用文件将这些数据保存到磁盘,请考虑使用内置的 .NET XML 序列化程序。

最后,您可以使用数据库来存储大量数据,但同样,对于 30 个雇主,您不需要数据库。

Arrays would be OK as they're easy to implement for the size of your project. You can create a class for Employers and define an array of Employers to store their information in your application.

If you want to use files to save those data to disk, consider using the in-built .NET XML serializer.

Finally you can use DBs to store larger amounts of data but again for only 30 employers, you won't need a database.

三生路 2024-12-11 01:48:19

在大多数业务应用程序中,您将使用数据库。原因之一是,当稍后与更多数据结合时,这些数据会变得更有用。或者可能存在使这项工作变得更容易的现有数据。例如,可能需要所谓的员工主表。这将包含姓名、地址、ss#、部门、活跃、终止日期、职位等内容。您的工资系统可能需要强制执行一条规则,即我们不会向超过终止日期的员工支付工资。此外,一旦开始运行,管理层可能希望按部门分析加班时间。

In most business applications, you will be using a database. One reason is this data becomes more useful when combined with more data later. Or there may be existing data that makes this job easier. For example, there may be a need for what's called an employee master table. This would contain things like name, address , ss#,department, active, termination date, position etc. Your payroll system may need to enforce a rule that we don't pay people who have been terminated past their termination date. Also, once this is up an running, management may want to analyze overtime hours by department.

柏拉图鍀咏恒 2024-12-11 01:48:19

我同意数据库将是现实世界中最好、最有用的。您可以使用多维数组,但我不推荐它。数组也可以工作。

我认为最简单的是用某些字符(通常是命令或 tilda)分隔的平面文本文件,您可以使用 I/O 来访问它。

但数据库将是首选。

I agree a Database would be the best and most useful in the real world. You could get away with a multi-dimensional array, but I wouldn't recommend it. Also a array would work as well.

The easiest in my opinion would be a flat text file delimited with some character (usually command or tilda) and you can use I/O to access it.

But database would be a first choice.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文