Presentation is loading. Please wait.

Presentation is loading. Please wait.

Critical Path SQL Thane Schaffer: Database Administrator/Architect, Transcore, Albuquerque NM

Similar presentations


Presentation on theme: "Critical Path SQL Thane Schaffer: Database Administrator/Architect, Transcore, Albuquerque NM"— Presentation transcript:

1 Critical Path SQL Thane Schaffer: Database Administrator/Architect, Transcore, Albuquerque NM http://sqlambassador.blogspot.comhttp://sqlambassador.blogspot.com, email: thaneschaffer@gmail.com Traversing trees of hierarchal data structures, solving cumulative minimum/maximum problems for critical paths in SQL

2 Critical Path SQL  Thane Schaffer  Current employment DBA with Transcore, an Engineer To Order (ETO)  R&D, manufacturingof RFID tolling equipment, i.e. tags & readers, bidding software projects to governmental agencies  Support MS SQL Server 2005, 2008R2, 2014, Oracle offsite/onsite clients, Postgres Open GIS, mySQL, and Visibility ETO ERP Administration  Previously consulted/employed  Daimler Trucks North America (Freightliner): data modeler for a global Teamcenter PLM reporting (Oracle OLAP)  Gallo Wines (Oracle data migration/interfaces); Beverage industry  Precision Castparts (Delphi & VB app dev/Oracle design OLTP); Aerospace  Clackamas County Tax Assessors office (Informix Y2K conversion); Local government  Mitsubishi Silicon America (DEC VAX & VB app dev/Oracle OLTP); Silicon wafer manufacturer  HMO – Oregon (HP 3000 Image hierarchal DB); Healthcare  SEH America (DEC VAX/VMS app dev/DEC rDB); Silicon wafer manufacturer  ITI Technologies (HP 3000/9000 Image hierarchal DBMS); Motherboards  Electro Scientific Industries (DEC VAX app dev/RMS/Datatrieve/operations); Laser trimmers – Silicon wafers  linkedin: thane schaffer  blog: http://sqlambassador.blogspot.comhttp://sqlambassador.blogspot.com  email: thane.schaffer@transcore / thaneschaffer@gmail.comthane.schaffer@transcorethaneschaffer@gmail.com 2/20/2016SQLSaturday #478 – Albuquerque 20162 |

3 Critical Path SQL 2/20/2016SQLSaturday #478 – Albuquerque 20163 |  Critical path definition:  An algorithm that examines a constraint and all possible outcomes for that constraint so as to understand the maximum/minimum duration of that constraint  Examples:  Project management examining manpower or time constraints  Travel: salesman, transportation and logistics  Designing or building complex products: motherboards, cars, trucks  War/Military actions and objectives: seizing territories  Answer for shortest path? 1)ADF 2)AE 3)BC

4 Critical Path SQL 2/20/2016SQLSaturday #478 – Albuquerque 20164 |  Another example:  Additional variables add to complexity  Direct labor hours, machine capacity/time, machine setup time/costs, material costs, acquisition/lead times, queue/wait times, move times (DRAG), and many variations in labor, machines compound issues

5 Critical Path SQL 2/20/2016SQLSaturday #478 – Albuquerque 20165 | OLTP Hierarchal data can be found in many places in the business

6 Critical Path SQL 2/20/2016SQLSaturday #478 – Albuquerque 20166 | OLTP Hierarchal data structures in your databases Employee tableBill of Materials table

7 Critical Path SQL 2/20/2016SQLSaturday #478 – Albuquerque 20167 |  Traversing hierarchal data structures in proper order that’s meaningful for the business  Computer science data structure courses teach about pre-order, in- order, post-order traversals. Inverted tree structure requires pre-order for most business needs  Pre-order starts at the root and travels down and left, working right / up  Produces an ordered set  {F, B, A, D, C, E, G, I, H}

8 Critical Path SQL 2/20/2016SQLSaturday #478 – Albuquerque 20168 | Syntax for recursive common table expressions: WITH CTEbom (column1, column2, …columnN) as ( select column1, column2, …columnN from table1 (anchor query) UNION ALL select column1, column2, …columnN from table2 t2 inner join CTEbom ct on ct.column1 to t2.column1 (recursive query & join back on itself) ) select column1, column2, …columnN from CTEbom option (maxrecursion 6) Basic example: Solution: SQLSaturday478_DemoProject.ssmssln, Open:BTreeBOMExample.sql

9 Critical Path SQL 2/20/2016SQLSaturday #478 – Albuquerque 20169 | AdventureWorks example: Solution: SQLSaturday478_DemoProject.ssmssln, Open:AdventureWorksBOMCTE.sql

10 Critical Path SQL 2/20/2016SQLSaturday #478 – Albuquerque 201610 |  Transcore examples:  Solution: SQLSaturday478_DemoProject.ssmssln, Open: TranscoreExamples.sql  Proc finds maximum cumulative lead time: AMTC_FETCH_BOM_CUM_LT  Function returns result set of BOM structure: AMTC_FIND_BOM_LT  VisMaintenance (Bart) application  How messy can this all get, see old Oracle example: OracleBOMExample.sql

11 Thanks to our Sponsors!

12 Join us at our Networking happy hour immediately following the closing remarks today Fox & Hound 4301 The Lane at 25 NE, Albuquerque, NM 87109 Drinks, Light appetizers, Raffle drawings, Pool tables, dart boards, and more networking with speakers, organizers, and attendees. See you there!


Download ppt "Critical Path SQL Thane Schaffer: Database Administrator/Architect, Transcore, Albuquerque NM"

Similar presentations


Ads by Google