SlideShare a Scribd company logo
1 of 15
Download to read offline
Coding T-SQL in a Team
       T-
          Environment
                                  Garth Honhart

  Silicon Valley SQL Server User Group
           November 17, 2009




     Mark Ginnebaugh, User Group Leader
Before I Get Started…News
 Released Today
   SQL Server 2008 Cumulative Update #8
   SQL Server 2008 Cumulative Update #5
 Recently Released
   SQL Server 2008 R2 November CTP
   Office 2010 Beta (64-bit Client & PowerPivot!)
 From PDC
   Microsoft Pinpoint: Codename “Dallas”
   Cloud based datasets, such as demographic and sales
   information. Think of it as the un-federated portion of the
   data that would be used when performing a PowerPivot.
Garth Honhart
       •   RF-4C (1960’s era Reconnaissance Aircraft)
       •   A-10 (Desert Storm Scud Hunters)
       •   Airmail Terminal Frankfurt (Yes, I know how to go postal)
USAF   •   U-2 (1950’s era Reconnaissance Aircraft…and they’re still flying)


       • Global Metrology Reporting via Access & ASP 1.0
       • Tandem Reporting Via FrontPage based Intranet (CGI)
       • Learning Management Deferred Revenue Reporting (SQL 2000/ASP
Web      3.0)


       • Data Quality and Business Rule Validation (HRIS:IDM:LMS) using SSIS
       • Web Portal Reporting system Internal and Commercial sites based on
         Web Logic / Tea Leaf using SSIS & SSRS
 BI    • Soup to Nuts BI infrastructure implementation. Full Microsoft BI Stack.
Agenda
 Challenges of developing T-SQL in a team
 environment.
 A Scenario
 Commonly used tools and their benefits
 Point out development short cuts that can lead to
 bad habits
 Open discussion on how different organizations
 approach the challenge.
Please Mind the Gap
 Gap or Chasm?
 Depends on where the T-SQL you’re coding resides.
 If it is going into production, you are going to make
 it a stored procedure, aren’t you?
 What about development that happens before
 code is folded into a larger project?
Scenario
 Company initiates a BI effort, albeit with a very
 limited budget.
 “Team” consists of one FTE and one contractor.
 Initial Focus is formalizing reports using SQL Server
 Reporting Services.
 No source control. No collaborative development.
 Approach? Single threaded development.
(Code Examples Two Man Crew)
select a.title, a.type, a.price, c.au_fname, c.au_lname
from titles a, titleauthor b, authors c
where a.title_id = b.title_id and c.au_id=b.au_id
order by 3,2,1,5,4

Contractor 1
select t.title, t.type, t.price, a.au_fname, a.au_lname
from titles t, titleauthor ta, authors a
where t.title_id = ta.title_id and a.au_id=ta.au_id
order by t.price, t.type, t.title, a.au_lname, a.au_fname

FTE 1
Phase Two

 Company adds funding for additional full time
 positions.
 Company also switches preferred contractors.
 New team is three FTE and three contractors, one on
 site, two off shore.
 Primary development focus is still SSRS, but will also
 include ETL via Integration Services.
(Coding Styles 2)
select
                              select
t.title,
t.type,
                              t.title as BookTitle
t.price,                      ,t.type as TitleType
a.au_fname,                   ,t.price as TitlePrice
a.au_lname                    ,a.au_lname + ', ' + a.au_fname as
from                                AuthorName
titles t
                              from titles as t
inner join titleauthor ta
on t.title_id = ta.title_id
                              inner join
inner join authors a                (titleauthor as ta
on ta.au_id=a.au_id                 inner join
order by                                      authors as a on ta.au_id=a.au_id
t.price,                            ) on t.title_id = ta.title_id
t.type,
                              order by t.price, t.type, t.title, a.au_lname,
t.title,
                                    a.au_fname
a.au_lname,
a.au_fname



  Contractor 2                 FTE 2
