database




6 Things I Learned Moving to PostgreSQL

Let me say before I begin that my move to Postgres has been nothing but great. Syntax wise Postgres is very similar SQL to that you are already familiar with. Feature wise you would probably compare it with an enterprise level database. To add to the good news you probably …



Postgres Gets JSON Type in 9.2

Pretty exciting news that Postgres will be getting a JSON type in 9.2. I have to admit I rarely stray from the standard numeric, string, and timestamps, but this could be very useful. I could see this being used similiar to how some setups serialize php sessions for database …



Return Multiple Result Sets with PHP and PostgreSQL Functions

A while back I discussed how to use the new sqlsrv extension for php to retrieve multiple result sets at a time from stored proceedures. This was indeed helpful when you need to retrieve related data and avoid multiple calls to stored proceedures. The down side is this was using …



Select Substring Using RegEx in PostgreSQL

I thought of another handy scenario for using regular expressions in Postgres. This time not within the conditions, but in the returned results. Lets say for instance you have a column with URL, (maybe blog comments or something) and you would like to get a list of all the domain …



CakePHP, PostgreSQL, and Regex

I was playing with cake and postgresql when I decided I needed to do a search. Sure a classic '%' search would have been sufficient, but we all know I love using regular expressions in sql. Well come to find out it doesn't seem that CakePHP likes PostgreSQL's syntax when using …



Connect to SQL Server from Ubuntu: Part II

A few posts ago I explained how you can connect Ubuntu to SQL Server for PHP. All worked well until you tried to execute stored procedures. (It worked fine if you wrote the query, but not so much with mssql_execute() function). It would result in an error like this: Warning …



Should ODBC Classes have a Syntax Layer?

I don't prefer using an ODBC datasource, but sometimes it is the easiest way to gain access to a database. Often times when using frameworks(php, not sure about others) an odbc option is available, however who knows if it will deliver sql compatible with the database we're trying to …



What Happens with MySQL? VirtualBox? Java?

As I'm sure everyone has heard Oracle has bought Sun Microsystems. As a linux user this could have a very big impact on my everyday computing. Sun produces atleast three products off the top of my head which I use every single day: MySQL, VirtualBox, and Java. There are probably …



Exploring Various SQL RegEx Syntax

This is part two of my quest to Incorporating Regex into ORM's and Database Abstractions. My first steps to exploring the option to implement uniform regex support into my own database orm/abstraction is to compare the syntax of the more popular database systems. To do so I will build …



Incorporating Regex into ORM's and Database Abstractions

Almost on a daily basis I come across using regular expressions rather convenient. I first toyed with regular expressions in my Compiler Design classes during my undergrad studies, and little did I know they can be used for everyday things like submitting forms. I've even toyed with them to create …