开发人员应该在多大程度上了解有关数据库系统的细节?

时间:2021-08-11 16:23:01

Modern database systems today come with loads of features. And you would agree with me that to learn one database you must unlearn the concepts you learned in another database. For example, each database would implement locking differently than others. So to carry the concepts of one database to another would be a recipe for failure. And there could be other examples where two databases would perform very very differently.

如今的现代数据库系统具有许多功能。你同意我的意见,要学习一个数据库,你必须忘记在另一个数据库中学到的概念。例如,每个数据库的锁定方式与其他数据库不同。因此,将一个数据库的概念带到另一个数据库将是一个失败的方法。还有其他一些例子,两个数据库的表现非常不同。

So while developing the database driven systems should the programmers need to know the database in detail so that they code for performance? I don't think it would be appropriate to have the DBA called for performance later as his job is to only maintain the database and help out the developer in case of an emergency but not on a regular basis.

因此,在开发数据库驱动的系统时,程序员是否需要详细了解数据库,以便他们编写性能代码?我认为让DBA稍后要求性能是不合适的,因为他的工作是仅维护数据库并在紧急情况下帮助开发人员,但不是定期帮助。

What do you think should be the extent the developer needs to gain an insight into the database?

您认为开发人员需要深入了解数据库的程度如何?

7 个解决方案

#1


6  

I think these are the most important things (from most important to least, IMO):

我认为这些是最重要的事情(从最重要到最不重要的,IMO):

  • SQL (obviously) - It helps to know how to at least do basic queries, aggregates (sum(), etc), and inner joins
  • SQL(很明显) - 它有助于知道如何至少执行基本查询,聚合(sum()等)和内部联接

  • Normalization - DB design skills are an major requirement
  • 规范化 - 数据库设计技能是一项主要要求

  • Locking Model/MVCC - Its nice to have at least a basic grasp of how your databases manage row locking (or use MVCC to accomplish similar goals with optimistic locking)
  • 锁定模型/ MVCC - 至少可以基本掌握数据库如何管理行锁定(或使用MVCC通过乐观锁定实现类似目标)

  • ACID compliance, Txns - Please know how these work and interact
  • ACID合规性,Txns - 请知道这些是如何工作和互动的

  • Indexing - While I don't think that you need to be an expert in tablespaces, placing data on separate drives for optimal performance, and other minutiae, it does help to have a high level knowledge of how index scans work vs. tablescans. It also helps to be able to read a query plan and understand why it might be choosing one over the other.
  • 索引 - 虽然我认为您不需要成为表空间专家,将数据放在单独的驱动器上以获得最佳性能,以及其他细节,但它确实有助于高度了解索引扫描如何工作与表扫描。它还有助于能够阅读查询计划并理解为什么它可能选择一个而不是另一个。

  • Basic Tools - You'll probably find yourself wanting to copy production data to a test environment at some point, so knowing the basics of how to restore/backup your database will be important.
  • 基本工具 - 您可能会发现自己希望在某些时候将生产数据复制到测试环境,因此了解如何恢复/备份数据库的基础知识非常重要。

Fortunately, there are some great FOSS and free commercial databases out there today that can be used to learn quite a bit about db fundamentals.

幸运的是,今天有一些很棒的FOSS和免费商业数据库,可以用来学习db基础知识。

#2


3  

I think a developer should have a fairly good grasp of how their database system works, not matter which one it is. When making design and architecture decisions, they need to understand the possible implications when it comes to the database.

我认为开发人员应该很好地掌握他们的数据库系统是如何工作的,而不管它是哪一个。在进行设计和架构决策时,他们需要了解数据库可能产生的影响。

#3


3  

Personally, I think you should know how databases work as well as the relational model and the rhetoric behind it, including all forms of normalization (even though I rarely see a need to go beyond third normal form). The core concepts of the relational model do not change from relational database to relational database - implementation may, but so what?

就个人而言,我认为你应该知道数据库是如何工作的,以及关系模型及其背后的修辞,包括所有形式的规范化(即使我很少看到需要超越第三范式)。关系模型的核心概念不会从关系数据库变为关系数据库 - 实现可能会,但那又如何呢?

Developers that don't understand the rationale behind database normalization, indexes, etc. are going to suffer if they ever work on a non-trivial project.

不理解数据库规范化,索引等背后的基本原理的开发人员如果从事过一个非平凡的项目,将会受到影响。

#4


3  

I think it really depends on your job. If you are a developer in a large company with dedicated DBAs then maybe you don't need to know much, but if you are in a small company then it may be really helpful knowing more about databases. In small companies you may wear more than one hat.

