Category Archives: SQLite

New Stack Exchange

I’ve been active on Stack Overflow for a while, now there is a new Stack Exchange for DBAs that I have participated in the beta for. Now it’s open to the public, so knock yourselves out! I really need to … Continue reading

Posted in Oracle, SQLite | 1 Comment

Scope in database code (2)

Following on from a previous post, here is some simple database code in hopefully idiomatic Haskell. My strategy is Use the Reader monad to pass the database connection around the functions that use it. The description, computations which read values … Continue reading

Posted in Haskell, SQLite | 7 Comments

Scope in database code

When dealing with relational databases, there are three major types of data structure/objects that we need. The actual names vary between platform and API, but generally there will be, in order of creation: A connection. This is often called lda … Continue reading

Posted in Haskell, Ocaml, Oracle, SQLite | 4 Comments

Analyzing logfiles (2)

Following on from yesterday’s post, here is a similar tool implemented in Haskell. This one is to process a log format we use for various applications, which is <timestamp>: key1=value1 key2=value2 … keyn=valuen There may be any number of keys, … Continue reading

Posted in Haskell, Ocaml, SQLite | 3 Comments

Analyzing logfiles (1)

One powerful technique I often use is to quickly load application or system logs into throwaway SQLite databases for analysis. This means I can easily run queries such as, how many times has event X occurred broken down by hour, … Continue reading

Posted in Linux, Ocaml, SQLite | 4 Comments