• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

To Lynn Beighley : What are the most common mistakes developers do ?

 
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lynn,

As an expert you are, in your opinion, what are the most common mistakes developers do when submitting SQL statements to database and how can we avoid that ?

and ...

In your whole career, I'm just curious to know what is the most bizar SQL mistake you have ever seen.

Best Regards,
Edisandro Bessa.
[ October 19, 2007: Message edited by: Edisandro Bessa ]
 
author
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not the SQL statements that are submitted that are usually a problem. If your tables are designed correctly, in general there aren't all that many options for how to get at your data. The variations in SQL commands can cause your processes to be slower, but that's something that can be tested and fine tuned.

I think the biggest problem many developers encounter when first using SQL is not taking the time to understand normalization and having a tendency to build ugly, unnormalized tables that cause them pain as they actually try to use them. For example, there's a thread somewhere on this board from yesterday when someone was asking how to remove duplicate records, something that can only happen when your table is poorly designed.

And those of you who have taken over a database from someone who didn't know what they were doing also get to feel the pain of poor execution.

Nothing particularly bizarre stands out, except for a few really badly designed tables. Recently I encountered duplicate data, non-atomic data, miscast data types, all in a single, misbegotten table. Horrible!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lynn Beighley:
It's not the SQL statements that are submitted that are usually a problem. If your tables are designed correctly, in general there aren't all that many options for how to get at your data. The variations in SQL commands can cause your processes to be slower, but that's something that can be tested and fine tuned.


Definitely!

Even on a well designed table, I find lack of indexes to be a problem. In a table with millions of rows, the difference can be significant. Some developers know SQL, but not databases and aren't aware of this or consider it the DBA's job.
 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lynn Beighley:
For example, there's a thread somewhere on this board from yesterday when someone was asking how to remove duplicate records, something that can only happen when your table is poorly designed.



Actually while he had duplicate data, he did not have duplicate keys... that doesn't necessarily imply he had encountered a data base design problem.
 
Lynn Beighley
author
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are correct, Paul.
 
Our first order of business must be this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic