O'Reilly logo

Effective SQL: 61 Specific Ways to Write Better SQL, First Edition by Ben G. Clothier, Douglas J. Steele, John L. Viescas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

1. Data Model Design

“You can’t make a silk purse out of a sow’s ear.” This famous saying, attributed to English satirist Stephen Gosson in 1579, certainly applies to databases. You cannot begin to write “effective” SQL when you’re working with a bad data model design. When your data model is not properly normalized with correct relationships defined, you will find it difficult, if not impossible, to extract meaningful information from the data using SQL. This chapter covers the basics of good relational model design. If your database design violates any of the rules discussed here, you need to figure out what is wrong and fix it.

If the design is not under your control, you will at least gain the understanding of why you are having such difficulty ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required