SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Generic Collection Types                       v1.0
How to enrich the programmer's PLSQL toolkit


Arnold Reuser
Agenda



  1        Serving a need

  2        What Generic Collection Types can do for you

  3        How you can make a difference




Page  2                     Generic Collection Types v1.0
Serving a need

Missing feature of PLSQL

 PLSQL provides the collection types table and varray
   - Collection types that allow you to declare index-by tables, nested tables and
     variable-size arrays.
   - Collection types that reflect a table like structure.

 PLSQL does not provide generic collection types
   - Collection types as lists, maps, sets, trees, graphs, …
   - Collection types with a specialized purpose and their own unique strengths and
     weaknesses




Page  3                             Generic Collection Types v1.0
Serving a need

Missing feature of PLSQL

 PLSQL types however can be used as building blocks
 Building blocks to create generic collection types
 Collection types as lists, maps, sets, trees, graphs, ….
 Collection types that will enrich the PLSQL programmer's toolkit




Page  4                     Generic Collection Types v1.0
Serving a need

Missing feature of PLSQL

 A rich PLSQL programmer's toolkit will help shift the focus
 Shift the focus from purely technical problems to business problems
 Which will help the business generate more value




Page  5                    Generic Collection Types v1.0
What Generic Collection Types can do for you



 Current status
 Practical applications




Page  6                   Generic Collection Types v1.0
Current Status




           Collection Type   Description
           Collection        collection of elements

           List              ordered collection of elements, permitting duplicates

           Set               collection of elements, forbids duplicates within the collection.

           Map               key to value pairs, without duplicate keys

           Tree              hierarchical collection of elements

           Graph             interconnected collection of elements




Page  7                     Generic Collection Types v1.0
Current Status

Utility packages are introduced to extend the functionality of the available types.
Read the user guide for all the details on the utility packages.

           Collection Type      Available Type
           Collection           Collection

           List                 List

           Set

           Map                  SimpleMap,SimpleHashMap,BaseMap

           Tree

           Graph                Graph




Page  8                        Generic Collection Types v1.0
Practical Applications

List is ordered collection of elements, permitting duplicates
Supported types are lists of strings, numbers, dates, …

               Sneak preview of usage

             list StringList := new StringList('FAX','WORK','HOME');
             putil.extend(list,'MOBILE');
             contains boolean := putil.contains(list,'MOBILE');
             idx integer := putil.indexOf(list,'MOBILE');
             list := putil.exclude(list,'MOBILE');




List is implemented as a nested table.
multiset operations are therefore available for usage

Page  9                                    Generic Collection Types v1.0
Practical Applications

SimpleMap is collection of key to value pairs, without duplicate keys.
Focus is on simplicity; both key and value are of type string

               Sneak preview of usage

             map StringList := StringList();
             mapUtil.setString(map,'AMOUNT_TYPE','TOTAL_PARTS');
             mapUtil.setString(map,'AMOUNT_UNIT','CURRENCY');
             mapUtil.setString(map,'AMOUNT_VALUE','1469');
             mapKeys varchars_t := mapUtil.keySet(map);
             amountType varchar2(100) := mapUtil.getString(map,'AMOUNT_TYPE');




Page  10                                 Generic Collection Types v1.0
Practical Applications

SimpleHashMap is collection of key to value pairs, without duplicate keys.
Focus is on performance; both key and value are of type string

               Sneak preview of usage

             map StringMatrix := mapUtil.createHashMap(pp_nrOfBuckets => 10);
             mapUtil.setString(map,'AMOUNT_TYPE','TOTAL_PARTS');
             mapUtil.setString(map,'AMOUNT_UNIT','CURRENCY');
             mapUtil.setString(map,'AMOUNT_VALUE','1469');
             mapKeys varchars_t := mapUtil.keySet(map);
             amountType varchar2(100) := mapUtil.getString(map,'AMOUNT_TYPE');




Page  11                              Generic Collection Types v1.0
Practical Applications

BaseMap is collection of key to value pairs, without duplicate keys.
Focus is on extensive support for different key and value types

               Sneak preview of usage

             map BaseMap := mapUtil.createBaseMap();
             mapUtil.setNumber(map,'CMCD_ID',1051);
             mapUtil.setString(map,'CMCD_COMMUNICATION_CODE','arnold@reuser.info');
             mapUtil.setDate(map,'CMCD_VALID_FROM',sysdate);
             mapUtil.setString(map,'CMCT_DESCR','home_email');
             mapUtil.setBoolean(map,'CMCT_IND_ACTIVE',true);
             mapKeys StringList := mapUtil.keySet(map);
             cmctDescr varchar2(100) := mapUtil.getString(map,'CMCT_DESCR');




Note there are other types BaseMap can support.
Read the user guide for more detail on this.

Page  12                              Generic Collection Types v1.0
Practical Applications

Graph is an interconnected collection of elements.

 Graphs can be used to represent a dynamic hierarchical structure e.g. XML
 Graphs can be used to define other generic types e.g. BaseMap
 Graphs are used if no other data structure delivers a proper solution
 Graphs provide extensive support for different value types
 Graphs have their roots in discrete mathematics.

How the elements of a Graph are connected is up to you.
If you really need a Graph. Read the user guide and code thoroughly.




Page  13                      Generic Collection Types v1.0
How you can make a difference



 Give it a try
 Be a happy user
 Tell us and the whole wide world about it!
 If you would like to get in touch.
  Drop me a mail at arnold@reuser.info




Page  14                   Generic Collection Types v1.0
Do You Have
                    Any Questions?
                    We would be happy to help.




Page  15   Generic Collection Types v1.0

Mais conteúdo relacionado

Destaque

Oracle 11g new features for developers
Oracle 11g new features for developersOracle 11g new features for developers
Oracle 11g new features for developersScott Wesley
 
Database Development Mistakes
Database Development MistakesDatabase Development Mistakes
Database Development MistakesMichael Findling
 
Why is the application running so slowly?
Why is the application running so slowly?Why is the application running so slowly?
Why is the application running so slowly?Michael Rosenblum
 
PL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read WorldPL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read WorldMichael Rosenblum
 
A New View of Database Views
A New View of Database ViewsA New View of Database Views
A New View of Database ViewsMichael Rosenblum
 
A green solution to solve a race condition problem
A green solution to solve a race condition problemA green solution to solve a race condition problem
A green solution to solve a race condition problemKai Zhou
 
APEX Developers : Do More With LESS !
APEX Developers : Do More With LESS !APEX Developers : Do More With LESS !
APEX Developers : Do More With LESS !Roel Hartman
 
Troubleshooting APEX Performance Issues
Troubleshooting APEX Performance IssuesTroubleshooting APEX Performance Issues
Troubleshooting APEX Performance IssuesRoel Hartman
 
Oracle 11g PL/SQL notes
Oracle 11g PL/SQL notesOracle 11g PL/SQL notes
Oracle 11g PL/SQL notesanilakduygu
 
Oracle - SQL-PL/SQL context switching
Oracle - SQL-PL/SQL context switchingOracle - SQL-PL/SQL context switching
Oracle - SQL-PL/SQL context switchingSmitha Padmanabhan
 
Automated testing APEX Applications
Automated testing APEX ApplicationsAutomated testing APEX Applications
Automated testing APEX ApplicationsRoel Hartman
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXEnkitec
 
The Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result CacheThe Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result CacheSteven Feuerstein
 
PLSQL Standards and Best Practices
PLSQL Standards and Best PracticesPLSQL Standards and Best Practices
PLSQL Standards and Best PracticesAlwyn D'Souza
 
Oracle Text in APEX
Oracle Text in APEXOracle Text in APEX
Oracle Text in APEXScott Wesley
 

Destaque (19)

Views Oracle Database
Views Oracle DatabaseViews Oracle Database
Views Oracle Database
 
Oracle 11g new features for developers
Oracle 11g new features for developersOracle 11g new features for developers
Oracle 11g new features for developers
 
Database Development Mistakes
Database Development MistakesDatabase Development Mistakes
Database Development Mistakes
 
Why is the application running so slowly?
Why is the application running so slowly?Why is the application running so slowly?
Why is the application running so slowly?
 
PL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read WorldPL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read World
 
A New View of Database Views
A New View of Database ViewsA New View of Database Views
A New View of Database Views
 
A green solution to solve a race condition problem
A green solution to solve a race condition problemA green solution to solve a race condition problem
A green solution to solve a race condition problem
 
PLSQL Advanced
PLSQL AdvancedPLSQL Advanced
PLSQL Advanced
 
AMIS - Can collections speed up your PL/SQL?
AMIS - Can collections speed up your PL/SQL?AMIS - Can collections speed up your PL/SQL?
AMIS - Can collections speed up your PL/SQL?
 
APEX Developers : Do More With LESS !
APEX Developers : Do More With LESS !APEX Developers : Do More With LESS !
APEX Developers : Do More With LESS !
 
Troubleshooting APEX Performance Issues
Troubleshooting APEX Performance IssuesTroubleshooting APEX Performance Issues
Troubleshooting APEX Performance Issues
 
Oracle query optimizer
Oracle query optimizerOracle query optimizer
Oracle query optimizer
 
Oracle 11g PL/SQL notes
Oracle 11g PL/SQL notesOracle 11g PL/SQL notes
Oracle 11g PL/SQL notes
 
