Jak udokumentować bazę danych
-
Upload
3camp -
Category
Technology
-
view
2.327 -
download
0
Transcript of Jak udokumentować bazę danych
![Page 1: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/1.jpg)
Jak udokumentować bazę danych
Piotr Kononow15 marzec 2016
![Page 2: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/2.jpg)
Agenda
I. Po co dokumentowaćII. Czym jest dokumentacja bazy danychIII. Jak dokumentować
![Page 3: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/3.jpg)
I. PO CODOKUMENTOWAĆ
![Page 4: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/4.jpg)
Potrzeba analizy danych rośnie
• Wyszukiwania w Google
![Page 5: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/5.jpg)
Niejasne
• MTL_SYSTEM_ITEMS_B• tP• BEN_PRTT_RMT_RQST_CTFN_PRVDD• RSRCSECX• ATTRIBUTE_5
![Page 6: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/6.jpg)
Skomplikowane
![Page 7: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/7.jpg)
Duże
Tabel i widoków:• Przykładowa aplikacja: 3 000• TETA: 9 000• Oracle e-Business Suite: 55 000• SAP: 130
000
![Page 8: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/8.jpg)
PA_ADW_R_ACT_CMT_B_V.TXN_ADW_NOTIFY_FLAG
![Page 9: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/9.jpg)
![Page 10: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/10.jpg)
W jakich sytuacjach to pomocne?
• Tworzenie oprogramowania• Hurtownie danych, BI, …• Wdrożenia ERP, CRM, billing…• Integracja• Rozwój i utrzymanie• Migracja do nowego systemu
![Page 11: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/11.jpg)
II. CZYM JESTDOKUMENTACJA BAZY DANYCH
![Page 12: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/12.jpg)
1. Słownik danych (data dictionary)
Table: employeeTable holds past, current and future company employees.
Column Data type DescriptionBusinessEntityID int Primary key for Employee records. Foreign key
to BusinessEntity.BusinessEntityID.NationalIDNumber nvarchar(15) Unique national identification number such as
a social security number.LoginID nvarchar(256) Network login.OrganizationNode hierarchyid Where the employee is located in corporate
hierarchy.OrganizationLevel smallint The depth of the employee in the corporate
hierarchy.JobTitle nvarchar(50) Work title such as Buyer or Sales
Representative.
![Page 13: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/13.jpg)
1. Słownik danych – stanyEmployee row can be in following statuses based on dates:• Future - start_date > today or start_date null• Current - start_date <= today and (end_date > today or null)• Past – end_date < today
![Page 14: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/14.jpg)
1. Słownik danych – lista wartości
Column DescriptionMaritalStatus M = Married, S = SingleCurrentFlag 0 = Inactive, 1 = Active
![Page 15: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/15.jpg)
1. Słownik danych – APITo modify and fetch data use this:• employee_get – returns specified employee row• employees_get – returns selected employees• employee_insert – use this to insert new employee• employee_update – use this to update employee row• employee_delete – use this to delete employee
![Page 16: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/16.jpg)
1. Słownik danych – używane przez
View: employees_active_v
Used by: Employees search form, Active employees report
![Page 17: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/17.jpg)
1. Słownik danych – źródła
Table: employee
Data source: Employees form, sync_employees
Column SourceMaritalStatus Employees formNationalIDNumber Employees formNumber emp_no triggerScore Data warehouse, calc_employees_scores
![Page 18: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/18.jpg)
1. Słownik danych – metadane
Table: po_headers_all (Purchase orders)
Module: PurchasingResponsible: Piotr Kononow
Columnpo_header_idpo_header_number [DEPRECATED]po_header_codequantity
![Page 19: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/19.jpg)
1. Słownik danych – wartość dodana
Table: invoices
Column Descriptionnumber Invoice numberdate Invoice date
![Page 20: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/20.jpg)
1. Słownik danych – wartość dodana
Table: invoices
Column Descriptionnumber Invoice autogenerated number, starting from 1 each
year. Number is generated when invoice gets approved.
date Invoice issue date. Null for working copy invoices. Set to today’s date on invoice approval.
![Page 21: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/21.jpg)
2. Diagram Związków Encji (ERD)
![Page 22: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/22.jpg)
2. Diagram Związków Encji (ERD)
![Page 23: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/23.jpg)
Nie chodzi o to:
![Page 24: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/24.jpg)
Chodzi o to:
![Page 25: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/25.jpg)
3. Dokumentacja kodu
![Page 26: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/26.jpg)
Metadane, historia zmian
![Page 27: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/27.jpg)
III. JAKDOKUMENTOWAĆ
![Page 28: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/28.jpg)
Na bieżąco i staleDobra praktyka:
![Page 29: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/29.jpg)
Czym dokumentować?
1. Excel, Word, notatnik
![Page 30: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/30.jpg)
Czym dokumentować?
1. Excel, Word, notatnik2. Konsola
![Page 31: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/31.jpg)
![Page 32: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/32.jpg)
Czym dokumentować?
1. MS Excel, MS Word, notatnik2. Konsola3. Dedykowane narzędzia
![Page 33: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/33.jpg)
• Redgate SQL Doc• Apex SQL Doc• Dataedo
Dedykowane narzędzia
![Page 34: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/34.jpg)
Dedykowane narzędzia
![Page 35: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/35.jpg)
Dedykowane narzędzia
![Page 36: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/36.jpg)
http://tools.dataedo.com
Dedykowane narzędzia
![Page 37: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/37.jpg)
Darmowe licencje
http://dataedo.com/3camp
![Page 38: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/38.jpg)
Pytania?
![Page 39: Jak udokumentować bazę danych](https://reader035.fdocument.pub/reader035/viewer/2022062503/586fdc251a28ab18428b638f/html5/thumbnails/39.jpg)
Dziękuję za uwagę!
Piotr KononowPiotr.Kononow(at)logicsystems.com.pl