Common (Bad) Shortcuts

 ANSI-89 Style Joins
 Table Aliases (a, b, c or t1,t2,t3)
 Order by ordinal

 select a.title, a.type, a.price, c.au_fname, c.au_lname
 from titles a, titleauthor b, authors c
 where a.title_id = b.title_id and c.au_id=b.au_id
 order by 3,2,1,5,4
Tips and Tools

 Settle on common table aliases, publish and keep
 them up to date.
 Decide what format works best for your team.
 Use a formatting tool.
Demo
Other Tools that Format

 Toad for SQL Server (Quest). Does a whole lot more
 than just formatting.
 http://www.quest.com/toad-for-sql-server/
 SQL Pretty Printer. Integrates with SSMS, just does
 formatting. Desktop version (free trial) or browser
 based. http://www.dpriver.com/index.php
Links

 T-SQL Formatting Standards (Coding Standards) –
 Robert Sheldon Simple Talk
 http://www.simple-talk.com/sql/t-sql-
 programming/transact-sql-formatting-standards-
 (coding-styles)/
 Deprecated Database Engine Features in SQL Server
 2008
 http://msdn.microsoft.com/en-
 us/library/ms143729.aspx
 Aaron Bertrand’s Bad Habits to Kick
 http://sqlblog.com/blogs/aaron_bertrand/archive/tag
 s/best+practices/default.aspx
www.bayareasql.org


To learn more or to inquire about speaking opportunities, please contact:
     Mark Ginnebaugh, User Group Leader mark@designmind.com

More Related Content

What's hot

Queries in general purpose languages
Queries in general purpose languagesQueries in general purpose languages
Queries in general purpose languagesTomas Petricek
 
Fp growth algorithm
Fp growth algorithmFp growth algorithm
Fp growth algorithmPradip Kumar
 
Data Analysis with Python Pandas
Data Analysis with Python PandasData Analysis with Python Pandas
Data Analysis with Python PandasNeeru Mittal
 
R programming & Machine Learning
R programming & Machine LearningR programming & Machine Learning
R programming & Machine LearningAmanBhalla14
 
C language header files
C language header filesC language header files
C language header filesmarar hina
 
Analysis Is Painless
Analysis Is PainlessAnalysis Is Painless
Analysis Is PainlessOmer Trajman
 
Introduction to pandas
Introduction to pandasIntroduction to pandas
Introduction to pandasPiyush rai
 
CSS: The Boring Bits
CSS: The Boring BitsCSS: The Boring Bits
CSS: The Boring BitsPeter Gasston
 
Chapter 10 Library Function
Chapter 10 Library FunctionChapter 10 Library Function
Chapter 10 Library FunctionDeepak Singh
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioChris Seebacher
 
UNIT 4-HEADER FILES IN C
UNIT 4-HEADER FILES IN CUNIT 4-HEADER FILES IN C
UNIT 4-HEADER FILES IN CRaj vardhan
 
Regular Expressions in Google Analytics
Regular Expressions in Google AnalyticsRegular Expressions in Google Analytics
Regular Expressions in Google AnalyticsShivani Singh
 

What's hot (16)

Queries in general purpose languages
Queries in general purpose languagesQueries in general purpose languages
Queries in general purpose languages
 
Fp growth algorithm
Fp growth algorithmFp growth algorithm
Fp growth algorithm
 
Data Analysis with Python Pandas
Data Analysis with Python PandasData Analysis with Python Pandas
Data Analysis with Python Pandas
 
Lecture6
Lecture6Lecture6
Lecture6
 
Assignment in java
Assignment in javaAssignment in java
Assignment in java
 
R programming & Machine Learning
R programming & Machine LearningR programming & Machine Learning
R programming & Machine Learning
 
C language header files
C language header filesC language header files
C language header files
 
Analysis Is Painless
Analysis Is PainlessAnalysis Is Painless
Analysis Is Painless
 
