I get asked all the time, “how should I go about introducing an open source database in my shop?” So I figured it would be good for me to address this briefly in my most recent column that I write for database trends and applications magazine. I list the top three avenues that I’ve seen DB professionals use to get an open source database in play in their organization. Of course, there are other reasons it’s good to get an open source database like PostgreSQL in the IT mix, but the three I list are the most common.
When is the right time for an open source database?Archive for the ‘postgresql’ Category
Oracle/Sun not off to a good start with open source
Thursday, July 29th, 2010 by Jim MlodgenskiHot off the heels of Oracle stopping the PostgreSQL build farm servers for Solaris, Oracle released an automatic update for Java that rebrands the company name from Sun to Oracle which had the cascading effect of breaking Eclipse.
While I don’t think this is some sort of coordinated plan by Larry to bring down open source in general, I think this is indicative of the pain of integrating Sun in to Oracle and we can expect more of this in the future. On the positive side, I think the reactions by the PostgreSQL and Eclipse communities really highlight the power of the open source process. In both cases, the communities had solutions quickly in the wake of the mess created by Oracle.
Oracle/Sun not off to a good start with open sourceScala PostgreSQL Access
Thursday, July 8th, 2010 by Jim MlodgenskiRecently, I’ve been digging into Scala to understand how PostgreSQL would integrate inside of Scala code. Scala is an interesting language which runs on the JVM like Java but eliminates much of the Java boiler plate code increasing the productivity of developers. With many of the knowledgeable Java programmers advocating Scala and large success stories like Twitter becoming more common, there is a possibility that one day Scala will unseat Java and the dominate enterprise programming language in the future. Given this possibility, it is encouraging that PostgreSQL is respected in the Scala community, but unfortunately, what I’m finding, database persistence in general is still appears to be immature inside of Scala. There is an early module called DBC that attempts to provide database connectivity, but this initial attempt was lacking. Below is an example of running a simple query which I find very awkward:
object MainDBC {
import scala.dbc._
import scala.dbc.Syntax._
import syntax.Statement._
def main(args: Array[String]): Unit = {
val db = database("jdbc:postgresql://localhost/scala","postgres","password")
val res = db.executeStatement {
(select fields (("pgbench_tellers.tid" of integer)
and ("pgbench_tellers.bid" of integer)
and ("pgbench_branches.bbalance" of integer))
from "pgbench_tellers, pgbench_branches"
where "pgbench_tellers.bid = pgbench_branches.bid")
}
println(" tid bid bbalance")
println("----- ----- ----------")
for(val i <- res) {
for(val f <- i.fields) {
val r = f.content.sqlString
print(r + " ".dropRight(r.length))
}
println()
}
}
}
There are a number of object layers available that may be much easier to use, but the nice thing about Scala running on the JVM is that you can leverage the low level JDBC interface and eliminate much of the awkwardness. Below is an example of the same query but using JDBC.
object MainJDBC {
import java.sql.{Connection, DriverManager, ResultSet}
def main(args: Array[String]): Unit = {
classOf[org.postgresql.Driver]
val db = DriverManager.getConnection("jdbc:postgresql://localhost/scala","postgres","password")
val st = db.createStatement
val res = st.executeQuery(
"SELECT pgbench_tellers.tid, pgbench_tellers.bid, pgbench_branches.bbalance" +
" FROM pgbench_tellers, pgbench_branches " +
" WHERE pgbench_tellers.bid = pgbench_branches.bid")
println(" tid bid bbalance")
println("----- ----- ----------")
while (res.next) {
for(val i <- 1 to res.getMetaData.getColumnCount) {
val r = res.getInt(i).toString
print(r + " ".dropRight(r.length))
}
println
}
db.close
}
}
Scala PostgreSQL Access Postgres 9.1 – Release Theme
Thursday, April 1st, 2010 by Dave PagePG East: Hotel
Tuesday, March 30th, 2010 by Bruce MomjianPG East was an unqualified success, as others have already
blogged
about. This conference might signal a change in the style for dedicated Postgres conferences. Postgres-specific conferences started only
a few years ago, mostly at universities. I was one of the early proponents of having conferences at universities after seeing the success
of FOSDEM. I felt the low admission cost made possible with inexpensive university facilities was
critical in attracting the mostly-volunteer Postgres developers to the conference.
I am ready to rethink that suggestion having attended PG East. The conference cost only USD $125, and many things were definitely easier
having the event in a hotel:
- Informal conversations
- Attracting business users to the show
- Group excursions
- Laptop and bag storage
PG East: Slides
Tuesday, March 30th, 2010 by Bruce MomjianMy slides from PG East are now online, and I will be giving a
webcast of that presentation in late April. The presentation covers the new
Postgres 9.0 features of hot standby and streaming replication: how they work, how to configure them, and their current limitations. The
presentation also includes a live demonstration of setting up these features.
Speaking in New York City
Tuesday, March 30th, 2010 by Bruce MomjianI am speaking at New York PostgreSQL Meetup Group on April 20th about Postgres
replication solutions. This will be a much larger group than
previous New York City Postgres meetings; 13 people have already registered.
Getting ready for PG East
Tuesday, March 23rd, 2010 by Dave PageAfter a stressful few weeks keeping a close eye on the BA cabin crew strike, it seems that my flight is still scheduled so I will be able to get to Philadelphia for PG East 2010 without having to use my insanely expensive refundable backup ticket with US Airways.
9.0 Release Notes Ready
Saturday, March 20th, 2010 by Bruce MomjianI have completed the Postgres 9.0 release notes and you can view them
online. There will, of course, be many adjustments to the release
notes before 9.0 final.
PG East: What to Expect
Monday, March 15th, 2010 by Bruce MomjianThe upcoming PG East Conference is in my home town, Philadelphia. The
conference promises to be a new generation of Postgres conferences, and I want to highlight some of the changes that attendees can expect.
First, as I mentioned before, the
hotel venue for this conference is much nicer than typical Postgres conferences. Also, it is
located in an area of Philadelphia that is packed with great restaurants and shops.






