Quantcast
Channel: Theory and design - Simple Talk
Browsing all 17 articles
Browse latest View live

The NTILE Function

The SQL NTILE() is a window function that allows you to break a table into a specified number of approximately equal groups, or <bucket count>. For each row in a grouping, the NTILE() function...

View Article


When an update doesn’t update

Tell me if you’ve heard this one before: I changed data from my application, but when I checked the database, I couldn’t see the change! I’ve seen this. Loads. It can be quite perplexing for folks...

View Article

Image may be NSFW.
Clik here to view.

Using a SQL Tokenizer

Imagine this: you have several directories full of SQL script files, and you need to know where a certain table is used. You’d rather like the context too, so you can check the whole SQL Expression and...

View Article

Image may be NSFW.
Clik here to view.

Eager Aggregation in SQL queries

Aggregation is a widely used way to summarize the content of a database. It is usually expressed with GROUP BY clause or just using aggregate functions (like COUNT or SUM). When the database engine...

View Article

Image may be NSFW.
Clik here to view.

Two-Dimensional Interval Packing Challenge

Packing intervals is a classic SQL task that involves packing groups of intersecting intervals to their respective continuous intervals. In mathematics, an interval is the subset of all values of a...

View Article


Department of Redundancy Department

Ever wonder all the reasons that we use databases instead of file systems? While we don’t think of it too much anymore, the first reason that databases came into existence was to remove redundancies....

View Article

SQL Logic

In this article, I will discuss the history and thinking behind several types of logic that are typically associated with writing relational database code. Because of how relational databases implement...

View Article

Image may be NSFW.
Clik here to view.

Database Subsetting and Data Extraction

Let’s start by defining a subset and why you would require a data subset? When dealing with the development, testing and releasing of new versions of an existing production database, developers like to...

View Article


The CHECK() Constraint

One of the many ways a relational table differs from the file structures used by pre-relational storage systems is that the tables, rows and columns can have constraints on them. This allows you to...

View Article


Concepts and Issues in Test Data Generation

Data generation is the science and art of providing data for database development work that is as realistic and controllable as possible. The skills of generating realistic data are an essential part...

View Article

LIKE Constraints

In this article, I will cover a bit about the LIKE operator, including how it works, and a bit of history about why it is like it is. After establishing this, I will discuss a bit about how you can...

View Article

Bad Data and Dirty Databases

Many years ago, my wife and I wrote an article for Datamation, a major trade publication at the time, under the title, “Don’t Warehouse Dirty Data!” It’s been referenced quite a few times over the...

View Article

Uniqueness, Keys, and Identity

If you’ve ever had a traditional logic course, you’ll have run into “The Law of Identity” as the founding principle of all Western thought. It says that: “To be is to be something in particular; to be...

View Article


Image may be NSFW.
Clik here to view.

Database Sharding: Strategies for Seamless Scaling and Performance Optimization

Companies of all sizes and across industries are struggling to cope with an explosion of data never before seen in the short history of computing. As applications reach new levels of sophistication...

View Article

Rounding Numbers

I would hope by now everybody has figured out when you see a price like $39.99 that it might as well be forty bucks. Dropping that penny from the price is done is to fool the consumer! Since we read...

View Article


Consistency and Concurrency in NewSQL Database Systems

Companies today require database systems that are reliable and capable of efficiently handling large volumes of data and numerous transactions. Traditional relational databases, once the foundation of...

View Article

Transactions

By now, pretty much everyone has heard the stories about the first computers. They were huge, cost a fortune, required incredible amounts of air conditioning, and perhaps more importantly, ran batch...

View Article

Browsing all 17 articles
Browse latest View live