Spsl II unit
Spsl   II unitSpsl   II unit
Spsl II unit
 
Introduction to pandas
Introduction to pandasIntroduction to pandas
Introduction to pandas
 
CSS: The Boring Bits
CSS: The Boring BitsCSS: The Boring Bits
CSS: The Boring Bits
 
Chapter 10 Library Function
Chapter 10 Library FunctionChapter 10 Library Function
Chapter 10 Library Function
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
UNIT 4-HEADER FILES IN C
UNIT 4-HEADER FILES IN CUNIT 4-HEADER FILES IN C
UNIT 4-HEADER FILES IN C
 
Regular Expressions in Google Analytics
Regular Expressions in Google AnalyticsRegular Expressions in Google Analytics
Regular Expressions in Google Analytics
 
F# Eye 4 the C# Guy
F# Eye 4 the C# GuyF# Eye 4 the C# Guy
F# Eye 4 the C# Guy
 

Viewers also liked

Modeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGitModeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGitmikaelbarbero
 
EMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to MillionsEMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to Millionsmikaelbarbero
 
Sirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLsSirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLsmikaelbarbero
 
Diff and Merge with Ease: EMF Compare
Diff and Merge with Ease: EMF CompareDiff and Merge with Ease: EMF Compare
Diff and Merge with Ease: EMF Comparemikaelbarbero
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database DeploymentsMike Willbanks
 
Intro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionIntro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionMedhat Dawoud
 
How to get started with R programming
How to get started with R programmingHow to get started with R programming
How to get started with R programmingRamon Salazar
 
Selling steps to sell process funnel opportunities establish value close sale...
Selling steps to sell process funnel opportunities establish value close sale...Selling steps to sell process funnel opportunities establish value close sale...
Selling steps to sell process funnel opportunities establish value close sale...SlideTeam.net
 
JKJ_T SQL project code samples
JKJ_T SQL project code samplesJKJ_T SQL project code samples
JKJ_T SQL project code samplesJeff Jacob
 
Kanban in 4 easy steps
Kanban in 4 easy steps Kanban in 4 easy steps
Kanban in 4 easy steps Shore Labs
 
Business Analyst Training
Business  Analyst  TrainingBusiness  Analyst  Training
Business Analyst TrainingCraig Brown
 
Modern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesModern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesMarkus Winand
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 

Viewers also liked (17)

Modeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGitModeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGit
 
EMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to MillionsEMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to Millions
 
Sirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLsSirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLs
 
Diff and Merge with Ease: EMF Compare
Diff and Merge with Ease: EMF CompareDiff and Merge with Ease: EMF Compare
Diff and Merge with Ease: EMF Compare
 
T-SQL-Assignment
T-SQL-AssignmentT-SQL-Assignment
T-SQL-Assignment
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
Intro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionIntro to T-SQL – 2nd session
Intro to T-SQL – 2nd session
 
Using T-SQL
Using T-SQL Using T-SQL
Using T-SQL
 
How to get started with R programming
How to get started with R programmingHow to get started with R programming
How to get started with R programming
 
Selling steps to sell process funnel opportunities establish value close sale...
Selling steps to sell process funnel opportunities establish value close sale...Selling steps to sell process funnel opportunities establish value close sale...
Selling steps to sell process funnel opportunities establish value close sale...
 
JKJ_T SQL project code samples
JKJ_T SQL project code samplesJKJ_T SQL project code samples
JKJ_T SQL project code samples
 
Part 12 t-sql
Part 12  t-sqlPart 12  t-sql
Part 12 t-sql
 
Kanban in 4 easy steps
Kanban in 4 easy steps Kanban in 4 easy steps
Kanban in 4 easy steps
 
Business Analyst Training
Business  Analyst  TrainingBusiness  Analyst  Training
Business Analyst Training
 
Modern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesModern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial Databases
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to Kanban
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 

Similar to Coding T-SQL in a Team Environment

Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answersdebarghyamukherjee60
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxfaithxdunce63732
 
Data Exploration with Apache Drill: Day 2
Data Exploration with Apache Drill: Day 2Data Exploration with Apache Drill: Day 2
Data Exploration with Apache Drill: Day 2Charles Givre
 
Webinar: Strength in Numbers: Introduction to ClickHouse Cluster Performance
Webinar: Strength in Numbers: Introduction to ClickHouse Cluster PerformanceWebinar: Strength in Numbers: Introduction to ClickHouse Cluster Performance
Webinar: Strength in Numbers: Introduction to ClickHouse Cluster PerformanceAltinity Ltd
 
Code That Writes Code : Automatic Programming for NHibernate
Code That Writes Code : Automatic Programming for NHibernateCode That Writes Code : Automatic Programming for NHibernate
Code That Writes Code : Automatic Programming for NHibernateDeepak Sahu
 
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftBest Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftAmazon Web Services
 
Recent Changes and Challenges for Future Presto
Recent Changes and Challenges for Future PrestoRecent Changes and Challenges for Future Presto
Recent Changes and Challenges for Future PrestoKai Sasaki
 
Construindo Aplicações Deep Learning com TensorFlow e Amazon SageMaker - MCL...
Construindo Aplicações Deep Learning com TensorFlow e Amazon SageMaker -  MCL...Construindo Aplicações Deep Learning com TensorFlow e Amazon SageMaker -  MCL...
Construindo Aplicações Deep Learning com TensorFlow e Amazon SageMaker - MCL...Amazon Web Services
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENTLori Moore
 
So You Want to Write an Exporter
So You Want to Write an ExporterSo You Want to Write an Exporter
So You Want to Write an ExporterBrian Brazil
 
Oracle D2K reports
Oracle D2K reports Oracle D2K reports
Oracle D2K reports Rajesh Ch
 
Building Services With gRPC, Docker and Go
Building Services With gRPC, Docker and GoBuilding Services With gRPC, Docker and Go
Building Services With gRPC, Docker and GoMartin Kess
 
PHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPatrick Allaert
 
Java Data Migration with Data Pipeline
Java Data Migration with Data PipelineJava Data Migration with Data Pipeline
Java Data Migration with Data PipelineNorth Concepts
 
C++ Programming Class Creation Program Assignment Instructions
C++ Programming Class Creation Program Assignment InstructionsC++ Programming Class Creation Program Assignment Instructions
C++ Programming Class Creation Program Assignment InstructionsTawnaDelatorrejs
 
An Introduction To C++Templates
An Introduction To C++TemplatesAn Introduction To C++Templates
An Introduction To C++TemplatesGanesh Samarthyam
 
Lesson 2 data preprocessing
Lesson 2   data preprocessingLesson 2   data preprocessing
Lesson 2 data preprocessingAbdurRazzaqe1
 

Similar to Coding T-SQL in a Team Environment (20)

Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answers
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
 
Data Exploration with Apache Drill: Day 2
Data Exploration with Apache Drill: Day 2Data Exploration with Apache Drill: Day 2
Data Exploration with Apache Drill: Day 2
 
Webinar: Strength in Numbers: Introduction to ClickHouse Cluster Performance
Webinar: Strength in Numbers: Introduction to ClickHouse Cluster PerformanceWebinar: Strength in Numbers: Introduction to ClickHouse Cluster Performance
Webinar: Strength in Numbers: Introduction to ClickHouse Cluster Performance
 
Code That Writes Code : Automatic Programming for NHibernate
Code That Writes Code : Automatic Programming for NHibernateCode That Writes Code : Automatic Programming for NHibernate
Code That Writes Code : Automatic Programming for NHibernate
 
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftBest Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
 
Recent Changes and Challenges for Future Presto
Recent Changes and Challenges for Future PrestoRecent Changes and Challenges for Future Presto
Recent Changes and Challenges for Future Presto
 
Construindo Aplicações Deep Learning com TensorFlow e Amazon SageMaker - MCL...
Construindo Aplicações Deep Learning com TensorFlow e Amazon SageMaker -  MCL...Construindo Aplicações Deep Learning com TensorFlow e Amazon SageMaker -  MCL...
Construindo Aplicações Deep Learning com TensorFlow e Amazon SageMaker - MCL...
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENT
 
So You Want to Write an Exporter
So You Want to Write an ExporterSo You Want to Write an Exporter
So You Want to Write an Exporter
 
c++ referesher 1.pdf
c++ referesher 1.pdfc++ referesher 1.pdf
c++ referesher 1.pdf
 
Oracle D2K reports
Oracle D2K reports Oracle D2K reports
Oracle D2K reports
 
Building Services With gRPC, Docker and Go
Building Services With gRPC, Docker and GoBuilding Services With gRPC, Docker and Go
Building Services With gRPC, Docker and Go
 
PHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & Pinba
 
Ab ap faq
Ab ap faqAb ap faq
Ab ap faq
 
Java Data Migration with Data Pipeline
Java Data Migration with Data PipelineJava Data Migration with Data Pipeline
Java Data Migration with Data Pipeline
 
Lecture 3.mte 407
Lecture 3.mte 407Lecture 3.mte 407
Lecture 3.mte 407
 
C++ Programming Class Creation Program Assignment Instructions
C++ Programming Class Creation Program Assignment InstructionsC++ Programming Class Creation Program Assignment Instructions
C++ Programming Class Creation Program Assignment Instructions
 
An Introduction To C++Templates
An Introduction To C++TemplatesAn Introduction To C++Templates
An Introduction To C++Templates
 
Lesson 2 data preprocessing
Lesson 2   data preprocessingLesson 2   data preprocessing
Lesson 2 data preprocessing
 

More from Mark Ginnebaugh

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Mark Ginnebaugh
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Mark Ginnebaugh
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataMark Ginnebaugh
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMark Ginnebaugh
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerMark Ginnebaugh
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsMark Ginnebaugh
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Mark Ginnebaugh
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMark Ginnebaugh
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopMark Ginnebaugh
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMark Ginnebaugh
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Mark Ginnebaugh
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMark Ginnebaugh
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Mark Ginnebaugh
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012Mark Ginnebaugh
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Mark Ginnebaugh
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesMark Ginnebaugh
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Mark Ginnebaugh
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMark Ginnebaugh
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMark Ginnebaugh
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMark Ginnebaugh
 

More from Mark Ginnebaugh (20)

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big Data
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary Keys
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL Server
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetings
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & Hadoop
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join Operators
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best Practices
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud Ready
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data Services
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivot
 

Recently uploaded

Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
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
 

Recently uploaded (20)

Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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 ...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
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
 

Coding T-SQL in a Team Environment

  • 1. Coding T-SQL in a Team T- Environment Garth Honhart Silicon Valley SQL Server User Group November 17, 2009 Mark Ginnebaugh, User Group Leader
  • 2. Before I Get Started…News Released Today SQL Server 2008 Cumulative Update #8 SQL Server 2008 Cumulative Update #5 Recently Released SQL Server 2008 R2 November CTP Office 2010 Beta (64-bit Client & PowerPivot!) From PDC Microsoft Pinpoint: Codename “Dallas” Cloud based datasets, such as demographic and sales information. Think of it as the un-federated portion of the data that would be used when performing a PowerPivot.
  • 3. Garth Honhart • RF-4C (1960’s era Reconnaissance Aircraft) • A-10 (Desert Storm Scud Hunters) • Airmail Terminal Frankfurt (Yes, I know how to go postal) USAF • U-2 (1950’s era Reconnaissance Aircraft…and they’re still flying) • Global Metrology Reporting via Access & ASP 1.0 • Tandem Reporting Via FrontPage based Intranet (CGI) • Learning Management Deferred Revenue Reporting (SQL 2000/ASP Web 3.0) • Data Quality and Business Rule Validation (HRIS:IDM:LMS) using SSIS • Web Portal Reporting system Internal and Commercial sites based on Web Logic / Tea Leaf using SSIS & SSRS BI • Soup to Nuts BI infrastructure implementation. Full Microsoft BI Stack.
  • 4. Agenda Challenges of developing T-SQL in a team environment. A Scenario Commonly used tools and their benefits Point out development short cuts that can lead to bad habits Open discussion on how different organizations approach the challenge.
  • 5. Please Mind the Gap Gap or Chasm? Depends on where the T-SQL you’re coding resides. If it is going into production, you are going to make it a stored procedure, aren’t you? What about development that happens before code is folded into a larger project?
  • 6. Scenario Company initiates a BI effort, albeit with a very limited budget. “Team” consists of one FTE and one contractor. Initial Focus is formalizing reports using SQL Server Reporting Services. No source control. No collaborative development. Approach? Single threaded development.
  • 7. (Code Examples Two Man Crew) select a.title, a.type, a.price, c.au_fname, c.au_lname from titles a, titleauthor b, authors c where a.title_id = b.title_id and c.au_id=b.au_id order by 3,2,1,5,4 Contractor 1 select t.title, t.type, t.price, a.au_fname, a.au_lname from titles t, titleauthor ta, authors a where t.title_id = ta.title_id and a.au_id=ta.au_id order by t.price, t.type, t.title, a.au_lname, a.au_fname FTE 1
  • 8. Phase Two Company adds funding for additional full time positions. Company also switches preferred contractors. New team is three FTE and three contractors, one on site, two off shore. Primary development focus is still SSRS, but will also include ETL via Integration Services.
  • 9. (Coding Styles 2) select select t.title, t.type, t.title as BookTitle t.price, ,t.type as TitleType a.au_fname, ,t.price as TitlePrice a.au_lname ,a.au_lname + ', ' + a.au_fname as from AuthorName titles t from titles as t inner join titleauthor ta on t.title_id = ta.title_id inner join inner join authors a (titleauthor as ta on ta.au_id=a.au_id inner join order by authors as a on ta.au_id=a.au_id t.price, ) on t.title_id = ta.title_id t.type, order by t.price, t.type, t.title, a.au_lname, t.title, a.au_fname a.au_lname, a.au_fname Contractor 2 FTE 2
  • 10. Common (Bad) Shortcuts ANSI-89 Style Joins Table Aliases (a, b, c or t1,t2,t3) Order by ordinal select a.title, a.type, a.price, c.au_fname, c.au_lname from titles a, titleauthor b, authors c where a.title_id = b.title_id and c.au_id=b.au_id order by 3,2,1,5,4
  • 11. Tips and Tools Settle on common table aliases, publish and keep them up to date. Decide what format works best for your team. Use a formatting tool.
  • 12. Demo
  • 13. Other Tools that Format Toad for SQL Server (Quest). Does a whole lot more than just formatting. http://www.quest.com/toad-for-sql-server/ SQL Pretty Printer. Integrates with SSMS, just does formatting. Desktop version (free trial) or browser based. http://www.dpriver.com/index.php
  • 14. Links T-SQL Formatting Standards (Coding Standards) – Robert Sheldon Simple Talk http://www.simple-talk.com/sql/t-sql- programming/transact-sql-formatting-standards- (coding-styles)/ Deprecated Database Engine Features in SQL Server 2008 http://msdn.microsoft.com/en- us/library/ms143729.aspx Aaron Bertrand’s Bad Habits to Kick http://sqlblog.com/blogs/aaron_bertrand/archive/tag s/best+practices/default.aspx
  • 15. www.bayareasql.org To learn more or to inquire about speaking opportunities, please contact: Mark Ginnebaugh, User Group Leader mark@designmind.com