Software Architecture



Download 18,55 Mb.
bet60/169
Sana12.07.2022
Hajmi18,55 Mb.
#781543
1   ...   56   57   58   59   60   61   62   63   ...   169
Bog'liq
Software-Architecture-The-Hard-Parts

CREATE

VIEW

[
payment
].[
v_customer_contract
]


AS

SELECT

customer
.


customer_id
,

customer
.


customer_name
,

contract
.


contract_start_date
,

contract
.


contract_duration
,

billing
.


billing_date
,

billing
.


billing_amount

FROM

payment
.
contract

AS

contract

INNER

JOIN

customer
.
customer

AS

customer


ON

(

contract
.


customer_id

=

customer


.
customer_id

)

INNER



JOIN

payment
.
billing

AS

billing


ON

(

contract
.


contract_id

=

billing


.
contract_id

)

WHERE



contract
.
auto_renewal

=

0


Notice in the updated view shown in Example 6-2 that the join between customer and payment tables is removed, as is the column for the customer name (customer.customer_name).


Example 6-2. Database view to get open tickets in ticket domain for a given customer
CREATE

VIEW

[
payment
].[
v_customer_contract
]


AS

SELECT

billing
.


customer_id
,

contract
.


contract_start_date
,

contract
.


contract_duration
,

billing
.


billing_date
,

billing
.


billing_amount

FROM

payment
.
contract

AS

contract

INNER

JOIN

payment
.
billing

AS

billing


ON

(

contract
.


contract_id

=

billing


.
contract_id

)

WHERE



contract
.
auto_renewal

=

0


The bounded context rules for data domains apply just the same as individual tables—a service cannot talk to multiple data domains. Therefore, by removing this table from the view, the Payment service must now call the Customer service to get the customer name that it originally had from the view.


Once architects and database teams understand the concept of a data domain, they can apply the five-step process for decomposing a monolithic database. Those five steps are outlined in the following sections.

Step 1: Analyze Database and Create Data Domains


As illustrated in Figure 6-20, all services have access to all data in the database. This practice, known as the shared database integration style described by Gregor Hohpe and Bobby Woolf in their book Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions (Addison-Wesley), creates a tight coupling between data and the services accessing that data. As discussed in “Data Decomposition Drivers”, this tight coupling in the database makes change management very difficult.

Figure 6-20. Multiple services use the same database, accessing all the tables necessary for read or write purposes

The first step in breaking apart a database is to identify specific domain groupings within the database. For example, as shown in Table 6-5, related tables are grouped together to help identify possible data domains.

Download 18,55 Mb.

Do'stlaringiz bilan baham:
1   ...   56   57   58   59   60   61   62   63   ...   169




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish