---
title: "More Lookup table techniques"
url: "https://osherove.com/blog/2004/2/21/more-lookup-table-techniques.md"
canonical: "https://osherove.com/blog/2004/2/21/more-lookup-table-techniques.html"
published: "2004-02-21T22:49:00"
updated: "2004-02-21T22:49:00"
tags: [".Net Quotations"]
author: "Roy Osherove"
description: "Richard posts about a few different ways (and some of them are news to me) to avoid using a simple lookup table and relation in your DB for silly stuff like Gender(Male,female,unknown) or daysOfWeek. Really interesting.…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# More Lookup table techniques

By Roy Osherove February 21, 2004 In [.Net Quotations](https://osherove.com/blog/category/net-quotations)

**Historical article** · Originally published February 21, 2004; technical details may be outdated.

[Richard posts about a few different ways](http://www.tallent.us/PermaLink.aspx?guid=4aa1a488-fa83-4df5-83e8-a2b218e75d75) (and some of them are news to me) to avoid using a simple lookup table and relation in your DB for silly stuff like Gender(Male,female,unknown) or daysOfWeek.

Really interesting. I must say that I've always used the lookup table+ relation approach, simply because I did not know better. Next time I do this,I'll keep these ways in mind.

Now, here's a tough question: Have you ever seen these ways explained in a book about data access or database manipulation techniques? I have'nt. Have I been reading the wrong books? which books do **you** recommend to learn about “real world” stuff such as this? Especially SQL server.

## More in .Net Quotations

[All posts in .Net Quotations](https://osherove.com/blog/category/net-quotations)

- Feb 22, 2004

    ### [Pair Programming analysis - illuminating!](https://osherove.com/blog/2004/2/22/pair-programming-analysis-illuminating.html)

- Feb 22, 2004

    ### [\[Cool Tool\] CodeSmith 2.5](https://osherove.com/blog/2004/2/22/cool-tool-codesmith-25.html)

- Feb 18, 2004

    ### [The .Net debugging experience - you can help make a difference](https://osherove.com/blog/2004/2/18/the-net-debugging-experience-you-can-help-make-a-difference.html)

- Feb 18, 2004

    ### [VS.Net multi language bug - 2.5 years and still going strong?](https://osherove.com/blog/2004/2/18/vsnet-multi-language-bug-25-years-and-still-going-strong.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
