7.2 Transaction Requirement PatternBasic DetailsRelated patterns: Data dịch - 7.2 Transaction Requirement PatternBasic DetailsRelated patterns: Data Việt làm thế nào để nói

7.2 Transaction Requirement Pattern

7.2 Transaction Requirement Pattern
Basic Details
Related patterns: Data type, data structure
Anticipated frequency: Usually fewer than 10 requirements; more if one or more fundamental transaction type has subtypes that have their own requirements
Pattern classifications: Affects database: Yes
Applicability
Use the transaction requirement pattern to define a type of event in the life of a living entity, and/or a function for entering such a transaction.
Discussion
Transactions are the lifeblood of any commercial system: they're usually where the money comes from. So handling them well is critical to a system's success. A system might have only a small number of types of transaction, and it might take surprisingly few requirements to specify them; even so, it's important to get these few right. Examples of transactions: a purchase from a Web retail site, renewing a magazine subscription, making a successful bid at an auction.
A transaction is a representation of something that happens at a point in time. For most kinds of transactions, this is clear and straightforward. A bank customer requests a cash withdrawal, which is deemed to take place the moment the cash is handed over. The transaction's details are fixed at the moment it is deemed to happen. This is an important rule: systems that break it are asking for trouble sooner or later. After the bank customer has walked off with their cash, the bank can't play around with the amount withdrawn or pretend it was paid from someone else's account: changing any of the transaction's details would be incorrect. If a genuine mistake was made (such as the wrong customer's account being debited), the only way to fix it is by means of one or more further transactions. Who'd trust a bank that did otherwise? (The purpose of the first pervasive requirement in the "Extra Requirements" section is to enforce this rule.)
A simple after-the-fact record that some event occurred (for example, an entry in a log or in a change history of a living entity) is not a transaction for the purposes of this requirement pattern; it is categorized as chronicle information (as defined in the introduction to this chapter).
Content
A requirement for a transaction needs to define at least the following:
1. Transaction name State what it's called.
2. An explanation of the transaction Describe what it is and what it's for.
3. The information the transaction contains Give this in the form of a data structure. This can include details about how particular values are entered, validated, and displayed. (See this part of the living entity requirement pattern, earlier in this chapter, for a little further explanation.)
4. How a transaction is uniquely identified This enables us to distinguish two transactions whose details might otherwise be identical (or at least hard to tell apart). Computer systems are sufficiently fast that to differentiate on the basis of time, you need to get down to very small gradations of time-certainly much less than a second, and possibly finer than the accuracy of the machine's clock). The safest way is to allocate a transaction ID to each transaction-even if people rarely need to refer to them.
5. Owner living entity details This identifies the entity on whose behalf the transaction is being performed: the customer making a purchase, the bank account from which cash is being debited. (Assume every type of transaction belongs to a living entity, because you're unlikely to encounter one that doesn't.) A type of transaction could conceivably have more than one owner-but they're rare.
6. When the transaction is deemed to happen State this in terms of steps in the life of the transaction. It could be when the transaction's entered, when it's accepted (in a sense meaningful to the system-such as when a shop has checked that it has in stock all the products in an order), or when it's approved (say, manually by a person). This is the moment from which no changes are allowed. If the "happen time" isn't stated in the requirement, the transaction can be assumed to happen immediately when it is entered. Even if a transaction has separate steps for acceptance, approval, or other actions, its entry time could still be regarded as the time it happened.
7. Transaction longevity (Optional.) How long should transactions of this sort hang around? That is, after how long does it become eligible for deletion? This effectively incorporates the intent of a longevity requirement (as per the data longevity requirement pattern in Chapter 6), which is good practice to consider for each type of transaction, even if you decide not to state it in the requirement explicitly.
Template(s)
Summary Definition
«Transaction name» There shall be a function to create a «Transaction name» transaction for a «Owner living entity name». Each «Transaction name» shall contain the following information:
• «Data item 1 description».
• …
A «Transaction name» is «Transaction explanation». Each «Transaction name» is uniquely identified by «Transaction identifier(s)».
A «Transaction name» is deemed to have happened «Transaction happen time description». [«Transaction longevity statement».]

-- Example(s)
Summary Definition
Account adjustment It shall be possible to post an adjustment (debit or credit) to the account of a selected customer. An adjustment shall contain the following information:
• Customer ID
• Adjustment amount
• Adjustment reason-free-form text intended to explain why the adjustment was raised
A unique ID shall automatically be allocated to each account adjustment.
It is expected that authority to use this will be restricted to very few employees.
Extra Requirements
See also the "Extra Requirements" in the introduction to this chapter.
If you're going to specify performance requirements for anything in your system, it's most likely to be for the processing of transactions-because they're usually the highest volume, most visible, most financially significant part of a commercial system. It's illuminating to try calculating daily or monthly volumes for each type of transaction-even if only in a cursory manner, and even if it only serves to point out that you have little idea how busy your system's likely to be. Refer to all the requirement patterns in Chapter 9, "Performance Requirement Patterns," for types of performance for which you could consider specifying requirements.
Here's a pervasive requirement to enforce the rule stated previously:
Summary Definition
Do not modify transactions No database row that acts as a transaction with actual or potential financial consequences shall ever be modified after the transaction was originally recorded such that its financial effect is or might be altered. In particular, errors in financial transactions shall never be rectified by modifying the transactions themselves. Instead, additional transactions shall be the only way to make the necessary adjustments.
For the purposes of this requirement, a financial transaction is any row in any database table that causes some financial value (such as a customer's account balance) to change.
The motivation for this requirement is to force a clear history of financial-related activity to be maintained. This is impossible if values in transactions are overwritten, because it results in both an inability to see what happened and quite possibly in errors that are hard to make sense of and to rectify.
Extra Requirements
See also the "Extra Requirements" in the introduction to this chapter.
If you're going to specify performance requirements for anything in your system, it's most likely to be for the processing of transactions-because they're usually the highest volume, most visible, most financially significant part of a commercial system. It's illuminating to try calculating daily or monthly volumes for each type of transaction-even if only in a cursory manner, and even if it only serves to point out that you have little idea how busy your system's likely to be. Refer to all the requirement patterns in Chapter 9, "Performance Requirement Patterns," for types of performance for which you could consider specifying requirements.
Here's a pervasive requirement to enforce the rule stated previously:
Summary Definition
Do not modify transactions No database row that acts as a transaction with actual or potential financial consequences shall ever be modified after the transaction was originally recorded such that its financial effect is or might be altered. In particular, errors in financial transactions shall never be rectified by modifying the transactions themselves. Instead, additional transactions shall be the only way to make the necessary adjustments.
For the purposes of this requirement, a financial transaction is any row in any database table that causes some financial value (such as a customer's account balance) to change.
The motivation for this requirement is to force a clear history of financial-related activity to be maintained. This is impossible if values in transactions are overwritten, because it results in both an inability to see what happened and quite possibly in errors that are hard to make sense of and to rectify.
Considerations for Development
Always adhere to the rule of never modifying any transaction after the fact. And take care processing transactions, because they're important.
Considerations for Testing
Testing that transactions are handled well is perhaps the most important testing of all, because the functions to process transactions tend to be the most heavily used and are highly visible. So testers should prepare a large number of test cases that cover all eventualities. Identify all the relevant permutations that a complex transaction can have, including states, transitions between states, and error conditions. Then build test cases for them all.
Pay special attention to the statement in a transaction requirement about when a transaction is deemed to happen. Test that a t
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
7.2 giao dịch yêu cầu mẫuThông tin cơ bảnLiên quan đến mẫu: kiểu dữ liệu, cấu trúc dữ liệuDự đoán tần số: yêu cầu thường ít hơn 10; thêm nếu một hoặc nhiều loại cơ bản giao dịch đã phân nhóm có yêu cầu riêng của họMô hình phân loại: ảnh hưởng đến cơ sở dữ liệu: cóỨng dụngSử dụng các mô hình yêu cầu giao dịch để xác định một loại sự kiện trong cuộc đời của một thực thể sống, và/hoặc một chức năng để nhập một giao dịch.Thảo luậnGiao dịch là huyết mạch của bất kỳ hệ thống thương mại: họ đang thường tiền đến từ đâu. Để xử lý chúng tốt là quan trọng đối với sự thành công của hệ thống. Một hệ thống có thể có chỉ một số ít các loại giao dịch, và nó có thể mất đáng ngạc nhiên số yêu cầu để xác định chúng; mặc dù vậy, nó là quan trọng để có được phải vài. Ví dụ về giao dịch: mua hàng từ một trang Web bán lẻ, đổi mới một thuê bao tạp chí, làm cho một giá thầu thành công tại một phiên đấu giá.Một giao dịch là một đại diện của một cái gì đó sẽ xảy ra tại một thời điểm trong thời gian. Đối với hầu hết các loại giao dịch, điều này là rõ ràng và đơn giản. Yêu cầu một khách hàng ngân hàng rút tiền mặt, mà được coi là diễn ra thời điểm mặt bàn giao. Chi tiết của giao dịch được cố định ở thời điểm này nó được coi là để xảy ra. Đây là một nguyên tắc quan trọng: Hệ thống mà phá vỡ nó hỏi cho rắc rối sớm hay muộn. Sau khi khách hàng ngân hàng đã đi bộ với tiền mặt của họ, các ngân hàng không thể chơi xung quanh với số tiền rút hoặc giả vờ nó được trả tiền từ tài khoản của người khác: thay đổi bất kỳ chi tiết của giao dịch sẽ là không chính xác. Nếu một sai lầm chính hãng đã được thực hiện (chẳng hạn như tài khoản khách hàng sai đang được ghi nợ), cách duy nhất để sửa chữa nó là bằng phương tiện của một hoặc nhiều giao dịch hơn nữa. Những người tin tưởng một ngân hàng đã làm nếu không? (Mục đích phổ biến yêu cầu đầu tiên trong phần "Yêu cầu phụ" là để thi hành các quy tắc này.)Sơ sau khi thực tế đơn giản rằng một số sự kiện xảy ra (ví dụ, một mục nhập Nhật ký một hoặc trong một lịch sử thay đổi của một thực thể sống) không phải là một giao dịch cho các mục đích của mô hình này yêu cầu; nó được phân loại là biên niên sử thông tin (như được định nghĩa trong phần giới thiệu đến chương này).Nội dungMột yêu cầu về một giao dịch cần phải xác định ít những điều sau đây:1. giao dịch tên nêu rõ những gì nó được gọi là.2. giải thích về các giao dịch mô tả nó là gì và những gì nó là dành cho.3. thông tin giao dịch có cung cấp cho điều này trong các hình thức của một cấu trúc dữ liệu. Điều này có thể bao gồm thông tin chi tiết về làm thế nào cụ thể giá trị được nhập, xác nhận, và hiển thị. (Xem phần này của cuộc sống thực thể yêu cầu mẫu, trước đó trong chương này, cho một chút biết nguyên nhân.)4. làm thế nào một giao dịch duy nhất xác định điều này cho phép chúng tôi phân biệt hai giao dịch chi tiết mà có thể là giống hệt nhau (hoặc ít khó có thể nói ngoài). Máy tính hệ thống có đủ nhanh rằng để phân biệt trên cơ sở thời gian, bạn cần để có được để gradations rất nhỏ của thời gian chắc chắn nhiều hơn một lần thứ hai, và có thể tốt hơn so với sự chính xác của đồng hồ của máy). Cách an toàn nhất là phân bổ một ID giao dịch cho mỗi giao dịch, ngay cả nếu mọi người hiếm khi cần phải đề cập đến chúng.5. chủ sở hữu sống thực thể chi tiết này xác định các thực thể mà thay mặt cho các giao dịch đang được thực hiện: khách hàng quyết định mua hàng, tài khoản ngân hàng từ tiền mặt mà đang được ghi nợ. (Giả định tất cả các loại giao dịch thuộc về một thực thể sống, bởi vì bạn đang dường như không gặp phải không.) Một loại giao dịch có thể hình dung có nhiều hơn một chủ sở hữu- nhưng họ đang hiếm.6. khi giao dịch được coi là nhà nước này về bước trong cuộc đời của các giao dịch xảy ra. Nó có thể là khi các giao dịch đã nhập, khi nó được chấp nhận (trong một ý nghĩa có ý nghĩa để hệ thống-chẳng hạn như khi một cửa hàng đã kiểm tra rằng nó có trong kho tất cả các sản phẩm trong một đơn đặt hàng) hoặc khi nó đã chấp thuận (nói, bằng tay bởi một người). Đây là thời điểm mà từ đó không có thay đổi được phép. Nếu các "xảy ra thời gian" không phải là đã nêu trong các yêu cầu, các giao dịch có thể được giả định xảy ra ngay lập tức khi nó được nhập vào. Ngay cả khi một giao dịch đã bước riêng biệt để chấp nhận, phê duyệt hoặc hành động khác, thời gian mục nhập của mình vẫn có thể được coi là thời gian nó đã xảy ra.7. giao dịch tuổi thọ (tùy chọn). Bao lâu nên giao dịch kiểu này treo xung quanh? Có nghĩa là, sau khi làm thế nào lâu để nó trở thành hội đủ điều kiện để xóa? Điều này có hiệu quả kết hợp ý định của một yêu cầu tuổi thọ (theo dữ liệu tuổi thọ yêu cầu mẫu trong chương 6), mà là các thực hành tốt để xem xét cho mỗi loại giao dịch, ngay cả khi bạn quyết định không nhà nước nó trong yêu cầu một cách rõ ràng.Template(s) Tóm tắt định nghĩa «Tên giao dịch» có là một chức năng để tạo ra một giao dịch «Tên giao dịch» cho một «chủ sống tổ chức tên». Mỗi «tên giao dịch» phải có các thông tin sau:• «Dữ liệu mô tả mục 1».• … «Tên giao dịch» là «Giao dịch giải thích». Mỗi «tên giao dịch» duy nhất được xác định bởi «Của giao dịch identifier(s)».«Tên giao dịch» được coi là để xảy ra «giao dịch xảy ra thời gian mô tả». [«Giao dịch tuổi thọ tuyên bố».]--Example(s) Tóm tắt định nghĩa Điều chỉnh tài khoản, nó sẽ có thể đăng một điều chỉnh (ghi nợ hoặc tín dụng) vào tài khoản của một khách hàng đã chọn. Một điều chỉnh sẽ chứa thông tin sau:• ID khách hàng • Điều chỉnh số tiền • Điều chỉnh lý do-miễn phí-hình thức văn bản nhằm mục đích giải thích tại sao việc điều chỉnh đã được nâng lênMột ID duy nhất tự động sẽ được phân bổ cho mỗi điều chỉnh tài khoản.Chúng tôi hy vọng rằng thẩm quyền để sử dụng điều này sẽ được giới hạn cho rất ít nhân viên.Yêu cầu phụXem thêm các yêu cầu phụ"" trong phần giới thiệu đến chương này.Nếu bạn đang đi để xác định hiệu suất yêu cầu cho bất cứ điều gì trong hệ thống của bạn, nó là nhiều khả năng để xử lý giao dịch-bởi vì họ đang thường khối lượng cao nhất, dễ thấy nhất, phần quan trọng nhất về tài chính của một hệ thống thương mại. Nó là chiếu sáng để thử tính toán khối lượng hàng ngày hoặc hàng tháng cho mỗi loại giao dịch, thậm chí nếu chỉ trong một cách lướt qua, và ngay cả khi nó chỉ phục vụ để chỉ ra rằng bạn có ý tưởng nhỏ như thế nào bận rộn của hệ thống có khả năng để. Xem tất cả các mẫu yêu cầu trong chương 9, "Mô hình yêu cầu hiệu suất," cho loại hiệu suất mà bạn có thể xem xét việc xác định yêu cầu.Dưới đây là một yêu cầu phổ biến để thi hành các quy tắc đã nêu trước đó: Tóm tắt định nghĩa Không sửa đổi các giao dịch không có hàng cơ sở dữ liệu hoạt động như một giao dịch với những hậu quả tài chính thực tế hoặc tiềm năng bao giờ sẽ được sửa đổi sau khi giao dịch ban đầu được ghi nhận như vậy mà hiệu quả tài chính của nó là hoặc có thể được thay đổi. Đặc biệt, sai sót trong giao dịch tài chính không bao giờ sẽ được sửa chữa bằng cách sửa đổi các giao dịch của mình. Thay vào đó, các giao dịch sẽ là cách duy nhất để thực hiện các điều chỉnh cần thiết.Cho các mục đích của yêu cầu này, một giao dịch tài chính là bất kỳ hàng trong bất kỳ bảng cơ sở dữ liệu gây ra một số giá trị tài chính (chẳng hạn như các số dư tài khoản của khách hàng) để thay đổi.Các động lực cho yêu cầu này là để buộc một xóa lịch sử của tài chính liên quan đến hoạt động phải được duy trì. Điều này là không thể nếu giá trị trong giao dịch được ghi đè, bởi vì nó kết quả trong cả hai không có khả năng để xem những gì đã xảy ra và khá có thể lỗi đó là khó khăn để làm cho cảm giác và để khắc phục.Yêu cầu phụXem thêm các yêu cầu phụ"" trong phần giới thiệu đến chương này.Nếu bạn đang đi để xác định hiệu suất yêu cầu cho bất cứ điều gì trong hệ thống của bạn, nó là nhiều khả năng để xử lý giao dịch-bởi vì họ đang thường khối lượng cao nhất, dễ thấy nhất, phần quan trọng nhất về tài chính của một hệ thống thương mại. Nó là chiếu sáng để thử tính toán khối lượng hàng ngày hoặc hàng tháng cho mỗi loại giao dịch, thậm chí nếu chỉ trong một cách lướt qua, và ngay cả khi nó chỉ phục vụ để chỉ ra rằng bạn có ý tưởng nhỏ như thế nào bận rộn của hệ thống có khả năng để. Xem tất cả các mẫu yêu cầu trong chương 9, "Mô hình yêu cầu hiệu suất," cho loại hiệu suất mà bạn có thể xem xét việc xác định yêu cầu.Dưới đây là một yêu cầu phổ biến để thi hành các quy tắc đã nêu trước đó: Tóm tắt định nghĩa Không sửa đổi các giao dịch không có hàng cơ sở dữ liệu hoạt động như một giao dịch với những hậu quả tài chính thực tế hoặc tiềm năng bao giờ sẽ được sửa đổi sau khi giao dịch ban đầu được ghi nhận như vậy mà hiệu quả tài chính của nó là hoặc có thể được thay đổi. Đặc biệt, sai sót trong giao dịch tài chính không bao giờ sẽ được sửa chữa bằng cách sửa đổi các giao dịch của mình. Thay vào đó, các giao dịch sẽ là cách duy nhất để thực hiện các điều chỉnh cần thiết.Cho các mục đích của yêu cầu này, một giao dịch tài chính là bất kỳ hàng trong bất kỳ bảng cơ sở dữ liệu gây ra một số giá trị tài chính (chẳng hạn như các số dư tài khoản của khách hàng) để thay đổi.Các động lực cho yêu cầu này là để buộc một xóa lịch sử của tài chính liên quan đến hoạt động phải được duy trì. Điều này là không thể nếu giá trị trong giao dịch được ghi đè, bởi vì nó kết quả trong cả hai không có khả năng để xem những gì đã xảy ra và khá có thể lỗi đó là khó khăn để làm cho cảm giác và để khắc phục.Xem xét cho phát triểnLuôn luôn tuân theo các quy tắc của không bao giờ sửa đổi bất kỳ giao dịch thực tế. Và chăm sóc xử lý giao dịch, bởi vì họ là quan trọng.Cân nhắc để thử nghiệmThử nghiệm giao dịch được xử lý tốt là có lẽ quan trọng nhất thử nghiệm của tất cả, bởi vì các chức năng để xử lý giao dịch có xu hướng là nhiều nhất rất nhiều được sử dụng và rất có thể nhìn thấy. Do đó, thử nghiệm nên chuẩn bị một số lớn các trường hợp thử nghiệm bao gồm tất cả các eventualities. Xác định tất cả các hoán vị có liên quan một giao dịch phức tạp có thể có, bao gồm cả kỳ, quá trình chuyển đổi giữa các tiểu bang, và điều kiện lỗi. Sau đó xây dựng trường hợp thử nghiệm cho tất cả.Phải quan tâm đặc biệt đến các tuyên bố trong một yêu cầu giao dịch về khi một giao dịch được coi là để xảy ra. Kiểm tra rằng một t
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
7.2 Transaction Requirement Pattern
Basic Details
Related patterns: Data type, data structure
Anticipated frequency: Usually fewer than 10 requirements; more if one or more fundamental transaction type has subtypes that have their own requirements
Pattern classifications: Affects database: Yes
Applicability
Use the transaction requirement pattern to define a type of event in the life of a living entity, and/or a function for entering such a transaction.
Discussion
Transactions are the lifeblood of any commercial system: they're usually where the money comes from. So handling them well is critical to a system's success. A system might have only a small number of types of transaction, and it might take surprisingly few requirements to specify them; even so, it's important to get these few right. Examples of transactions: a purchase from a Web retail site, renewing a magazine subscription, making a successful bid at an auction.
A transaction is a representation of something that happens at a point in time. For most kinds of transactions, this is clear and straightforward. A bank customer requests a cash withdrawal, which is deemed to take place the moment the cash is handed over. The transaction's details are fixed at the moment it is deemed to happen. This is an important rule: systems that break it are asking for trouble sooner or later. After the bank customer has walked off with their cash, the bank can't play around with the amount withdrawn or pretend it was paid from someone else's account: changing any of the transaction's details would be incorrect. If a genuine mistake was made (such as the wrong customer's account being debited), the only way to fix it is by means of one or more further transactions. Who'd trust a bank that did otherwise? (The purpose of the first pervasive requirement in the "Extra Requirements" section is to enforce this rule.)
A simple after-the-fact record that some event occurred (for example, an entry in a log or in a change history of a living entity) is not a transaction for the purposes of this requirement pattern; it is categorized as chronicle information (as defined in the introduction to this chapter).
Content
A requirement for a transaction needs to define at least the following:
1. Transaction name State what it's called.
2. An explanation of the transaction Describe what it is and what it's for.
3. The information the transaction contains Give this in the form of a data structure. This can include details about how particular values are entered, validated, and displayed. (See this part of the living entity requirement pattern, earlier in this chapter, for a little further explanation.)
4. How a transaction is uniquely identified This enables us to distinguish two transactions whose details might otherwise be identical (or at least hard to tell apart). Computer systems are sufficiently fast that to differentiate on the basis of time, you need to get down to very small gradations of time-certainly much less than a second, and possibly finer than the accuracy of the machine's clock). The safest way is to allocate a transaction ID to each transaction-even if people rarely need to refer to them.
5. Owner living entity details This identifies the entity on whose behalf the transaction is being performed: the customer making a purchase, the bank account from which cash is being debited. (Assume every type of transaction belongs to a living entity, because you're unlikely to encounter one that doesn't.) A type of transaction could conceivably have more than one owner-but they're rare.
6. When the transaction is deemed to happen State this in terms of steps in the life of the transaction. It could be when the transaction's entered, when it's accepted (in a sense meaningful to the system-such as when a shop has checked that it has in stock all the products in an order), or when it's approved (say, manually by a person). This is the moment from which no changes are allowed. If the "happen time" isn't stated in the requirement, the transaction can be assumed to happen immediately when it is entered. Even if a transaction has separate steps for acceptance, approval, or other actions, its entry time could still be regarded as the time it happened.
7. Transaction longevity (Optional.) How long should transactions of this sort hang around? That is, after how long does it become eligible for deletion? This effectively incorporates the intent of a longevity requirement (as per the data longevity requirement pattern in Chapter 6), which is good practice to consider for each type of transaction, even if you decide not to state it in the requirement explicitly.
Template(s)
Summary Definition
«Transaction name» There shall be a function to create a «Transaction name» transaction for a «Owner living entity name». Each «Transaction name» shall contain the following information:
• «Data item 1 description».
• …
A «Transaction name» is «Transaction explanation». Each «Transaction name» is uniquely identified by «Transaction identifier(s)».
A «Transaction name» is deemed to have happened «Transaction happen time description». [«Transaction longevity statement».]

-- Example(s)
Summary Definition
Account adjustment It shall be possible to post an adjustment (debit or credit) to the account of a selected customer. An adjustment shall contain the following information:
• Customer ID
• Adjustment amount
• Adjustment reason-free-form text intended to explain why the adjustment was raised
A unique ID shall automatically be allocated to each account adjustment.
It is expected that authority to use this will be restricted to very few employees.
Extra Requirements
See also the "Extra Requirements" in the introduction to this chapter.
If you're going to specify performance requirements for anything in your system, it's most likely to be for the processing of transactions-because they're usually the highest volume, most visible, most financially significant part of a commercial system. It's illuminating to try calculating daily or monthly volumes for each type of transaction-even if only in a cursory manner, and even if it only serves to point out that you have little idea how busy your system's likely to be. Refer to all the requirement patterns in Chapter 9, "Performance Requirement Patterns," for types of performance for which you could consider specifying requirements.
Here's a pervasive requirement to enforce the rule stated previously:
Summary Definition
Do not modify transactions No database row that acts as a transaction with actual or potential financial consequences shall ever be modified after the transaction was originally recorded such that its financial effect is or might be altered. In particular, errors in financial transactions shall never be rectified by modifying the transactions themselves. Instead, additional transactions shall be the only way to make the necessary adjustments.
For the purposes of this requirement, a financial transaction is any row in any database table that causes some financial value (such as a customer's account balance) to change.
The motivation for this requirement is to force a clear history of financial-related activity to be maintained. This is impossible if values in transactions are overwritten, because it results in both an inability to see what happened and quite possibly in errors that are hard to make sense of and to rectify.
Extra Requirements
See also the "Extra Requirements" in the introduction to this chapter.
If you're going to specify performance requirements for anything in your system, it's most likely to be for the processing of transactions-because they're usually the highest volume, most visible, most financially significant part of a commercial system. It's illuminating to try calculating daily or monthly volumes for each type of transaction-even if only in a cursory manner, and even if it only serves to point out that you have little idea how busy your system's likely to be. Refer to all the requirement patterns in Chapter 9, "Performance Requirement Patterns," for types of performance for which you could consider specifying requirements.
Here's a pervasive requirement to enforce the rule stated previously:
Summary Definition
Do not modify transactions No database row that acts as a transaction with actual or potential financial consequences shall ever be modified after the transaction was originally recorded such that its financial effect is or might be altered. In particular, errors in financial transactions shall never be rectified by modifying the transactions themselves. Instead, additional transactions shall be the only way to make the necessary adjustments.
For the purposes of this requirement, a financial transaction is any row in any database table that causes some financial value (such as a customer's account balance) to change.
The motivation for this requirement is to force a clear history of financial-related activity to be maintained. This is impossible if values in transactions are overwritten, because it results in both an inability to see what happened and quite possibly in errors that are hard to make sense of and to rectify.
Considerations for Development
Always adhere to the rule of never modifying any transaction after the fact. And take care processing transactions, because they're important.
Considerations for Testing
Testing that transactions are handled well is perhaps the most important testing of all, because the functions to process transactions tend to be the most heavily used and are highly visible. So testers should prepare a large number of test cases that cover all eventualities. Identify all the relevant permutations that a complex transaction can have, including states, transitions between states, and error conditions. Then build test cases for them all.
Pay special attention to the statement in a transaction requirement about when a transaction is deemed to happen. Test that a t
đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: