Caching could be the last thing you want to do
Of Camels and People: Converting back and forth from Camel Case, Pascal Case to underscore lower case
When it comes to naming things in databases and languages, there are various common standards. For many languages the camel family of namings is very popular. For unix based databases usually UPPER or lower _ is the choice and for databases such as SQL Server and MySQL which allow you to name your columns with mixed casing but could care less what case you express them in selects, you get a mish mush of styles depending on what camp the database user originated from.
So to summarize the key styles and the family of people
- camelCase : lastName - employed by Java and Flex and C and various other C style languages, sometimes PHP developers.
- Pascal Case: (a variant of Camel Case) -- LastName which is employed by C#, VB.NET, Pascal (and Delphi), and SQL Server (and some MySQL windows converts)
- lower case _ last_name : a favorite among PostgreSQL database users. (some MySQL)
- upper case _ LAST_NAME : a favorite among Oracle Users (some MySQL Oracle defectors)
Being at the cross roads of all the above, we often have to deal with the various above as well as having internal schizophrenic strife and external fights. The internal turmoil is the worst and is worse than an ambidextrous person trying to figure out which hand to use in battle. For these exercises, we'll demonstrate one way how to convert between the various conventions. These are the first thoughts that came to our mind, so may not be the most elegant.
Continue reading "Of Camels and People: Converting back and forth from Camel Case, Pascal Case to underscore lower case"
PGDay.EU announced and call for papers
PGDay.EU 2010 has finally been announced. It will be in Stuttgart, Germany, on December 6th to 8th. More details available on the conference website.
We have also sent out our call for papers. If you have done something interesting with PostgreSQL, please go ahead and submit a talk! We are currently looking for talks in both English and German!
Fuzzy string matching with Trigram and Trigraphs
In an earlier article Where is Soundex and other Fuzzy string things we covered the PostgreSQL contrib module fuzzstrmatch which contains the very popular function soundex that is found in other popular relational databases. We also covered the more powerful levenshtein distance, metaphone and dmetaphone functions included in fuzzstrmatch, but rarely found in other relational databases.
As far as fuzzy string matching goes, PostgreSQL has other functions up its sleeves. This time we will cover the contrib module pg_trgm which was introduced in PostgreSQL 8.3. pgtrgm uses a concept called trigrams for doing string comparisons. The pg_trgm module has several functions and gist/gin operators. Like other contrib modules, you just need to run the /share/contrib/pg_trgm.sql file packaged in your PostgreSQL install to enable it in your database.
For this set of exercises, we'll use trigrams to compare words using the same set of data we tested with soundex and metaphones. For the next set of exercises, we will be using the places dataset we created in Importing Fixed width data into PostgreSQL with just PSQL.
The most useful are the similarity function and the % operator. The % operator allows for using a GIST/GIN index and the similarity function allows for narrowing your filter similar to what levenshtein did for us in fuzzstrmatch.
Continue reading "Fuzzy string matching with Trigram and Trigraphs"
Estimating Replication Capacity
Real Android apps leveraging db4o persistence engine (Part 1)
This the first delivery in a series of articles targeted at showing developers how db4o (an open source database that leverages today's object-oriented languages, systems, and mindset) is being used in several Android projects to avoid all the pitfalls and hassles of object-relational mapping while benefiting from an elegant and straight forward way to evolve a domain model which, in the end, translates into faster, easier upgrades for users.
More: http://java.dzone.com/articles/leverage-db4o-your-android
Release Notes 8.0.156
Release Notes 7.12.156
SSD: Free space and write performance
Analyzing the distribution of InnoDB log file writes
Postgres Coming to the International Space Station
An email list posting this week revealed that Postgres will be
used on the International Space Station by the end of the year,
specifically "to store the data on orbit and then replicate that db on the ground". Postgres has always been heavily used by
NASA and other government agencies, but this is a uniquely "high"-profile use of Postgres.
Data mart or data warehouse?
On Benchmarks on SSD
SLC vs MLC
Join us at ICOODB 2010 !!!
ICOODB 2010 is approaching and we'll be there helping promote object database technology. Please join us!
Here are the details for the event:
3rd International Conference on Objects and Databases
September 28-30, 2010
Frankfurt am Main, Germany
2 tutorials, 1 workshop, 10 research papers, 10 industry
presentations, Â 3 keynotes and 1 keynote panel...
(continues...)