Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Great Scott! Dealing with New Datatypes

425 views

Published on

Register for the companion webinar:
http://forms.embarcadero.com/Dealing-with-New-Datatypes

Data modeling is going back to the future! No, it doesn’t include a hoverboard (yet), but it does include some new datatypes that capture temporal and spatial information. In the past, datatypes were used to classify various types of data, whether integers, characters, or alphanumeric strings. With the technologies introduced in recent years, these basic datatypes can’t address everything – data modelers now need more specialized datatypes for specific needs and new formats.

Multiple database platforms have introduced new datatypes that can make it easier to support more advanced data concepts in physical data models. If you do not know about what new things are happening in the physical data modeling world, or what to do with them, Karen Lopez will discuss using a variety of new datatypes including:
•Temporal, such as period, with keywords
•Spatial, including geospatial
•Others, incorporating JSON/BSON/UBJSON usage

Learn more about ER/Studio at:
http://www.embarcadero.com/products/er-studio

Published in: Technology
  • Be the first to comment

Great Scott! Dealing with New Datatypes

  1. 1. Karen Lopez @datachick #TEAMDATA GREAT SCOTT! Working with all those weird datatypes
  2. 2. Yes, Please do Tweet/Share today’s event @datachick @ERStudio
  3. 3. Karen López Karen has 20+ years of data and information architecture experience on large, multi-project programs. She is a frequent speaker on data modeling, data-driven methodologies and pattern data models. She blogs at community.embarcadero.com, datamodel.com and Dataversity.net She wants you to love your data.
  4. 4. Logistics… Use Q&A for formal questions – ask at any time Slides will be distributed after event Continue the conversation on Twitter There’s more to come…
  5. 5. Plan for Today Types of Data Types The Outlier Data Types Working with Data Types 10 Tips for Working with Data Types
  6. 6. Poll: Who are you?
  7. 7. Poll: Which RDBMSs Do You Support?
  8. 8. Datatypes Why do we need them? What types of datatypes are there?
  9. 9. Datatypes aren’t just formats
  10. 10. Datatypes are also about data quality
  11. 11. Datatypes are also about PERFORMANCE
  12. 12. Note… Today’s focus is mostly on physical data types… ….but I do have some thoughts on logical data types as well
  13. 13. Types of Datatypes* predefined data types constructed types user-defined types ISO: 9075
  14. 14. Data types Understand your data type taxonomies, by RDBMS and version. IBM DB2
  15. 15. Understand the lingo Data type names Data type syntax Data type gotchas
  16. 16. The Basic Datatypes Strings Numeric Boolean Dates and Times Interval ISO: 9075
  17. 17. Fancy Datatypes • HIERARCHYID • Spatial data types (GEOMETRY, GEOGRAPHY, more) • XML • JSON < NEW!!!!! FANCY!!! • PERIODs • MONEY • Spatial temporal data types (a special one)
  18. 18. Hierarchies
  19. 19. Meet JSON Javascript Object Notation JSON support arrays and variable data items Much like XML in theory (shredding, overuse, popular ) https://docs.mongodb.org/getting-started/shell/import-data/
  20. 20. Periods Data type for storing an opening and closing date (or time) period Has special operators and functions to help work with the data Importantly, an “until closed” end period https://developer.teradata.com/database/articles/exploring-teradata-13s-period-data-type
  21. 21. Spatial data types Special functions Meet needs for shapes and lines Geospatial Data in SQL Server. (2015, May 14). Wikibooks, The Free Textbook Project. Retrieved 18:21, November 10, 2015 from https://en.wikibooks.org/w/index.php?title=Geospatial_Data_i n_SQL_Server&oldid=2958376.
  22. 22. Money (and other specialized data types) Special use cases Special limiations Limited cross-platform support Often limitations are not well known http://www.postgresql.org/docs/9.4/static/datatype-money.html http://www.postgresql.org/docs/9.4/static/datatype-net-types.html
  23. 23. Dates and Times Various “precisions” Some, not all, RDBMSs support WITH TIMEZONE Conversion compatibilities ISO 9075
  24. 24. Host Implementation Gotchas TIMESTAMP Dates and Times WITH TIMEZONE TINYINT BIT And more….
  25. 25. Other Gotchas Conversion Compatibilities Performance of conversions Foreign key consistency NULLability https://msdn.microsoft.com/en-us/library/ms191530.aspx
  26. 26. User Defined Data Types
  27. 27. http://www.datamodel.com/index.php/20 14/04/01/sql-server-2014-new-datatype/
  28. 28. Iterative Data Modeling
  29. 29. How do we set data types? Data architects must work with DBAs, Devs, end users to finalize datatypes
  30. 30. Deciding on Datatypes Data profiling Awareness of options Confirmation of cost, benefit, risk Urban myths Testing and benchmarking
  31. 31. What about logical data types? They are just as important Many of our thoughts today apply We should stive to keep them simple Logical data types for meaning Yet….
  32. 32. Logical/Physical data type mapping
  33. 33. Other Modeling Gotchas
  34. 34. 10 Tips for using the right datatypes 1.Learn all the datatypes available to you, by RDMS and version 2.Read the pros and cons of each 3.Create user defined datatypes that provide benefits to more than just the data modeler 4.Understand datatype compatibilities 5.Know the business case for longer datatypes
  35. 35. 10 Tips for Data Modelers 6. Be prepared to defend the use of the correct datatype 7. Size matters: know why 8. Stop using deprecated data types. Really. Just. Stop. 9. Monitor RDBMs upcoming features 10.Request enhancements if your tools don’t support an RDBMS datatype.
  36. 36. RDBMS resources SQL Server Books On Line (MSDN) IBM DB2 (z/OS and LUW) Knowledge Center Teradata Online Library Oracle Database Online Library …plus all the others…
  37. 37. Community community.embarcadero.com
  38. 38. Thank you, you were great. Let’s do this again some time! Karen Lopez @datachick

×