我认为这取决于你的工作。如果您是一家拥有专门DBA的大公司的开发人员,那么您可能不需要了解太多,但如果您在一家小公司,那么了解有关数据库的更多信息可能会非常有用。在小公司,你可以戴一顶以上的帽子。

It cannot hurt to know more in any situation.

在任何情况下了解更多都不会有害。

#5


3  

It certainly can't hurt to be familiar with relational database theory, and have a good working knowledge of the standard SQL syntax, as well as knowing what stored procedures, triggers, views, and indexes are. Obviously it's not terribly important to learn the database-specific extensions to SQL (T-SQL, PL/SQL, etc) until you start working with that database.

熟悉关系数据库理论,并且具备标准SQL语法的良好工作知识,以及了解存储过程,触发器,视图和索引是什么,这当然不会有害。显然,在开始使用该数据库之前,学习SQL的特定于数据库的扩展(T-SQL,PL / SQL等)并不是非常重要。

I think it's important to have a basic understand of databses when developing database applications just like it's important to have an understanding of the hardware your your software runs on. You don't have to be an expert, but you shouldn't be totally ignorant of anything your software interacts with.

我认为在开发数据库应用程序时对数据库有基本的了解非常重要,就像了解软件运行的硬件一样重要。您不必是专家,但您不应该完全不知道软件与之交互的任何内容。

That said, you probably shouldn't need to do much SQL as an application developer. Most of the interaction with the database should be done through stored procedures developed by the DBA, I'm not a big fan of including SQL code in your application code. If your queries are in stored procedures, then the DBA can change the implementation of the stored procedure, or even the database schema, and so long as the result is the same it doesn't require any changes to your application code.

也就是说,作为应用程序开发人员,您可能不需要做太多SQL。大多数与数据库的交互应该通过DBA开发的存储过程完成,我不是在应用程序代码中包含SQL代码的忠实粉丝。如果您的查询在存储过程中,那么DBA可以更改存储过程的实现,甚至是数据库模式,只要结果相同,它就不需要对应用程序代码进行任何更改。

#6


2  

If you are uncertain about how to best access the database you should be using tried and tested solutions like the application blocks from Microsoft - http://msdn.microsoft.com/en-us/library/cc309504.aspx. They can also prove helpful to you by examining how that code is implemented.

如果您不确定如何最好地访问数据库,您应该使用经过试验和测试的解决方案,如Microsoft的应用程序块 - http://msdn.microsoft.com/en-us/library/cc309504.aspx。通过检查代码的实现方式,它们也可以证明对您有所帮助。

#7


0  

Basic things about Sql queries are must. then you can develop simple system. but when you are going to implement Complex systems you should know Normalization, Procedures, Functions, etc.

关于Sql查询的基本知识是必须的。那么你可以开发简单的系统。但是当你要实现复杂系统时,你应该知道规范化,程序,功能等。

#1


6  

I think these are the most important things (from most important to least, IMO):

我认为这些是最重要的事情(从最重要到最不重要的,IMO):

  • SQL (obviously) - It helps to know how to at least do basic queries, aggregates (sum(), etc), and inner joins
  • SQL(很明显) - 它有助于知道如何至少执行基本查询,聚合(sum()等)和内部联接

  • Normalization - DB design skills are an major requirement
  • 规范化 - 数据库设计技能是一项主要要求

  • Locking Model/MVCC - Its nice to have at least a basic grasp of how your databases manage row locking (or use MVCC to accomplish similar goals with optimistic locking)
  • 锁定模型/ MVCC - 至少可以基本掌握数据库如何管理行锁定(或使用MVCC通过乐观锁定实现类似目标)

  • ACID compliance, Txns - Please know how these work and interact
  • ACID合规性,Txns - 请知道这些是如何工作和互动的

  • Indexing - While I don't think that you need to be an expert in tablespaces, placing data on separate drives for optimal performance, and other minutiae, it does help to have a high level knowledge of how index scans work vs. tablescans. It also helps to be able to read a query plan and understand why it might be choosing one over the other.
  • 索引 - 虽然我认为您不需要成为表空间专家,将数据放在单独的驱动器上以获得最佳性能,以及其他细节,但它确实有助于高度了解索引扫描如何工作与表扫描。它还有助于能够阅读查询计划并理解为什么它可能选择一个而不是另一个。

  • Basic Tools - You'll probably find yourself wanting to copy production data to a test environment at some point, so knowing the basics of how to restore/backup your database will be important.
  • 基本工具 - 您可能会发现自己希望在某些时候将生产数据复制到测试环境,因此了解如何恢复/备份数据库的基础知识非常重要。

Fortunately, there are some great FOSS and free commercial databases out there today that can be used to learn quite a bit about db fundamentals.

幸运的是,今天有一些很棒的FOSS和免费商业数据库,可以用来学习db基础知识。

#2


3  

I think a developer should have a fairly good grasp of how their database system works, not matter which one it is. When making design and architecture decisions, they need to understand the possible implications when it comes to the database.

我认为开发人员应该很好地掌握他们的数据库系统是如何工作的,而不管它是哪一个。在进行设计和架构决策时,他们需要了解数据库可能产生的影响。

#3


3  

Personally, I think you should know how databases work as well as the relational model and the rhetoric behind it, including all forms of normalization (even though I rarely see a need to go beyond third normal form). The core concepts of the relational model do not change from relational database to relational database - implementation may, but so what?

就个人而言,我认为你应该知道数据库是如何工作的,以及关系模型及其背后的修辞,包括所有形式的规范化(即使我很少看到需要超越第三范式)。关系模型的核心概念不会从关系数据库变为关系数据库 - 实现可能会,但那又如何呢?

Developers that don't understand the rationale behind database normalization, indexes, etc. are going to suffer if they ever work on a non-trivial project.

不理解数据库规范化,索引等背后的基本原理的开发人员如果从事过一个非平凡的项目,将会受到影响。

#4


3  

I think it really depends on your job. If you are a developer in a large company with dedicated DBAs then maybe you don't need to know much, but if you are in a small company then it may be really helpful knowing more about databases. In small companies you may wear more than one hat.

我认为这取决于你的工作。如果您是一家拥有专门DBA的大公司的开发人员,那么您可能不需要了解太多,但如果您在一家小公司,那么了解有关数据库的更多信息可能会非常有用。在小公司,你可以戴一顶以上的帽子。

It cannot hurt to know more in any situation.

在任何情况下了解更多都不会有害。

#5


3  

It certainly can't hurt to be familiar with relational database theory, and have a good working knowledge of the standard SQL syntax, as well as knowing what stored procedures, triggers, views, and indexes are. Obviously it's not terribly important to learn the database-specific extensions to SQL (T-SQL, PL/SQL, etc) until you start working with that database.

熟悉关系数据库理论,并且具备标准SQL语法的良好工作知识,以及了解存储过程,触发器,视图和索引是什么,这当然不会有害。显然,在开始使用该数据库之前,学习SQL的特定于数据库的扩展(T-SQL,PL / SQL等)并不是非常重要。

I think it's important to have a basic understand of databses when developing database applications just like it's important to have an understanding of the hardware your your software runs on. You don't have to be an expert, but you shouldn't be totally ignorant of anything your software interacts with.

我认为在开发数据库应用程序时对数据库有基本的了解非常重要,就像了解软件运行的硬件一样重要。您不必是专家,但您不应该完全不知道软件与之交互的任何内容。

That said, you probably shouldn't need to do much SQL as an application developer. Most of the interaction with the database should be done through stored procedures developed by the DBA, I'm not a big fan of including SQL code in your application code. If your queries are in stored procedures, then the DBA can change the implementation of the stored procedure, or even the database schema, and so long as the result is the same it doesn't require any changes to your application code.

也就是说,作为应用程序开发人员,您可能不需要做太多SQL。大多数与数据库的交互应该通过DBA开发的存储过程完成,我不是在应用程序代码中包含SQL代码的忠实粉丝。如果您的查询在存储过程中,那么DBA可以更改存储过程的实现,甚至是数据库模式,只要结果相同,它就不需要对应用程序代码进行任何更改。

#6


2  

If you are uncertain about how to best access the database you should be using tried and tested solutions like the application blocks from Microsoft - http://msdn.microsoft.com/en-us/library/cc309504.aspx. They can also prove helpful to you by examining how that code is implemented.

如果您不确定如何最好地访问数据库,您应该使用经过试验和测试的解决方案,如Microsoft的应用程序块 - http://msdn.microsoft.com/en-us/library/cc309504.aspx。通过检查代码的实现方式,它们也可以证明对您有所帮助。

#7


0  

Basic things about Sql queries are must. then you can develop simple system. but when you are going to implement Complex systems you should know Normalization, Procedures, Functions, etc.

关于Sql查询的基本知识是必须的。那么你可以开发简单的系统。但是当你要实现复杂系统时,你应该知道规范化,程序,功能等。