- Ocena:
- Bądź pierwszym, który oceni tę książkę
- Stron:
- 294
- Dostępne formaty:
-
ePubMobi
Opis
książki
:
Oracle PL/SQL Best Practices. 2nd Edition
In this compact book, Steven Feuerstein, widely recognized as one of the world's leading experts on the Oracle PL/SQL language, distills his many years of programming, teaching, and writing about PL/SQL into a set of best practices-recommendations for developing successful applications. Covering the latest Oracle release, Oracle Database 11gR2, Feuerstein has rewritten this new edition in the style of his bestselling Oracle PL/SQL Programming. The text is organized in a problem/solution format, and chronicles the programming exploits of developers at a mythical company called My Flimsy Excuse, Inc., as they write code, make mistakes, and learn from those mistakes-and each other.
This book offers practical answers to some of the hardest questions faced by PL/SQL developers, including:
- What is the best way to write the SQL logic in my application code?
- How should I write my packages so they can be leveraged by my entire team of developers?
- How can I make sure that all my team's programs handle and record errors consistently?
This book is a concise and entertaining guide that PL/SQL developers will turn to again and again as they seek out ways to write higher quality code and more successful applications.
"This book presents ideas that make the difference between a successful project and one that never gets off the ground. It goes beyond just listing a set of rules, and provides realistic scenarios that help the reader understand where the rules come from. This book should be required reading for any team of Oracle database professionals."
--Dwayne King, President, KRIDAN Consulting
Wybrane bestsellery
-
Promocja
Relacyjne bazy danych są wszędzie wokół nas, a do podstawowych umiejętności wymaganych od współczesnych programistów należy dobra znajomość języka SQL. Na świecie nie ma jednak osób, którym nie zdarza się czegoś zapomnieć. Jeśli potrzebujesz pomocy w codziennej pracy lub chcesz odświeżyć wiedzę na temat SQL-a, sięgnij po te tablice! Szybko znajdziesz w nich niezbędne informacje i sprawdzisz instrukcje, które umożliwią sprawne osiągnięcie celu. Jedno spojrzenie pozwoli Ci przypomnieć sobie sposób tworzenia zapytań i zastosowanie różnych konstrukcji języka.- Druk 8 pkt
(6,90 zł najniższa cena z 30 dni)
8.49 zł
17.00 zł (-50%) -
Nowość Promocja
Unlock a world of job opportunities and accelerate your career growth by mastering MongoDB Key Features Master the fundamental principles of Schema Design, Querying, and Database Administration. Explore advanced topics, including Aggregation, Replication, and Sharding. Develop a fully functional application utilizing MongoDB Cloud Services. Descr- ePub + Mobi 80 pkt
(71,91 zł najniższa cena z 30 dni)
80.91 zł
89.90 zł (-10%) -
Nowość Promocja
A practical guide that will help you learn and leverage PostgreSQL's core features Key Features Acquire in-depth knowledge of PostgreSQL's key capabilities and gain a comprehensive understanding of its inner workings. Discover the art of extending PostgreSQL's core features and effectively troubleshooting any challenges that may arise. Explore the- ePub + Mobi 80 pkt
(71,91 zł najniższa cena z 30 dni)
80.91 zł
89.90 zł (-10%) -
Nowość Promocja
A step-by-step guide for designing, implementing, and managing Oracle GoldenGate with HUB Architecture Key Features Learn how to use the REST API, command line solutions, and web interface to manage Oracle GoldenGate Microservices Architecture. Configure Oracle GoldenGate Microservices for disaster recovery and high-availability architecture. Lear- ePub + Mobi 80 pkt
(71,91 zł najniższa cena z 30 dni)
80.91 zł
89.90 zł (-10%) -
Promocja
PowerShell Essentials - Your path to efficient automation and scripting Key Features Understand the concepts of .NET and PowerShell. Learn the basics of PowerShell, including the syntax, commands, and core concepts. Learn how to work with variables in PowerShell, including how to store data, perform arithmetic operations, and display data. Get fam- ePub + Mobi 80 pkt
(38,90 zł najniższa cena z 30 dni)
80.91 zł
89.90 zł (-10%) -
Promocja
Navigating the Oracle landscape, mastering installation on OCI Compute Key Features Comprehend Oracle Database 21c installation, essential concepts, and advanced features. Focus on Oracle Cloud Infrastructure (OCI) Compute, to deploy databases in a cloud environment. Practical tips and best practices to optimize performance and troubleshoot effect- ePub + Mobi 80 pkt
(38,90 zł najniższa cena z 30 dni)
80.91 zł
89.90 zł (-10%) -
Promocja
Toolkit for unlocking the power of Amazon RDS and propelling businesses toward success in the digital age Key Features Explore Amazon RDS by covering basics to advanced MySQL management on the platform. Real-world examples and hands-on tutorials to apply gained knowledge to solve challenges. Latest features, tools, and best practices in Amazon RDS- ePub + Mobi 80 pkt
(38,90 zł najniższa cena z 30 dni)
80.91 zł
89.90 zł (-10%) -
Promocja
Unveiling insights, unleashing potential: Navigating the depths of big data and analytics for a data-driven tomorrow Key Features Learn about big data and how it helps businesses innovate, grow, and make decisions efficiently. Learn about data collection, storage, processing, and analysis, along with tools and methods. Discover real-life examples- ePub + Mobi 80 pkt
(38,90 zł najniższa cena z 30 dni)
80.91 zł
89.90 zł (-10%) -
Promocja
Debugging Machine Learning Models with Python equips you with the skills needed to transition from a machine learning beginner to a specialist. It guides you through the tools, theoretical concepts, Python modules, and libraries for bringing a high-quality model into production and identifying opportunities to improve your models.- PDF + ePub 125 pkt
(29,90 zł najniższa cena z 30 dni)
125.10 zł
139.00 zł (-10%) -
Promocja
As legacy and other critical systems continue to migrate online, the need for continuous operation is imperative. Code has to handle data issues as well as hard external problems today, including outages of networks, storage systems, power, and ancillary systems. This practical guide provides system administrators, DevSecOps engineers, and cloud ar- ePub + Mobi 254 pkt
(245,65 zł najniższa cena z 30 dni)
254.15 zł
299.00 zł (-15%)
Steven Feuerstein - pozostałe książki
-
Oracle is the most popular database management system in use today, and PL/SQL plays a pivotal role in current and projected Oracle products and applications. PL/SQL is a programming language providing procedural extensions to the SQL relational database language and to an ever-growing number of oracle development tools. originally a rather limited
- ePub + Mobi 179 pkt
Niedostępna
-
Promocja
Be more productive with the Oracle PL/SQL language. The fifth edition of this popular pocket reference puts the syntax of specific PL/SQL language elements right at your fingertips, including features added in Oracle Database 12c.Whether you’re a developer or database administrator, when you need answers quickly, the Oracle PL/SQL Language Pocket R- ePub + Mobi 50 pkt
(46,74 zł najniższa cena z 30 dni)
50.91 zł
59.90 zł (-15%) -
Promocja
Considered the best Oracle PL/SQL programming guide by the Oracle community, this definitive guide is precisely what you need to make the most of Oracle’s powerful procedural language. The sixth edition describes the features and capabilities of PL/SQL up through Oracle Database 12c Release 1.Hundreds of thousands of PL/SQL developers have benefite- ePub + Mobi 211 pkt
(203,15 zł najniższa cena z 30 dni)
211.65 zł
249.00 zł (-15%) -
Promocja
PL/SQL, Oracle's powerful procedural language, has been the cornerstone of Oracle application development for nearly 15 years. Although primarily a tool for developers, PL/SQL has also become an essential tool for database administration, as DBAs take increasing responsibility for site performance and as the lines between developers and DBAs blur.U- ePub + Mobi 135 pkt
(89,92 zł najniższa cena z 30 dni)
135.15 zł
159.00 zł (-15%) -
Promocja
For the past ten years, O'Reilly's Oracle PL/SQL Programming has been the bestselling book on PL/SQL, Oracle's powerful procedural language. Packed with examples and helpful recommendations, the book has helped everyone--from novices to experienced developers, and from Oracle Forms developers to database administrators--make the most of PL/SQL.The- ePub + Mobi 194 pkt
(186,15 zł najniższa cena z 30 dni)
194.65 zł
228.99 zł (-15%) -
PL/SQL -- język programowania systemu Oracle, przeznaczony do tworzenia procedur magazynowanych -- zapewnia ogromne możliwości piszącym oprogramowanie baz danych. PL/SQL rozszerza standard języka relacyjnych baz danych SQL poprzez umożliwienie korzystania z takich konstrukcji, jak: pętle, instrukcje IF-THEN, złożone struktury danych czy szerokie możliwości kontroli operacji transakcyjnych. Wszystkie z nich są ściśle zintegrowane z serwerem bazy danych Oracle.
- Druk 79 pkt
Czasowo niedostępna
-
Promocja
In this book, Steven Feuerstein, widely recognized as one of the world's experts on the Oracle PL/SQL language, distills his many years of programming, writing, and teaching about PL/SQL into a set of PL/SQL language "best practices"--rules for writing code that is readable, maintainable, and efficient. Too often, developers focus on simply writing- ePub + Mobi 55 pkt
(50,91 zł najniższa cena z 30 dni)
55.24 zł
64.98 zł (-15%) -
Promocja
However excellent they are, most computer books are inherently passive--readers simply take in text without having any opportunity to react to it. The Oracle PL/SQL Developer's Workbook is a different kind of animal! It's designed to engage you actively, to get you solving programming problems immediately, and to help you apply what you've learned- ePub + Mobi 169 pkt
(160,65 zł najniższa cena z 30 dni)
169.14 zł
199.00 zł (-15%) -
Promocja
The implementation of stored procedures in MySQL 5.0 a hugemilestone -- one that is expected to lead to widespread enterprise adoption ofthe already extremely popular MySQL database. If you are serious aboutbuilding the web-based database applications of the future, you need toget up to speed quickly on how stored procedures work -- and how tobuild- ePub + Mobi 135 pkt
(89,02 zł najniższa cena z 30 dni)
135.15 zł
159.00 zł (-15%)
Ebooka "Oracle PL/SQL Best Practices. 2nd Edition" przeczytasz na:
-
czytnikach Inkbook, Kindle, Pocketbook, Onyx Boox i innych
-
systemach Windows, MacOS i innych
-
systemach Windows, Android, iOS, HarmonyOS
-
na dowolnych urządzeniach i aplikacjach obsługujących formaty: PDF, EPub, Mobi
Masz pytania? Zajrzyj do zakładki Pomoc »
Audiobooka "Oracle PL/SQL Best Practices. 2nd Edition" posłuchasz:
-
w aplikacji Ebookpoint na Android, iOS, HarmonyOs
-
na systemach Windows, MacOS i innych
-
na dowolonych urządzeniach i aplikacjach obsługujących format MP3 (pliki spakowane w ZIP)
Masz pytania? Zajrzyj do zakładki Pomoc »
Kurs Video "Oracle PL/SQL Best Practices. 2nd Edition" zobaczysz:
-
w aplikacjach Ebookpoint i Videopoint na Android, iOS, HarmonyOs
-
na systemach Windows, MacOS i innych z dostępem do najnowszej wersji Twojej przeglądarki internetowej
Szczegóły książki
- ISBN Ebooka:
- 978-05-965-5152-0, 9780596551520
- Data wydania ebooka :
- 2007-10-22 Data wydania ebooka często jest dniem wprowadzenia tytułu do sprzedaży i może nie być równoznaczna z datą wydania książki papierowej. Dodatkowe informacje możesz znaleźć w darmowym fragmencie. Jeśli masz wątpliwości skontaktuj się z nami sklep@ebookpoint.pl.
- Język publikacji:
- 1
- Rozmiar pliku ePub:
- 1.1MB
- Rozmiar pliku Mobi:
- 3MB
Spis treści książki
- Oracle PL/SQL Best Practices, 2nd Edition
- SPECIAL OFFER: Upgrade this ebook with OReilly
- A Note Regarding Supplemental Files
- Preface
- Why Best Practices?
- Best Practices and the Real World
- They Call This "Work"?
- The Cast of Characters
- Structure of This Book
- How to Use This Book
- Conventions Used in This Book
- About the Code
- Comments and Questions
- Safari Books Online
- Acknowledgments
- Why Best Practices?
- 1. The Big Picture
- Successful Applications Are Never an Accident
- Successful Applications Meet User Requirements
- Successful Applications Are Maintainable
- Successful Applications Run Fast Enough
- Best Practices for Successful Applications
- Software is like ballet: choreograph the moves or end up with a mess.
- Put into place a practical workflow that emphasizes iterative development based on a shared foundation.
- Problem: In software, the ends (production code) are inseparable from the means (the build process).
- Solution: Agree on a common development workflow built around standards, testing, and reviews.
- Application-level workflow
- Step 1: Define requirements and standards.
- Step 2: Build the application foundation.
- Step 3: Build the next application iteration.
- Step 4: Validate the application iteration
- Single-program construction workflow
- Step 1: Prepare for program construction.
- Step 2: Build an iteration of the program.
- Step 3: Test the program iteration.
- Step 4: Trace execution of the program.
- Step 5: Debug the program.
- Step 6: Validate the program: optimize and review.
- Which steps do you perform?
- Put into place a practical workflow that emphasizes iterative development based on a shared foundation.
- Deferred satisfaction is a required emotion for best practices.
- Hold off on implementing the body of your program until your header is stable and your tests are defined.
- Step 1. Validate program requirements
- Step 2. Implement just the header of the program
- Step 3. Define the tests that must be run
- Step 4. Build your test code
- Hold off on implementing the body of your program until your header is stable and your tests are defined.
- Contracts work for the real world; why not software, too?
- Match strict input expectations with guaranteed output results.
- Problem: What is never discussed is never agreed upon.
- Solution: Contracts capture agreements.
- About Design by Contract.
- Enforcing contracts in code.
- Match strict input expectations with guaranteed output results.
- Dont act like a bird: admit weakness and ignorance.
- Ask for help (or at least take a break) after 30 minutes on a problem.
- Problem: Steven is a hypocritical programmer.
- Solution: Give your brain a break, and ask others for help.
- Ask for help (or at least take a break) after 30 minutes on a problem.
- Five heads are better than one.
- Review and walk through one another's code; then do automated code reviews.
- Problem: Sunita spent six months developing comprehensive coding standards for her group.
- Solution: Move beyond documents to a review process that directly engages the development team.
- Resources
- Review and walk through one another's code; then do automated code reviews.
- Don't write code that a machine could write for you instead.
- Generate code whenever possible.
- Problem: Jasper is starting to feel more like a robot than a human being.
- Solution: If you can recognize a pattern in what you are writing, generate code from that pattern.
- Generate code whenever possible.
- We need more than brains to write software.
- Take care of your "host body": fingers, wrists, back, etc.
- Successful Applications Are Never an Accident
- 2. Real Developers Follow Standards
- Best Practices for Developing and Using Standards
- It's a free country; I don't have to use carriage returns in my code.
- Adopt a consistent format that is easy to read and maintain.
- Problem: Delaware writes code that no one else can read.
- Solution: Use the built-in functionality of your IDE to automatically format your code.
- Adopt a consistent format that is easy to read and maintain.
- Too much freedom is a very bad thing.
- Adopt consistent naming conventions for subprograms and data structures.
- Problem: Jasper's eagerness to help is overwhelmed by his hurry to get it done.
- Solution: Rely on naming conventions that are intuitive and easy to apply.
- Adopt consistent naming conventions for subprograms and data structures.
- Good names lead to good code.
- Name procedures with verb phrases, and functions with noun phrases.
- Problem: Badly formed or inaccurate names can greatly reduce usability of programs.
- Solution: Construct subprogram names so they reflect both what they are and what they do.
- Name procedures with verb phrases, and functions with noun phrases.
- Put your checklists into your code.
- Define templates to foster standardization in package and program structure.
- Problem: Checklists on paper rarely translate into changes in the way we write our code.
- Solution: Make your checklists active and directly involved in development.
- Resources
- Define templates to foster standardization in package and program structure.
- Who needs comments? My code is self-documenting!
- Comment tersely with value-added information.
- Problem: One person's clarity is another person's bewilderment.
- Solution: Sometimes you really do need to add comments.
- Comment tersely with value-added information.
- 3. Life After Compilation
- Testing, Tracing, and Debugging
- Testing
- Tracing
- Debugging
- Best Practices for Testing, Tracing, and Debugging
- Thanks, but no thanks, to DBMS_OUTPUT.PUT_LINE!
- Avoid using the DBMS_OUTPUT.PUT_LINE procedure directly.
- Problem: DBMS_OUTPUT.PUT_LINE is inadequate for tracing.
- Solution: Build a layer of code over DBMS_OUTPUT.PUT_LINE.
- Avoid using the DBMS_OUTPUT.PUT_LINE procedure directly.
- Assume the worst, and you will never be disappointed.
- Instrument your code to trace execution.
- Problem: We live in the moment, and don't think about what it will take to maintain our code.
- General Solution: Build instrumentation (tracing) into your application from the start.
- Specific Solution 1: Embed trace calls in Boolean expressions to minimize overhead.
- Specific Solution 2: Include standardized modules in packages to dump package state when errors occur.
- Specific Solution 3: Build trace "windows" into your packages using standardized programs.
- Instrument your code to trace execution.
- Users really don't want to be programmers.
- Test your programs thoroughly, and as automatically as possible.
- Problem: Sunita's team is dragged down off its pedestal of semi-godliness.
- General Solution: Don't make testing an option, and don't just "try" a few things.
- Specific Solution 1: A brief introduction to utPLSQL.
- Specific Solution 2: A brief introduction to Quest Code Tester for Oracle.
- Resources
- Test your programs thoroughly, and as automatically as possible.
- Do you take road trips without a destination in mind?
- Follow the test-driven development methodology.
- Problem: We cannot trust our own minds to fully and objectively test our code.
- Solution: Decide before you implement your program how you will know when it works correctly.
- Resources
- Follow the test-driven development methodology.
- For every test you can think of, there are 10 tests waiting to be performed.
- Don't worry about getting to 100 percent test coverage.
- Problem: Lizbeth has entered a medical condition called the Test-By-Hand Coma State.
- Solution: When it comes to testing, be happy with getting started and with steady progress.
- Don't worry about getting to 100 percent test coverage.
- Sherlock Holmes never had it so good.
- Use source code debuggers to hunt down the cause of bugs.
- Problem: Jasper writes some complicated code and has no idea what it is doing.
- Solution: Use the built-in, interactive source debuggers available in almost every PL/SQL IDE.
- Use source code debuggers to hunt down the cause of bugs.
- Testing, Tracing, and Debugging
- 4. What's Code Without Variables?
- Best Practices for Declaring Variables and Data Structures
- That column's never going to change!
- Always anchor variables to database datatypes using %TYPE and %ROWTYPE.
- Problem: Lizbeth writes a "quick-and-dirty" program.
- Solution: Assume that everything will change and that any program you write could be around for decades.
- Always anchor variables to database datatypes using %TYPE and %ROWTYPE.
- There's more to data than columns in a table.
- Use SUBTYPEs to declare program-specific and derived datatypes.
- Problem: Lizbeth learns her lesson but then cannot apply it.
- Solution: Create a new datatype with SUBTYPE and anchor to that.
- Use SUBTYPEs to declare program-specific and derived datatypes.
- I take exception to your declaration section.
- Perform complex variable initialization in the execution section.
- Problem: The exception section of a block can only trap errors raised in the execution section.
- Solution: Don't trust the declaration section to assign default values.
- Perform complex variable initialization in the execution section.
- Best Practices for Using Variables and Data Structures
- This logic is driving me crazy!
- Replace complex expressions with well-named constants, variables, or functions.
- Problem: Business rules can be complicated, and it's hard to keep them straight.
- Solution: Simplify code to make the criteria for the business rules more obvious.
- Replace complex expressions with well-named constants, variables, or functions.
- Go ahead and splurge: declare distinct variables for different usages.
- Don't overload data structure usage.
- Problem: World weariness infects Lizbeth's code.
- Solution: Don't let your weariness show in your codeand don't recycle!
- Don't overload data structure usage.
- Didn't your parents teach you to clean up after yourself?
- Clean up data structures when your program terminates (successfully or with an error).
- Problem: Sometimes you really do need to clean up in a PL/SQL block.
- Resources
- Clean up data structures when your program terminates (successfully or with an error).
- Programmers are (or should be) control freaks.
- Beware of and avoid implicit datatype conversions.
- Problem: PL/SQL performs implicit conversionsbut they're not always what you want.
- Solution: Perform explicit conversions rather than relying on implicit conversions.
- Resources
- Beware of and avoid implicit datatype conversions.
- Best Practices for Declaring and Using Package Variables
- Danger, Will Robinson! Globals in use!
- Use package globals sparingly and only in package bodies.
- Problem: Jasper needs Lizbeth's program data. Delaware needs Jasper's program data.
- Solution: Don't expose program data in package specifications, letting everyone see and change it.
- Use package globals sparingly and only in package bodies.
- Packages should have a strong sense of personal space.
- Control access to package data with "get and set" modules.
- Problem: Data structures declared in a package specification may end up bypassing business rules.
- Solution: Declare data in the package body, and hide the data structures via functions in the package specification.
- Control access to package data with "get and set" modules.
- 5. Developer As Traffic Cop
- Best Practices for Conditional and Boolean Logic
- Reading your code should not require mental gymnastics.
- Use IF . . . ELSIF only to test a single, simple condition.
- Problem: IF-statement logic can become complex and confusing.
- Solution: Simplify by specifying clauses at multiple levels.
- Use IF . . . ELSIF only to test a single, simple condition.
- KISS (Keep it Simple, Steven).
- Use CASE to avoid lengthy sequences of IF statements.
- Problem: Lizbeth needs to construct a string conditionally from a number of pieces.
- Solution: CASE will greatly simplify the code.
- Solution: Don't forget the ELSE in the CASE!
- Use CASE to avoid lengthy sequences of IF statements.
- Beware the hidden costs of NULL.
- Treat NULL conditions explicitly in conditional statements.
- Problem: Why is Lizbeth's IF statement doing that?
- Solution: Remember that a NULL is not equal to anything else, even another NULL, and code explicitly for that case.
- Treat NULL conditions explicitly in conditional statements.
- Best Practices for Loop Processing
- There's a right way and a wrong way to say goodbye.
- Never EXIT or RETURN from WHILE and FOR loops.
- Problem: Jasper writes a loop that offers many exit paths.
- Solution: One way in, one way out.
- Never EXIT or RETURN from WHILE and FOR loops.
- Don't take out "programmers' insurance" . . . and don't worry about SkyNet.
- Never declare the FOR loop index or any other implicitly declared structure.
- Problem: The previous developer wrote some code just in case.
- Solution: Cyberspace is a world of our making. Remove all uncertainty from your code.
- Never declare the FOR loop index or any other implicitly declared structure.
- There is more than one way to scan a collection.
- Use FOR loops for dense collections, WHILE loops for sparse collections.
- Problem: It's so hard to write code without making assumptions!
- Solution: Write "full collection scans" so that there is no assumption about how the collection is filled.
- Use FOR loops for dense collections, WHILE loops for sparse collections.
- Best Practices for Branching Logic
- Maze-like programs are never a good thing.
- Use GOTO and CONTINUE only when structured code is not an option.
- Resources
- Use GOTO and CONTINUE only when structured code is not an option.
- 6. Doing the Right Thing When Stuff Goes Wrong
- Best Practices for Understanding Error Handling
- Ignorance is bad exception management.
- Study how error raising, handling, and logging work in PL/SQL.
- Problem: Know-it-alls don't know the most important thing: they're wrong!
- Solution: Take some time to familiarize yourself with how PL/SQL exception management works and what PL/SQL offers to help you get the job done.
- Resources
- Study how error raising, handling, and logging work in PL/SQL.
- All exceptions are not created equal.
- Distinguish between deliberate, unfortunate, and unexpected errors.
- Deliberate exceptions
- Unfortunate and unexpected exceptions
- How to benefit from this categorization
- Problem: Application logic in the exception is hard to find and maintain.
- Solution: Avoid application logic in the exception section.
- Problem: Unhandled unfortunate exceptions make your code less flexible and more difficult to reuse.
- Solution: Transform the exception to a status indicator that can be interpreted by the user of that code.
- Problem: Unhandled unexpected errors cause a loss of information about the cause of the error.
- Solution: Handle those unexpected, "hard" errors and then re-raise the exception.
- In conclusion . . .
- Distinguish between deliberate, unfortunate, and unexpected errors.
- One error management approach for all.
- Use error-management standards to avoid confusion and conflicts.
- General Problem: Chaos reigns!
- Specific Problem 1: Get word back to the users.
- Specific Problem 2: How do I log my error? Let me count the ways . . .
- General Solution: One component, under source control, for all to use.
- Specific Solution 1: No more RAISE_APPLICATION_ERROR.
- Specific Solution 2: Use declarative error handler routines.
- Resources
- Use error-management standards to avoid confusion and conflicts.
- Best Practices for Nitty-Gritty, Everyday Exception Programming
- Your code makes me feel dumb.
- Use the EXCEPTION_INIT pragma to name exceptions and make your code more accessible.
- Problem: A little bit of laziness and a slight dose of advanced features can ruin a good program.
- Solution: Avoid writing "clever" code that shows just how much you know and how smart you are.
- Use the EXCEPTION_INIT pragma to name exceptions and make your code more accessible.
- Avoid programmer apathy.
- Never use WHEN OTHERS THEN NULL.
- Problem: The "I don't care" exception handler can cover up problems too indiscriminately.
- Solution: Add value in WHEN OTHERS: log information and re-raise some exception or other!
- Never use WHEN OTHERS THEN NULL.
- Best Practices for Coding Defensively
- You weren't supposed to do that with my program!
- Use assertion routines to verify all assumptions made in your program.
- Problem: Delaware expects everyone to be a know-it-all like him.
- Solution: Assume nothing! Make all assumptions explicit, and then validate them.
- Resources
- Use assertion routines to verify all assumptions made in your program.
- 7. Break Your Addiction to SQL
- SQL Is Bad!
- Step 1. Hardcoding is bad.
- Step 2: Every SQL statement you write is a hardcoding.
- Step 3. Draw the logical conclusion.
- General SQL Best Practices
- The best way to avoid problematic code is to not write it.
- Hide your SQL statements behind a programmatic interface.
- Problem: PL/SQL developers are addicted to SQL!
- Solution: Never repeat a SQL statement; instead, implement SQL behind procedures and functions.
- Never hardcode or expose a query in your application-level code.
- Encapsulate INSERT, UPDATE, and DELETE statements behind procedure calls.
- The path to an effective programmatic interface for your SQL.
- Hide your SQL statements behind a programmatic interface.
- You may write PL/SQL code, but SQL always takes precedence.
- Qualify PL/SQL variables with their scope names when referenced inside SQL statements.
- Problem: Global search-and-replace to the rescue!
- Solution: Always check after global search-and-replace, and qualify all variable references.
- Qualify PL/SQL variables with their scope names when referenced inside SQL statements.
- When one transaction is not enough.
- Use autonomous transactions to isolate the effect of COMMITs and ROLLBACKs.
- Problem: Your error log entries have disappeared!
- Solution: Save your log information separately from your business transaction logic.
- Use autonomous transactions to isolate the effect of COMMITs and ROLLBACKs.
- I don't always want to save my changes.
- Don't hardcode COMMITs and ROLLBACKs in your code.
- Problem: Is everything Lizbeth does in her programs some kind of hardcoding?
- Solution: Call your own program to do the commit (or rollback), and make it more flexible.
- Resources
- Don't hardcode COMMITs and ROLLBACKs in your code.
- Best Practices for Querying Data from PL/SQL
- It's always better to fetch items into a single basket.
- Fetch into cursor records, never into a hardcoded list of variables.
- Problem: A change in one place affects many othersnever a good idea.
- Solution: Skip all those declarations and replace them with a single record.
- Fetch into cursor records, never into a hardcoded list of variables.
- Answer the question being asked; that is, be a good listener.
- Use COUNT only when the actual number of occurrences is needed.
- Problem: Delaware is not a good listener.
- Solution: Use COUNT only when you need to know "How many rows?"
- Use COUNT only when the actual number of occurrences is needed.
- Your code makes my head spin.
- Don't use a cursor FOR loop to fetch just one row.
- Problem: Jasper chooses the wrong time to be lazy.
- Solution: Use the cursor FOR loop only when fetching multiple rows.
- Don't use a cursor FOR loop to fetch just one row.
- Best Practices for Changing Data from PL/SQL
- Assume the worst!
- Don't forget exception handlers for your DML statements.
- Problem: Jasper knows what he's supposed to do. He just can't bring himself to do it.
- Solution: Make sure that any errors that can be anticipated are logged and communicated to the user.
- Don't forget exception handlers for your DML statements.
- Things only get more complicated over time.
- List columns explicitly in your INSERT statements.
- Problem: It's hard to think about what a table will be like in the future.
- Solution: Always explicitly list the columns that are part of the INSERT statement.
- List columns explicitly in your INSERT statements.
- Timing is everything in the world of cursors.
- Reference cursor attributes immediately after executing the SQL operation.
- Problem: I check the contents of the SQL%ROWCOUNT too late in the game.
- Solution: Remember that SQL% attributes always refer to the most recently executed implicit cursor in your session.
- Reference cursor attributes immediately after executing the SQL operation.
- Best Practices for Dynamic SQL
- Make it easy to untangle and debug your dynamic SQL statements.
- Always parse a string variable; do not EXECUTE IMMEDIATE a literal.
- Problem: There's something wrong with Lizbeth's dynamic SQL, but she can't figure it out.
- Solution: Make sure your exception section can display the string that failed to parse.
- Always parse a string variable; do not EXECUTE IMMEDIATE a literal.
- Give the RDBMS a break.
- Avoid concatenation of variable values into dynamic SQL strings.
- Problem: You have lots of dynamic SQL updates, with different values each time.
- Solution: Bind, don't concatenate, to optimize performance and simplify dynamic string construction.
- Avoid concatenation of variable values into dynamic SQL strings.
- So you think you know what users might do with your code?
- Do not allow malicious injection of code into your dynamic statements.
- Problem: So many teenagers, so many ways to enter data at the web site.
- Solution: Avoid concatenation of SQL text, rely on bind variables, and secure your schemas.
- Do not allow malicious injection of code into your dynamic statements.
- It's rude to drop someone else's objects.
- Apply the invoker rights method to stored code that executes dynamic SQL.
- Problem: A seemingly handy utility goes badly wrong.
- Solution: Make sure your dynamic SQL programs run under the invoker's authority.
- Resources
- Apply the invoker rights method to stored code that executes dynamic SQL.
- SQL Is Bad!
- 8. Playing with Blocks (of Code)
- Best Practices for Parameters
- Once a program is in use, you can't change it willy-nilly.
- Ensure backward compatibility as you add parameters.
- Problem: Lizbeth's program needs to do more, and do it differently.
- Solution: Make sure all new IN arguments have defaults, or add an overloading.
- Ensure backward compatibility as you add parameters.
- What the heck do those parameter values mean?
- Use named notation to self-document subprogram calls and pass values more flexibly.
- Problem: What seems obvious at the moment of writing is far less clear months or years later.
- Solution: Use named notation to make everything clear.
- Use named notation to self-document subprogram calls and pass values more flexibly.
- Where'd that data come from?
- Functions should return data only through the RETURN clause.
- Problem: Jasper returns data in a very confusing manner.
- Solution: Return multiple values through a single, composite structure or with a procedure.
- Functions should return data only through the RETURN clause.
- Best Practices for Procedures and Functions
- Write tiny chunks of code.
- Limit execution section length to no more than 50 lines.
- Problem: Lengthy blobs of spaghetti code are unmanageable.
- Solution: Use step-wise refinement and local subprograms to make code transparent in purpose and design.
- There's more to tiny chunks than just local subprograms.
- Resources
- Limit execution section length to no more than 50 lines.
- Every program should be an island (of purpose).
- Minimize side effects and maximize reuse by creating programs with narrowly defined purposes.
- Problem: Delaware packs it all in and no one wants to use it.
- Solution: Write programs with very specific purposes and avoid hidden (a.k.a. global) dependencies.
- Minimize side effects and maximize reuse by creating programs with narrowly defined purposes.
- Gifts should always come tightly wrapped.
- Hide business rules and formulas inside functions.
- Problem: Jasper actually thinks a rule will never change!
- Solution: Wrap or hide all business rules and formulas inside functions.
- Hide business rules and formulas inside functions.
- One way in, one way out: multiple exits confuse me.
- Limit functions to a single RETURN statement in the execution section.
- Problem: Sunita tosses off "quick-and-dirty" code in a function lookup routine.
- Problem: Sure, the program worksbut only if you assume a perfect world.
- Solution: Don't allow multiple exit points from the function.
- Limit functions to a single RETURN statement in the execution section.
- Black or white programs don't know from NULL.
- Never return NULL from Boolean functions.
- Problem: Jasper gets really confused with a Boolean function returning a NULL.
- Solution: Ensure that a Boolean function returns only TRUE or FALSE.
- Never return NULL from Boolean functions.
- Best Practices for Packages
- Where there is one program, there will soon be two.
- Avoid schema-level programs; instead, group related code into packages.
- Problem: It seemed that there would be only one programnow there are many.
- Solution: Put in the dot from the start: package.subprogram.
- Avoid schema-level programs; instead, group related code into packages.
- "Easy to use code" is code that is usedand reused.
- Anticipate programmer needs and simplify call interfaces with overloading.
- Problem: Some of Oracle's supplied packages are harder to use than they should be.
- Solution: Create multiple programs with the same name (overloading) that anticipate user needs.
- Anticipate programmer needs and simplify call interfaces with overloading.
- Best Practices for Triggers
- Uncertainty in trigger execution is a most unsettling emotion.
- Consolidate "overlapping" DML triggers to control execution order, or use the FOLLOW syntax of Oracle Database 11g.
- Problem: Seemingly random trigger behavior is driving Jasper nuts.
- Solution: Consolidate "same event" triggers or use the FOLLOWS clause.
- Resources
- Consolidate "overlapping" DML triggers to control execution order, or use the FOLLOW syntax of Oracle Database 11g.
- "One-stop triggering" is so much easier to understand and maintain.
- Use Oracle Database 11g compound triggers to consolidate all related trigger logic on a table.
- Problem: Lizbeth has created a dozen triggers and a support package on a critical database table.
- Solution: Consolidate all logic into a compound trigger, and lose the package if it is present only for trigger implementation.
- Use Oracle Database 11g compound triggers to consolidate all related trigger logic on a table.
- Your application should not be able to perform a "Houdini" with business rules.
- Validate complex business rules with DML triggers.
- Problem: There's more than one way to make an excuse.
- Solution 1: Apply the business rule at the lowest level possible, to ensure that it cannot be avoided.
- Solution 2: Populate columns of derived values with triggers.
- Validate complex business rules with DML triggers.
- 9. My Code Runs Faster Than Your Code
- Best Practices for Finding Slow Code
- Take the guesswork out of optimization.
- Use trace facilities to gather raw data about program performance.
- PL/SQL Profiler (DBMS_PROFILER)
- PL/SQL Trace (DBMS_TRACE)
- PL/SQL Hierarchical Profiler (DBMS_HPROF)
- Application Data Profiler (DBMS_APPLICATION_INFO)
- Use trace facilities to gather raw data about program performance.
- There are so many ways to implement an algorithm; which is best?
- Build or find tools to calculate elapsed time.
- Problem: There are hundreds of ways to implement a requirement. How can Lizbeth find the fastest version?
- Solution: Use DBMS_UTILITY.GET_TIME and GET_CPU_TIME for very granular analysis.
- Resources
- Build or find tools to calculate elapsed time.
- Best Practices for High-Impact Tuning
- Let Oracle do most of the tuning for you.
- Make sure your code is being optimized when compiled.
- Who has time for querying (or inserting or deleting or updating) one row at a time?
- Use BULK COLLECT and FORALL to improve performance of multirow SQL operations in PL/SQL.
- Problem: It worked so quickly in SQL*Plus. Why is it so slow in PL/SQL?
- Solution: Sometimes you have to help PL/SQL integrate with SQL.
- Recommendations for BULK COLLECT
- Recommendations for FORALL.
- Use BULK COLLECT and FORALL to improve performance of multirow SQL operations in PL/SQL.
- If the SGA is so wonderful, why not emulate it?
- Cache static data in the fastest memory location possible.
- Problem: Jasper queries the same, unchanging data over and over and over again.
- Solution: If the normal SGA cache doesn't the trick, look for other ways to cache.
- Per-session cache in a PL/SQL package.
- Oracle Database 11g PL/SQL function result cache.
- Cache static data in the fastest memory location possible.
- When waiting is not an option...
- Use pipelined table functions to return data faster and to parallelize function execution.
- Problem: Users hate to wait.
- Solution: Design your function to return data while it is still running!
- And that's not all!
- Use pipelined table functions to return data faster and to parallelize function execution.
- Best Practices for Other Tuning
- Sometimes "safe programming" is a little too slow.
- Use NOCOPY with care to minimize overhead when collections and records are OUT or IN OUT parameters.
- Problem: Delaware wants to use collections as parameters, but they are causing a bottleneck.
- Solution: Turn off the default copying that comes with IN OUT arguments.
- Use NOCOPY with care to minimize overhead when collections and records are OUT or IN OUT parameters.
- PL/SQL loops should not resemble hamsters running in circles.
- Move static expressions outside of loops and SQL statements.
- Problem: Lizbeth lost her focus as she wrote her loop.
- Solution: Avoid executing anything inside a loop that doesn't change in that loop.
- Move static expressions outside of loops and SQL statements.
- Tailor-made datatypes are the best fit for your programs.
- Choose datatypes carefully to minimize implicit conversions of data.
- Problem: Oracle goes out of its way to make it easy for us to write PL/SQL programs.
- Solution: Avoid implicit conversions and choose your datatypes carefully.
- Choose datatypes carefully to minimize implicit conversions of data.
- A. Best Practices Quick Reference
- B. Resources for PL/SQL Developers
- Book Example Files
- Books and Other Content
- Oracle PL/SQL Books
- Other Helpful Books
- Online Content
- Free Software
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with OReilly
O'Reilly Media - inne książki
-
Nowość Promocja
Business decisions in any context—operational, tactical, or strategic—can have considerable consequences. Whether the outcome is positive and rewarding or negative and damaging to the business, its employees, and stakeholders is unknown when action is approved. These decisions are usually made under the proverbial cloud of uncertainty.With this pra- ePub + Mobi 194 pkt
(186,15 zł najniższa cena z 30 dni)
194.65 zł
228.99 zł (-15%) -
Nowość Promocja
If you're a developer looking to build a distributed, resilient, scalable, high-performance application, you may be evaluating distributed SQL and NoSQL solutions. Perhaps you're considering the Aerospike database.This practical book shows developers, architects, and engineers how to get the highly scalable and extremely low-latency Aerospike datab- ePub + Mobi 254 pkt
Aerospike: Up and Running. Developing on a Modern Operational Database for Globally Distributed Apps
(228,65 zł najniższa cena z 30 dni)
254.15 zł
299.00 zł (-15%) -
Nowość Promocja
Reinforcement learning (RL) has led to several breakthroughs in AI. The use of the Q-learning (DQL) algorithm alone has helped people develop agents that play arcade games and board games at a superhuman level. More recently, RL, DQL, and similar methods have gained popularity in publications related to financial research.This book is among the fir- ePub + Mobi 228 pkt
(220,15 zł najniższa cena z 30 dni)
228.65 zł
269.00 zł (-15%) -
Nowość Promocja
Learn how to use Go's strengths to develop services that are scalable and resilient even in an unpredictable environment. With this book's expanded second edition, Go developers will explore the composition and construction of cloud native applications, from lower-level Go features and mid-level patterns to high-level architectural considerations.E- ePub + Mobi 228 pkt
(220,15 zł najniższa cena z 30 dni)
228.65 zł
269.00 zł (-15%) -
Promocja
To ensure that applications are reliable and always available, more businesses today are moving applications to AWS. But many companies still struggle to design and build these cloud applications effectively, thinking that because the cloud is resilient, their applications will be too. With this practical guide, software, DevOps, and cloud engineer- ePub + Mobi 228 pkt
(220,15 zł najniższa cena z 30 dni)
228.65 zł
269.00 zł (-15%) -
Promocja
Performance tuning is an experimental science, but that doesn't mean engineers should resort to guesswork and folklore to get the job done. Yet that's often the case. With this practical book, intermediate to advanced Java technologists working with complex platforms will learn how to tune Java cloud applications for performance using a quantitativ- ePub + Mobi 228 pkt
(220,15 zł najniższa cena z 30 dni)
228.65 zł
269.00 zł (-15%) -
Promocja
Today, investment in financial technology and digital transformation is reshaping the financial landscape and generating many opportunities. Too often, however, engineers and professionals in financial institutions lack a practical and comprehensive understanding of the concepts, problems, techniques, and technologies necessary to build a modern, r- ePub + Mobi 228 pkt
(220,15 zł najniższa cena z 30 dni)
228.65 zł
269.00 zł (-15%) -
Promocja
Until recently, infrastructure was the backbone of organizations operating software they developed in-house. But now that cloud vendors run the computers, companies can finally bring the benefits of agile custom-centricity to their own developers. Adding product management to infrastructure organizations is now all the rage.But how's that possible- ePub + Mobi 194 pkt
(186,15 zł najniższa cena z 30 dni)
194.65 zł
228.99 zł (-15%) -
Promocja
Cloud services and SaaS software permeate every company's IT landscape, requiring a shift from manually provisioned services to a more structured approach, with codification at its core. Terraform provides tools to manage the lifecycle of your IT landscape across thousands of different cloud providers and SaaS platforms.By defining your infrastruct- ePub + Mobi 211 pkt
(194,65 zł najniższa cena z 30 dni)
211.65 zł
249.00 zł (-15%) -
Promocja
Using machine learning for products, services, and critical business processes is quite different from using ML in an academic or research setting—especially for recent ML graduates and those moving from research to a commercial environment. Whether you currently work to create products and services that use ML, or would like to in the future, this- ePub + Mobi 254 pkt
(245,65 zł najniższa cena z 30 dni)
254.15 zł
299.00 zł (-15%)
Dzięki opcji "Druk na żądanie" do sprzedaży wracają tytuły Grupy Helion, które cieszyły sie dużym zainteresowaniem, a których nakład został wyprzedany.
Dla naszych Czytelników wydrukowaliśmy dodatkową pulę egzemplarzy w technice druku cyfrowego.
Co powinieneś wiedzieć o usłudze "Druk na żądanie":
- usługa obejmuje tylko widoczną poniżej listę tytułów, którą na bieżąco aktualizujemy;
- cena książki może być wyższa od początkowej ceny detalicznej, co jest spowodowane kosztami druku cyfrowego (wyższymi niż koszty tradycyjnego druku offsetowego). Obowiązująca cena jest zawsze podawana na stronie WWW książki;
- zawartość książki wraz z dodatkami (płyta CD, DVD) odpowiada jej pierwotnemu wydaniu i jest w pełni komplementarna;
- usługa nie obejmuje książek w kolorze.
Masz pytanie o konkretny tytuł? Napisz do nas: sklep@ebookpoint.pl
Książka drukowana
Oceny i opinie klientów: Oracle PL/SQL Best Practices. 2nd Edition Steven Feuerstein (0) Weryfikacja opinii następuje na podstawie historii zamowień na koncie Użytkownika umiejszczającego opinię.