Diagramming the PokerTracker 3 Database

Wednesday, March 25, 2009

30 tables. 1000+ columns.* Millions of rows. I invite anybody who thinks poker is a shallow game of chance to spend a few hours swimming through a decently-sized PokerTracker 3 database.

The PokerTracker 3 Database Schema

Now I know what you're thinking...

Is that a color-coded diagram of the PokerTracker 3 database schema in your pocket, or are you just happy to see me?

...and watch out. You already know I love diagrams, and I actually have a poster-sized version of this one hanging above my desk. I got tired of consulting the mammoth PokerTracker 3 PostgreSQL Database Schema Documentation PDF every time I needed to look up a column name (the PT3PQDBSDPDF is a great reference, but it's still a reference; a tome). I found myself wanting more of a Where's Waldo?-style cheat sheet, and I couldn't find one, so I built one and tacked it to the wall.

Feel free to download the original Visio document and, if anybody ever tells you "poker is just a gambling game," you can thwap them over the head with it (make sure to roll it up first). Said diagram might also come in handy if you do a lot of advanced/custom PokerTracker work:

  • Custom statistics
  • Fancy HUD layouts
  • PokerTracker programming

It's also good for wrapping fish, starting fires, creating aerodynamically superior paper airplanes, that sort of thing. Enjoy.

(By the way, if you're curious how the above diagram was generated: I installed psqlODBC, the PostgreSQL ODBC driver, created a data source, attached Microsoft Visio to that data source, and had it extract the tables. The layouting, color-coding, and annotations were performed by hand.)

* - The exact number of columns will vary from installation to installation, depending on cached statistics.

Tags: Visio, PokerTracker, online poker, poker

33 comment(s)

I read your blog mainly because of the graphics. Your writing ranges from excellent to terrible but the graphics are always nice. This will actually come in handy.

Awesome, glad to see you're back. Any chance of getting one of these for Hold'em Manager? OR is that heresy.....

Love the suggestion about thwapping the non-believers over the head with a rolled-up copy of the PT3 db schema. Where the hell is John Kyl when you need him.

James, James, James. You have to start posting more often. Not every post has to be an epic 40-page long coding/techie post. Just keep the poker/comp sci. mix flowing even and steady because its great stuff. Every time I sit down for a session of online poker (EVERY) I check out your blog. When Ive got some poker, some programming, some new Coding the Wheel, maybe some 2+2 for good measure, I'm like a pig in shit. I'm an elephant in the mud. I'm a troll cavorting happily under the bridge.

Please no more month-long breaks in content. Nobody's forcing you to post anything, but you obviously enjoy it. I don't know what they've got you doing or whether you work, but you need to consider blogging/writing full time.

Just my .02. By the way, I'm still waiting for the 2nd half of the last post.

Huzzah!

Great post. I was just looking at trying to mimick the poker tracker database (albeit for version 2) for my own handhistry recording app (because i'm too cheap to buy it). I'm sure this will be quite a handy reference. I didnt even know they had released the schema, i was trawling through access databases for days, trying to create something similar, yet less bloated.

Watch out, more bot detection coming from your second favorite poker site.......

What's the point of including the holdemcache and tourneyholdem_cache tables in the diagram? Those (as you pointed) out are going to change from user to user anyway..

Great diagram though! Downloaded. And printed.

The PT3 DB Schema is great save for the dead fields such as idxhandstrength and idxkickerstrength and random errors in the holdemhandplayer_detail table Grrr...

Never checked up Hold'em Manager -- too much sunk cost memorizing this lovely schema.

So unfortunate that you do not reply to your emails.

Love your stuff though. This poker series is awesome. Keep it coming. Because I, and many others, really love it!

Oh and btw, I can see where this is going with this poker tracker icw the poker bot. Very neat. It's gonna be better and better in this way!

Wow, what a mess. And here, I thought my poker tracking database was complicated.

Have to disagree with Kevin H.

Looks like an everyday normalized relational database to me.

Similar to 90% of what's out there in production.

I muck through these for 8 hours a day.

God I hate my life.

Just noticed the quote in the bottom-right corner of the Visio diagram. Had to zoom in to read it.

Poker Tracker 3 is teh awesome. I'll sift my way through this and get it printed out asap. Thanks a lot.

I think calling it normalized is a bit of a stretch.

Beer Me: Normalized? That isn't even in second normal form.

A Attribute/Entity model would be useful here in adding flexibility and reducing complexity.

It could be in fourteenth normal form for all I know or care. I'm a working hack, not a relational database virtuosi. They hired me because I know how to do a JOIN. And because Im awsome.

Anybody know of a version of this for Hold'em Manager?

It would be easy enough to build your own, just extract the tables into Visio or another reverse eng. tool as the author described.

Life is easier with that stuff :)

This thing has saved me hours of work already. Thanks. A huge help.

wow

While i prefer Holdem Manager over Pokertracker 3 the diagramm is really impressive, goes to show how important pokerhuds are today.

I've looked at your schema, fpdb schema and some others, and they have few common attributes: they are very complicated and hard to understand, have way too many attributes per table, and contain the poker table history and its derived statistical logic in the same place. Where is the separation, decoupling and many more good programming skills that you've demonstrated so far? Or it is out of scope for database planning?

What about enabling ODBC trace feature?

Please notice that the size of the database doesn;t say much about poker complexity and the gambling aspect of it.

Imagine Rullette Tracker 7 with the database containing all possible stats for players like "doubled the bet on 27black after three straight red"

for a few minutes. When Putnam came up to his party he said "we drive them." Now let it be

4日の参院予算委員会では、小沢グループの奥村展三文部科学副大臣と中塚一宏内閣府副大臣が消費税法案に賛成する意向を表明した。奥村、中塚両氏は小沢元代表の意向に反し辞表を提出していない。

 首相は辞任した4人の後任について、消費税法案への賛否を確認した上で起用する方針だ。

super diagram i use it all the time. are you going to come up with similar stuff for pt 4 in near future, please?

BandipurI have read most of them and has a lot of them. Door Lintels To me, he's doing the great work.

CoonoorSimply put, it cannot pay promised future benefits with current levels of taxation.

You made some interesting points here and I really enjoyed to see your expressing your ideas.

Use the form below to leave a comment.






Coding the Wheel has appeared on the New York Time's Freakonomics blog, Jeff Atwood's Coding Horror, and the front page of Reddit, Slashdot, Digg.

On Twitter

Thanks for reading!

If you enjoyed this post, consider subscribing to Coding the Wheel by RSS or email. You can also follow us on Twitter and Facebook. And even if you didn't enjoy this post, better subscribe anyway. Keep an eye on us.

Question? Ask us.

About

Poker

Here there be Code. And poker. And technology, arrrr. And games. And...


Hire

You've read our technical articles, you've tolerated our rants and raves. Now you can hire us anytime, day or night, for any project large or small.

Learn more

We Like

Speculation, by Edmund Jorgensen.