没有合适的资源?快使用搜索试试~ 我知道了~
首页提升数据库性能:面向集合的编程策略
提升数据库性能:面向集合的编程策略
![](https://csdnimg.cn/release/wenkucmsfe/public/img/star.98a08eaa.png)
"《关系数据库编程:面向集合的方法》是一本专为提升关系数据库性能而设计的专业书籍。作者Stefan Ardeleanu在书中倡导了一种集约式(set-oriented)的编程方法,以区别于传统的原子性、行级、过程化编程风格,这种风格通常由未接受过更好方法的开发者在数据库开发中采用。大学教育中的经典编程倾向于基于结构化模型,导致应用开发者在数据库中使用类似用户界面的方式,而非充分利用SQL进行数据处理。 书中的主要内容包括对两种编程风格的比较,一种是传统的原子编程方式,另一种是以集合为中心、以SQL为主的编程风格。作者揭示了集约式开发在性能上的显著优势,并通过实例展示这种方法如何超越逐行操作的局限。书中详细探讨了SQL与过程化编程的对比,以及如何避免行触发器带来的原子性解决方案问题。 这本书的目标读者是希望改进编程风格以提高应用性能的应用开发者,包括学生和新进开发人员,他们希望通过掌握数据库专业知识,建立高效数据库应用的良好声誉。书的目录涵盖了从编程风格概念出发,深入到SQL的优缺点,数据处理的集合与行级视角,数据传输模式,处理标量函数的挑战,以及SQL编写与过程化编程的权衡,最后还有对这两种方法的最终反思和思考。 通过阅读这本书,读者不仅能学习到如何利用集合思维优化数据库代码,还能了解到如何在实际项目中运用这些原则来解决性能瓶颈问题,从而提升整个数据库系统的效能。这本书对于那些渴望在数据库领域成为专家并创造高性能应用的开发者来说,无疑是一本宝贵的参考和指南。"
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/9587361/bg10.jpg)
xv
About the Technical
Reviewer
Bradley Beard is a software engineer with more than
15 years experience writing dynamic, interactive web
sites using ColdFusion and SQL Server. He graduated
from Florida Institute of Technology in 2007 with a
Master of Science in Computer Information Systems,
and studied for his undergraduate degrees in CIS
and Technology Management at Herzing University.
In 2013, he earned the MCSA: SQL Server 2012
certification from Microsoft, and in 2016, he earned the
MCSE: Business Intelligence certification as well.
His continual quest for learning has earned him
shelves full of books at home and at work, most of
which are about SQL Server, ColdFusion, and general
web architectures and frameworks.
He lives in Palm Bay, Florida with his wife, Jessica, and children, Josh, Kaylee,
Matthew, and Emma. He also apparently runs an animal shelter made up of his dogs,
Lady and Bella, and cats, Spice, Simba, Mercury, and Dobby. He enjoys fishing and
spending time with his wife and kids.
Bradley is available for consultation and third-shift remote employment on
ColdFusion and SQL Server. Contact him at bradley.beard@gmail.com .
![](https://csdnimg.cn/release/download_crawler_static/9587361/bg11.jpg)
![](https://csdnimg.cn/release/download_crawler_static/9587361/bg12.jpg)
xvii
Introduction
I want to share some thoughts from my experiences doing project-based work as an IT
contractor. Working as an IT contractor means taking on a mix of short- and long-term
projects. In a short-term project, you need to work on a specific task with a team of
developers, you need to solve a problem quickly, and then you are done with the project!
The team of developers will continue their work and you will search for a new project and
challenge.
Three stories…
Some time ago, I was on a project where most of the members were very experienced
Java developers. They were developing a document management system that was
metadata-based and written almost exclusively in Java. The database was Oracle. The
manager and their technical leader invited me to do some Oracle work, to solve some
database-specific tasks for the project. All the team members were pure application
developers and no one had much expertise with databases. Everything was transformed
in SQL, but no one cared too much about that. The developers were good artists and the
design was very sophisticated. It was written following the principles of object-oriented
programing.
One day, I was in the office listening to some of my colleagues discuss a certain SQL
statement. They asked me some questions, which I did not understand. I went over to
their desks and looked at what they were working on. I was still confused because the SQL
statement in question was quite basic. A self-join was required. I added the self-join and
everything worked perfectly well. The team members were amazed! They were not aware
that a table can be referenced many times in a join using various aliases. They were not
familiar with a self-join!
Later we spoke some more about our careers. They were surprised by the fact that,
the same way they spend their entire career doing Java, I spend my entire career doing
database development and especially doing SQL. “SQL is so simple. Your task is such a
trivial task. Your life is much easier than ours,” they said. “We fight with such complicated
concepts and you just manipulate rows and columns in your simple query language!”
Another time I was in France with two of my good colleagues, Clark and Marjorie.
Clark is American; he has been my manager for a long time and he is a very good friend.
Marjorie is an elegant French woman; she is my colleague in support in the French area.
We were in a café and we were chatting. We ordered some wine. In addition, I asked for
some mineral water. In my country, people mix sparkling water with wine. I thought
about asking Marjorie what she thought of this custom, but I knew the answer. To any
French person, mixing water with wine is a blasphemy. So I left the water where it was,
apart from the glass of wine!
![](https://csdnimg.cn/release/download_crawler_static/9587361/bg13.jpg)
■ INTRODUCTION
xviii
What is the connection between these three shared memories? Being an application
developer does not make you SQL independent, in most cases. Whether you like it or
not, you will be in contact with SQL, sometimes more or sometimes less! The same way
any database developer knows the basics of structured programming, normally most
application developers know the basics of SQL. There is no such thing as a superior or
inferior language, just useful and compatible ones according to the business. When you
are in the country of relational databases, even if you are an application developer, you
should learn how to write fair SQL.
Writing Correctly Is Critical to Quality
I believe that one of the most important aspects is the way we write our code, our
style of development. It is hard to say what it means to write correctly in the context of
software development. There is a degree of subjectivity involved in any judgment of
this type. However, I believe that no one can argue with me when I say that the style
of development and the way we write our code is proportional with the quality of the
software we build.
I am a database developer with many years of experience. During my time spent
inside relational databases, I have gathered enough experience to be able to explain that the
database area requires a certain and distinct style of development. This is the topic of this
book: how to write code inside a relational database in a certain manner, distinct and specific.
There are millions of lines of codes in databases all over the world that are written
in a total inadequate manner and these lines of code cause many performance issues
in many places. All of these performance issues can be avoided if the programmers
understand that a certain style of development is required in a relational database.
The style of this book is not academic although it is a book about database
programming. I am a practical person and I think that programming is part of our lives.
Basic Terminology
Due to the direct style of this book and the fact that this book is about database
development, which means that it is a technical book, I define some basic terminology.
The Internet is full of classifications and manuals, courses and documentation, libraries
and practical examples. The concepts are explained and re-explained by specialists.
I want to be consistent and to avoid any possible confusion, so let’s clarify some
concepts and keywords used in this book.
A data-oriented software application is composed of at least one user interface,
graphical or not, and the database behind it. When I say database, I am referring mostly
to a relational database. One of the main goals for any software application of this type
is to allow data access in the database via the user interface. The end users read and
write from the database via the user interface. This is what I call a classic data-oriented
software system. I will use the term “classic software application” for simplicity. The focus
is on the database, so the topic of the software application is the database section.
Another type of data-oriented software application is one that transfers data between
classic systems. Medium or large companies have many classic software applications.
Every software system of this type has its own purpose, its own database, and will cover
![](https://csdnimg.cn/release/download_crawler_static/9587361/bg14.jpg)
■ INTRODUCTION
xix
one part of the business or another. I call this a specific software application. In most
cases, there is no user interface and no classic end user. One or many classic systems are
the targets and the one or many classic systems are the sources. This system can be a
replication system, a data migration system, or an Extract-Transform-Load system (ETL)
part of a data warehouse system.
Please be aware of the distinction. One is to develop in a database in a classic system
and another one is to develop in a specific system. My main interest in this book is related
to the variety of specific systems where many developers work in the same manner they
work in classic systems.
Finally, please read Oracle database as Oracle and Microsoft SQL Server as
SQL Server.
Types of Software Developers
I am a SQL developer. In other words, I am a classic database developer. For many years,
I felt bad about this. I thought that the only pure and authentic database specialists were
the database administrators. I wrongly thought that being a database developer, which
means a SQL developer, is not a path by itself but a skill among others, an insufficient
path that could be associated with something else. People were searching for developers
in different combinations like Java plus PL SQL or C# and SQL Server. SQL programming
and classic database development was considered an addition to application
development. Unfortunately, this is still the case in many places.
Being a software developer means knowing how to develop both the database and
non-database layers. Sometimes we must do both and sometimes we do exclusive work.
“He is a very good Java developer, you will see!” “He has many years of experience
with C and almost as many with C#. He is a very good programmer!” These kinds of
statements are very common. Application developers continue to be the most popular
type of developers on the market. For example, developing a web interface is a popular
occupation nowadays, and the market is full of good web developers who can satisfy the
requirements and build extensive and scalable applications.
What is happening with the database? After the 1990s, the only authentic database
people were the database administrators. Being a DBA is a difficult task and involves
enormous responsibilities. If something goes wrong in the factory and the inventories fail,
the DBA must be there and must find a solution so that the work can continue. It is far
from my intention to minimize the role of a DBA: his presence is critical and necessary for
any production system. In large enterprises, there are armies of database administrators
who take care of the databases.
What about the ones that effectively built the databases as part of the data-oriented
software application? For many years, the market neglected them. I admit there is
a degree of subjectivism in this statement that I am not afraid to recognize; you can
consider it as a personal point of view. The database developers should have received
more recognition in the past and even today. Look at the job descriptions in the past,
before the BI and data warehouse explosions; you will rarely see explicit requirements for
database developers. Happily, today you can see more requests for database specialists;
this change is due to the explosion of reporting systems and analytics. For example, an
ETL specialist is a highly specialized database developer, and not an ordinary SQL or
database developer!
剩余167页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/e66324aa22894c0997bffffafc974f36_ramissue.jpg!1)
ramissue
- 粉丝: 354
- 资源: 1487
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- AirKiss技术详解:无线传递信息与智能家居连接
- Hibernate主键生成策略详解
- 操作系统实验:位示图法管理磁盘空闲空间
- JSON详解:数据交换的主流格式
- Win7安装Ubuntu双系统详细指南
- FPGA内部结构与工作原理探索
- 信用评分模型解析:WOE、IV与ROC
- 使用LVS+Keepalived构建高可用负载均衡集群
- 微信小程序驱动餐饮与服装业创新转型:便捷管理与低成本优势
- 机器学习入门指南:从基础到进阶
- 解决Win7 IIS配置错误500.22与0x80070032
- SQL-DFS:优化HDFS小文件存储的解决方案
- Hadoop、Hbase、Spark环境部署与主机配置详解
- Kisso:加密会话Cookie实现的单点登录SSO
- OpenCV读取与拼接多幅图像教程
- QT实战:轻松生成与解析JSON数据
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)