Oracle - SQL-PL/SQL context switching
Oracle - SQL-PL/SQL context switchingOracle - SQL-PL/SQL context switching
Oracle - SQL-PL/SQL context switching
 
Automated testing APEX Applications
Automated testing APEX ApplicationsAutomated testing APEX Applications
Automated testing APEX Applications
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
 
The Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result CacheThe Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result Cache
 
PLSQL Standards and Best Practices
PLSQL Standards and Best PracticesPLSQL Standards and Best Practices
PLSQL Standards and Best Practices
 
Oracle Text in APEX
Oracle Text in APEXOracle Text in APEX
Oracle Text in APEX
 

Semelhante a Generic collection types in PLSQL

Java collections
Java collectionsJava collections
Java collectionspadmad2291
 
oop lecture framework,list,maps,collection
oop lecture framework,list,maps,collectionoop lecture framework,list,maps,collection
oop lecture framework,list,maps,collectionssuseredfbe9
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsAhsanul Karim
 
Collectn framework copy
Collectn framework   copyCollectn framework   copy
Collectn framework copycharan kumar
 
Collectn framework
Collectn frameworkCollectn framework
Collectn frameworkcharan kumar
 
Data Science Using Scikit-Learn
Data Science Using Scikit-LearnData Science Using Scikit-Learn
Data Science Using Scikit-LearnDucat India
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsAhsanul Karim
 
Real World Generics In Swift
Real World Generics In SwiftReal World Generics In Swift
Real World Generics In SwiftVadym Markov
 
Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...
Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...
Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...Accumulo Summit
 
An important part of electrical engineering is PCB design. One impor.pdf
An important part of electrical engineering is PCB design. One impor.pdfAn important part of electrical engineering is PCB design. One impor.pdf
An important part of electrical engineering is PCB design. One impor.pdfARORACOCKERY2111
 
The map interface (the java™ tutorials collections interfaces)
The map interface (the java™ tutorials   collections   interfaces)The map interface (the java™ tutorials   collections   interfaces)
The map interface (the java™ tutorials collections interfaces)charan kumar
 
Fusing Transformations of Strict Scala Collections with Views
Fusing Transformations of Strict Scala Collections with ViewsFusing Transformations of Strict Scala Collections with Views
Fusing Transformations of Strict Scala Collections with ViewsPhilip Schwarz
 

Semelhante a Generic collection types in PLSQL (20)

Collection
Collection Collection
Collection
 
Java collections
Java collectionsJava collections
Java collections
 
oop lecture framework,list,maps,collection
oop lecture framework,list,maps,collectionoop lecture framework,list,maps,collection
oop lecture framework,list,maps,collection
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
 
Collectn framework copy
Collectn framework   copyCollectn framework   copy
Collectn framework copy
 
Collectn framework
Collectn frameworkCollectn framework
Collectn framework
 
List Views
List ViewsList Views
List Views
 
Data structure
 Data structure Data structure
Data structure
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Data Science Using Scikit-Learn
Data Science Using Scikit-LearnData Science Using Scikit-Learn
Data Science Using Scikit-Learn
 
Abap Questions
Abap QuestionsAbap Questions
Abap Questions
 
Abap
AbapAbap
Abap
 
Scala Collections
Scala CollectionsScala Collections
Scala Collections
 
Scala collections
Scala collectionsScala collections
Scala collections
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
 
Real World Generics In Swift
Real World Generics In SwiftReal World Generics In Swift
Real World Generics In Swift
 
Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...
Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...
Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...
 
An important part of electrical engineering is PCB design. One impor.pdf
An important part of electrical engineering is PCB design. One impor.pdfAn important part of electrical engineering is PCB design. One impor.pdf
An important part of electrical engineering is PCB design. One impor.pdf
 
The map interface (the java™ tutorials collections interfaces)
The map interface (the java™ tutorials   collections   interfaces)The map interface (the java™ tutorials   collections   interfaces)
The map interface (the java™ tutorials collections interfaces)
 
Fusing Transformations of Strict Scala Collections with Views
Fusing Transformations of Strict Scala Collections with ViewsFusing Transformations of Strict Scala Collections with Views
Fusing Transformations of Strict Scala Collections with Views
 

