Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 10 of 39 10 Older Entries

Displaying posts with tag: design (reset)

How to structure and design a relational database to support you data storage needs?
+0 Vote Up -0Vote Down

Well, every now and then, when we began to start a new project or app, which has some data storage requirement, we have a deep intriguing thought as to how best represent the data structure so as to support a variety of needs including but not limited to (ACID rules):

1. Normalization
2. Reliability
3. Consistency
4. And many others

Below, I provide a set of steps which you can follow to arrive at a data model that correctly suites your requirements.

Steps:

1. Identify the project or app requirements / …










  [Read more...]
Reports exaggerated
Employee +1 Vote Up -0Vote Down

I've been letting the blog rest recently, and not so recently as well.  The problem is not a lack of subjects, but a lack of time to do them any justice.  However it is quite sad to see that my last entry was in September 2012, so it is time to post again.

Of late I have been pondering what I have to say about :

  • Distributed MVCC and write-scaling
  • Different approaches to eventual consistency with replicated RDBMS
  • Various MySQL Cluster related topics
  • Various general rambling and unstructured topics

However, these will take some time to percolate and calcify. …




  [Read more...]
Parallel replication: off by one
+2 Vote Up -0Vote Down

One of the most common errors in development is where a loop or a retrieval by index falls short or long by one unit, usually because of an oversight or a logic in coding.

Of the following snippets, which one will run 10 times?

/* #1 */    for (N = 0 ; N < 10; N++) printf("%d\n", N);

/* #2 */ for (N = 0 ; N <= 10; N++) printf("%d\n", N);

/* #3 */ for (N = 1 ; N <= 10; N++) printf("%d\n", N);

/* #4 */ for (N = 1 ; N < 10; N++) printf("%d\n", N);

The question is deceptive, as there are two snippets that will run 10 times (1 and 3). But they will print different …








  [Read more...]
MySQL Workbench 6.0 - New Design and Many Enhancements
Employee_Team +5 Vote Up -0Vote Down

New GUI, 30+ New Features, and Major New Components

Oracle is excited to announce the immediate availability of the production-read, GA release of MySQL Workbench 6.0, available for download under the GPL, as well as part of the Commercial MySQL Standard, Enterprise, and Cluster Carrier Grade Editions with 24x7 global support.

The need by database professionals for management tools has increased with expanding data volumes, web, cloud and mobile computing growth. Improvement and additions in MySQL Workbench helps developers and administrators better manage these dynamic data environments. This latest GA release includes many new features and a …

  [Read more...]
Implementing efficient Geo IP location system in MySQL
+0 Vote Up -0Vote Down

Often application needs to know where a user is physically located. The easiest way to figure that out is by looking up their IP address in a special database. It can all be implemented in MySQL, but I often see it done inefficiently. In my post I will show how to implement a complete solution that offers great performance.

Importing Geo IP data

First you will require a database mapping network addresses to real locations. There are various resources available, but I chose the one nginx web server uses with its geoip module. GeoLite …

  [Read more...]
(My)SQL mistakes. Do you use GROUP BY correctly?
+2 Vote Up -0Vote Down

Often I see a SQL problem solved incorrectly and I do not mean inefficiently. Simply incorrectly. In many cases the developer remains unaware that they aren’t getting the results they were expecting or even if a result is correct, it is only by chance, for example because the database engine was smart enough to figure out some non-sense in a query. In a few posts I will try to disclose some of the more common problems.

Aggregate with GROUP BY

Unlike many other database systems, MySQL actually permits that an aggregate query returns columns not used in the aggregation (i.e. not listed in GROUP BY clause). It …

  [Read more...]
The CAP theorem and MySQL Cluster
Employee +8 Vote Up -0Vote Down

tldr; A single MySQL Cluster prioritises Consistency in Network partition events. Asynchronously replicating MySQL Clusters prioritise Availability in Network partition events.

I was recently asked about the relationship between MySQL Cluster and the CAP theorem. The CAP theorem is often described as a pick two out of three problem, such as choosing from good, cheap, fast. You can have any two, but you can't have all three. For CAP the three qualities are 'Consistency', 'Availability' and 'Partition tolerance'. CAP states that in a system with data replicated over a …

  [Read more...]
One billion
Employee +5 Vote Up -0Vote Down

As always, I am a little late, but I want to jump on the bandwagon and mention the recent MySQL Cluster milestone of passing 1 billion queries per minute. Apart from echoing the arbitrarily large ransom demand of Dr Evil, what does this mean?

Obviously 1 billion is only of interest to us humans as we generally happen to have 10 fingers, and seem to name multiples in steps of 10^3 for some reason. Each processor involved in this benchmark is clocked at several billion …

  [Read more...]
Eventual Consistency in MySQL Cluster - implementation part 3
Employee +3 Vote Up -0Vote Down




As promised, this is the final post in a series looking at eventual consistency with MySQL Cluster asynchronous replication. This time I'll describe the transaction dependency tracking used with NDB$EPOCH_TRANS and review some of the implementation properties.

Transaction based conflict handling with NDB$EPOCH_TRANS

NDB$EPOCH_TRANS is almost exactly the same as NDB$EPOCH, except that when a conflict is detected on a row, the whole user transaction which made the …






  [Read more...]
Eventual consistency in MySQL Cluster - implementation part 2
Employee +5 Vote Up -0Vote Down




In previous posts I described how row conflicts are detected using epochs. In this post I describe how they are handled.

Row based conflict handling with NDB$EPOCH

Once a row conflict is detected, as well as rejecting the row change, row based conflict handling in the Slave will :

  • Increment conflict counters
  • Optionally insert a row into an exceptions table

For NDB$EPOCH, conflict detection and handling operates on …










  [Read more...]
Showing entries 1 to 10 of 39 10 Older Entries

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.