Showing entries 1 to 10 of 339
10 Older Entries »
Displaying posts with tag: open-source (reset)
Tiny happy features in MySQL

I love it when software gives you elegant ways of solving your problem. Programming language designers make me feel like they care when they take the time to include succinct, powerful expressions. I’ve recently discovered some in new things in MySQL, as well as a few rediscoveries. This is the first five, and I’ll cover the next five in another article.


You’ve probably used the standard In operator before:

Select 'Oh yeah!' From dual Where 1 In (1,2,3);

As a side note, the dual table is just a dummy table that always returns one row. It’s useful for demonstrating language features or running experiments.

You can also use a subquery with In:

Select 1 From dual Where 1 In (Select 1);

The thing I discovered was that it’s not just scalar values: it’s actually comparing rows, so you can see if a row is present:

Select 1 From dual Where (1,2) In (Select 1,2); …
[Read more]
Inner vs. Outer Joins
3 rules for naming things in your database

They say there are two hard things in software development: cache invalidation, naming things, and off-by-one errors. Even though it seems like a simple thing, naming tables, columns, and stored procedures is hard when designing a SQL database. There are three simple rules I like to abide by when designing schema: give things meaningful names, be consistent, and favor verbosity over obscurity. Let’s expand each one of those points, and then I’ll cover some MySQL specific addendums.

Meaningful Names

The first part of this idea is to give objects unique, specific names. A table that is named Entities is going to confuse everyone. You want to name your table with the specific category of data or noun it represents. You can do tragical things to your database like have one giant table that’s just EntityID, Key, Value, but I don’t know why you’d use a relational database in that case!

Think of a table in terms of …

[Read more]
Designing Multi-Tenanted Databases – Hierarchies

In the previous article, we learned how you can design your database schema so that many customers can share one database and one set of tables. The examples I used were fairly simple: they consisted of single tables or simple hierarchies like the order and line item tables. In those examples, you had a single tenant id that segmented the tables. Now I’d like to introduce the idea of hierarchical segmentation. This is a pretty big term for the idea of allowing customers to see data based on where they are in a hierarchy, like an org chart.

Let’s say you have three sales teams each with its own manager for three regions in the US: East, Central, and West. A salesman in the East only gets to see his own prospects, while the East sales manager sees the prospects of the entire East sales team. At the very top, the VP of US Sales can access the …

[Read more]
Foreign Data Wrappers

Original images from Flickr user jenniferwilliams

One of our clients, for various historical reasons, runs both MySQL and PostgreSQL to support their website. Information for user login lives in one database, but their customer activity lives in the other. The eventual plan is to consolidate these databases, but thus far, other concerns have been more pressing. So when they needed a report combining user account information and customer activity, the involvement of two separate databases became a significant complicating factor.

In similar situations in the past, using earlier versions of PostgreSQL, we've written scripts to pull data from MySQL and dump it into PostgreSQL. This works well enough, but we've updated …

[Read more]
MySQL vs. SQL Server

A new company often means new responsibilities and learning new ways of doing things. For a tech guy, it often means picking up a new framework or maybe if you are a glutton for punishment, a new language. I recently switched OSes, languages, and databases as a DBA/DB Developer. This was quite a massive shift for me. I went from the stable, enterprise database, SQL Server, to the little engine that could, MySQL. Before the switch, I would stew over the fact that SQL Server lacked features in comparison to Oracle or Postgres, but now I realize that there are far better things to worry about (such as non-blocking backups). I just wanted to go over some of the differences I found.

  1. MySQL is a collection of binaries that manipulate data files. It is not a monolithic application that persists its data to disk, but instead it allows another process to manipulate its files even while it’s running. It interprets a folder in its data directory …
[Read more]
Living With Linux

I learned how to use a computer on DOS and Windows. My first programming projects were written in QBASIC and my first Web applications were written in VB using ASP on Windows 2000. The first job where I made decent money was developing a SQL Server-based application. I bought my first car, an engagement ring, and a honeymoon with money from making software on Windows. Needless to say, I found a lot of intellectual and financial fulfillment from Windows over the years.

That first real job also allowed me flexibility in what technology I could employ, and I helped implement a features using Redis on top of Ubuntu. This was a fun time, because my company basically paid me to study a new technology and to gain experience using it. On my own, I began to use Linux and to embrace open-source ideas, one of which is that the consumer is also the producer. I changed my mindset about what it means to use software: for open-source projects, it often …

[Read more]
Mixed signals in IT’s great war over IP

Recent news that Microsoft and Barnes & Noble agreed to partner on the Nook e-reader line rather than keep fighting over intellectual property suggests the prospect of more settlement and fewer IP suits in the industry. However, the deal further obscures the blurry IP and patent landscape currently impacting both enterprise IT and consumer technology.

It is good to see settlement — something I’ve been calling for, while also warning against patent and IP aggression. However, this settlment comes from the one conflict in this ongoing war that was actually shedding some light on the matter, rather than further complicating it.

See the full article at TechNewsWorld.

Open APIs are the new open source

We’ve seen the rise of open source software in the enterprise and also beyond the IT industry, but the real keys to openness and its advantages in today’s technology world — where efficient use of cloud computing and supporting services are paramount — exist in open application programming interfaces, or APIs.

Open source software continues to be a critical part of software development, systems administration, IT operations and more, but much of the action in leveraging modern cloud computing and services-based infrastructures centers on APIs. Open APIs are the new open source.

Read the full story at LinuxInsider.

CAOS Theory Podcast 2012.01.20

Topics for this podcast:

*Hadoop v1.0 and year ahead
*Oracle-Cloudera deal for more Hadoop
*Oracle’s ‘Sun spot’ with Solaris
*Open Source M&A outlook for 2012
*Our new MySQL/NoSQL/NewSQL survey

iTunes or direct download (28:49, 4.9MB)

Showing entries 1 to 10 of 339
10 Older Entries »