Último

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Último (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Generic collection types in PLSQL

  • 1. Generic Collection Types v1.0 How to enrich the programmer's PLSQL toolkit Arnold Reuser
  • 2. Agenda 1 Serving a need 2 What Generic Collection Types can do for you 3 How you can make a difference Page  2 Generic Collection Types v1.0
  • 3. Serving a need Missing feature of PLSQL  PLSQL provides the collection types table and varray - Collection types that allow you to declare index-by tables, nested tables and variable-size arrays. - Collection types that reflect a table like structure.  PLSQL does not provide generic collection types - Collection types as lists, maps, sets, trees, graphs, … - Collection types with a specialized purpose and their own unique strengths and weaknesses Page  3 Generic Collection Types v1.0
  • 4. Serving a need Missing feature of PLSQL  PLSQL types however can be used as building blocks  Building blocks to create generic collection types  Collection types as lists, maps, sets, trees, graphs, ….  Collection types that will enrich the PLSQL programmer's toolkit Page  4 Generic Collection Types v1.0
  • 5. Serving a need Missing feature of PLSQL  A rich PLSQL programmer's toolkit will help shift the focus  Shift the focus from purely technical problems to business problems  Which will help the business generate more value Page  5 Generic Collection Types v1.0
  • 6. What Generic Collection Types can do for you  Current status  Practical applications Page  6 Generic Collection Types v1.0
  • 7. Current Status Collection Type Description Collection collection of elements List ordered collection of elements, permitting duplicates Set collection of elements, forbids duplicates within the collection. Map key to value pairs, without duplicate keys Tree hierarchical collection of elements Graph interconnected collection of elements Page  7 Generic Collection Types v1.0
  • 8. Current Status Utility packages are introduced to extend the functionality of the available types. Read the user guide for all the details on the utility packages. Collection Type Available Type Collection Collection List List Set Map SimpleMap,SimpleHashMap,BaseMap Tree Graph Graph Page  8 Generic Collection Types v1.0
  • 9. Practical Applications List is ordered collection of elements, permitting duplicates Supported types are lists of strings, numbers, dates, … Sneak preview of usage list StringList := new StringList('FAX','WORK','HOME'); putil.extend(list,'MOBILE'); contains boolean := putil.contains(list,'MOBILE'); idx integer := putil.indexOf(list,'MOBILE'); list := putil.exclude(list,'MOBILE'); List is implemented as a nested table. multiset operations are therefore available for usage Page  9 Generic Collection Types v1.0
  • 10. Practical Applications SimpleMap is collection of key to value pairs, without duplicate keys. Focus is on simplicity; both key and value are of type string Sneak preview of usage map StringList := StringList(); mapUtil.setString(map,'AMOUNT_TYPE','TOTAL_PARTS'); mapUtil.setString(map,'AMOUNT_UNIT','CURRENCY'); mapUtil.setString(map,'AMOUNT_VALUE','1469'); mapKeys varchars_t := mapUtil.keySet(map); amountType varchar2(100) := mapUtil.getString(map,'AMOUNT_TYPE'); Page  10 Generic Collection Types v1.0
  • 11. Practical Applications SimpleHashMap is collection of key to value pairs, without duplicate keys. Focus is on performance; both key and value are of type string Sneak preview of usage map StringMatrix := mapUtil.createHashMap(pp_nrOfBuckets => 10); mapUtil.setString(map,'AMOUNT_TYPE','TOTAL_PARTS'); mapUtil.setString(map,'AMOUNT_UNIT','CURRENCY'); mapUtil.setString(map,'AMOUNT_VALUE','1469'); mapKeys varchars_t := mapUtil.keySet(map); amountType varchar2(100) := mapUtil.getString(map,'AMOUNT_TYPE'); Page  11 Generic Collection Types v1.0
  • 12. Practical Applications BaseMap is collection of key to value pairs, without duplicate keys. Focus is on extensive support for different key and value types Sneak preview of usage map BaseMap := mapUtil.createBaseMap(); mapUtil.setNumber(map,'CMCD_ID',1051); mapUtil.setString(map,'CMCD_COMMUNICATION_CODE','arnold@reuser.info'); mapUtil.setDate(map,'CMCD_VALID_FROM',sysdate); mapUtil.setString(map,'CMCT_DESCR','home_email'); mapUtil.setBoolean(map,'CMCT_IND_ACTIVE',true); mapKeys StringList := mapUtil.keySet(map); cmctDescr varchar2(100) := mapUtil.getString(map,'CMCT_DESCR'); Note there are other types BaseMap can support. Read the user guide for more detail on this. Page  12 Generic Collection Types v1.0
  • 13. Practical Applications Graph is an interconnected collection of elements.  Graphs can be used to represent a dynamic hierarchical structure e.g. XML  Graphs can be used to define other generic types e.g. BaseMap  Graphs are used if no other data structure delivers a proper solution  Graphs provide extensive support for different value types  Graphs have their roots in discrete mathematics. How the elements of a Graph are connected is up to you. If you really need a Graph. Read the user guide and code thoroughly. Page  13 Generic Collection Types v1.0
  • 14. How you can make a difference  Give it a try  Be a happy user  Tell us and the whole wide world about it!  If you would like to get in touch. Drop me a mail at arnold@reuser.info Page  14 Generic Collection Types v1.0
  • 15. Do You Have Any Questions? We would be happy to help. Page  15 Generic Collection Types v1.0