Showing entries 22751 to 22760 of 44965
« 10 Newer Entries | 10 Older Entries »
Data Dictionary VS Information Schema

By default Drizzle has two schemas in the local catalog.

drizzle> SHOW SCHEMAS \G
*************************** 1. row ***************************
Database: DATA_DICTIONARY
*************************** 2. row ***************************
Database: INFORMATION_SCHEMA
*************************** 3. row ***************************
Database: version_test
3 rows in set (0 sec)


The tables in INFORMATION_SCHEMA are just what is found in the ANSI SQL standard. We have added zero custom columns or tables to the schema, it is just the standard. The goal of this was to make it easy for tool vendors to support Drizzle via their current tools without having to make special exceptions for Drizzle. The tables are populated with information via Table Functions (which are completely new to Drizzle). Table Functions generate data on an as needed basis and do not materialize tables …

[Read more]
Data Dictionary VS Information Schema

By default Drizzle has two schemas in the local catalog.

drizzle> SHOW SCHEMAS \G
*************************** 1. row ***************************
Database: DATA_DICTIONARY
*************************** 2. row ***************************
Database: INFORMATION_SCHEMA
*************************** 3. row ***************************
Database: version_test
3 rows in set (0 sec)


The tables in INFORMATION_SCHEMA are just what is found in the ANSI SQL standard. We have added zero custom columns or tables to the schema, it is just the standard. The goal of this was to make it easy for tool vendors to support Drizzle via their current tools without having to make special exceptions for Drizzle. The tables are populated with information via Table Functions (which are completely new to Drizzle). Table Functions generate data on an as needed basis and do not materialize tables …

[Read more]
Paginación de resultados con Php y MySql

Ejemplo práctico de paginación de resultados en Php

<?php
mysql_connect("localhost", "root", "");
mysql_select_db("dev");
$noRegistros = 3; //Registros por página
$pagina = 1; //Por default, página = 1
if($_GET["pagina"]) //Si hay página por ?pagina=valor, lo asigna
    $pagina = $_GET["pagina"];
echo "Pagina: ".$pagina."<hr>";

//Utilizo el comando LIMIT para seleccionar registros
$sSQL = "SELECT * FROM alumnos LIMIT ".($pagina-1)*$noRegistros.",$noRegistros";
$result = mysql_query($sSQL) or die(mysql_error());
while($row = mysql_fetch_array($result)) { //Exploracion comun de registros
    echo $row["nombre"]."<br>";
}

//Imprimiendo páginas
$sSQL = "SELECT count(*) FROM alumnos"; //Cuento el total de registros
$result = mysql_query($sSQL);
$row = mysql_fetch_array($result);
$totalRegistros = $row["count(*)"]; //Almaceno el total en una variable

echo "<hr>Total registros: ".$totalRegistros.", Pagina: ";

$noPaginas = …
[Read more]
Sharing an auto_increment value across multiple MySQL tables

The title is SEO bait – you can’t do it. We’ve seen a few recurring patterns trying to achieve similar – and I thought I would share with you my favorite two:

Option #1: Use a table to insert into, and grab the insert_id:

CREATE TABLE option1 (id int not null primary key auto_increment) engine=innodb;

# each insert does one operations to get the value:
INSERT INTO option1 VALUES (NULL);
# $connection->insert_id();

Option #2: Use a table with one just row:

CREATE TABLE option2 (id int not null primary key) engine=innodb;
INSERT INTO option2 VALUES (1); # start from 1

# each insert does two operations to get the value:
UPDATE option2 SET id=@id:=id+1;
SELECT @id;

So which is better? I don’t think it’s that easy to tell at a first glance, since option 2 does look more elegant – but if the next value is fetched as part of a transaction – I can see a potential …

[Read more]
Innovating with Open Source: Call Center Services

The rise of open source software within both public and private organizations is something well understood, and well documented - industry analysts estimate 80%+ of organizations use open source software within their IT projects.

Typical uses include web infrastructure, internal network infrastructure, IT Development & Test environments and departmental applications.

But open source solutions are not restricted purely to these (very important) "horizontal" apps.  With the wealth of open source projects out there now, it is possible to build highly specialized solutions, addressing very specific problems, that previously could only be addressed with expensive and time consuming internal custom development.

A great example is from a new case study of …

[Read more]
Drizzle hint of the day, --help

Over lunch I was talking to a --name removed to protect the innocent-- and they were saying.

"I spent 30 minutes trying to figure out how to change the port address, and it turned out all I needed to do was use --help!"

For any of the drizzle command line applications or the server you can just do a

--help

To find documentation on any of the command line arguments all you need to do is ask the program.

We print out the help, and only the help. Pretty much any modern unix application follows this standard, but since mysql never did, is somewhat un-intuitive to find that it works :)

Drizzle hint of the day, --help

Over lunch I was talking to a --name removed to protect the innocent-- and they were saying.

"I spent 30 minutes trying to figure out how to change the port address, and it turned out all I needed to do was use --help!"

For any of the drizzle command line applications or the server you can just do a

--help

To find documentation on any of the command line arguments all you need to do is ask the program.

We print out the help, and only the help. Pretty much any modern unix application follows this standard, but since mysql never did, is somewhat un-intuitive to find that it works :)

Following High Performance MySQL’s hash index discussion

Mixing up some MySQL and SQL Server hacking activities can be fun. I’ve also noticed that when you work with different database platforms, it can bring additional clarity to certain concepts and techniques. One reason for that, I think, is that different terminologies and ways of explanations are used for people practicing on different platforms, and that tends to re-enforce or otherwise bring clarity to things that you may not have a good grasp to begin with.

Anyway, I am following Baron Schwartz et al’s High Performance MySQL book and thought the example of building your own hash index for URL lookup looks really useful and clever. On the topic of hash collison, the book discussed using words in /usr/share/dict/words as an example. By the way, High Performance MySQL 2nd Edition is a fantastic book, …

[Read more]
Friday Tips and Links #10: Grizzly Releases, JAX-RS and WebLogic, GWT, Spring or JavaEE

Recent Tips and News on Java EE 6 & GlassFish:

GlassFish

An Eclipse / GlassFish / Java EE 6 Tutorial
Using JAX-RS with JDeveloper and Weblogic
GlassFish 3 and Oracle 10g XE on Ubuntu Linux 9.10
Grizzly 1.0.38 has …

[Read more]
Thank you, everyone behind MySQL AB!

For more than nine years, I worked for MySQL AB and its successors, Sun Microsystems and Oracle. I handed in my resignation late June, two days before Sun’s German legal entity ceased to exist. Germany isn’t a country where you quit HP one day and join Oracle the next, so I had a long summer with plenty of so-called Garden Leave. Last Thursday was my last day, and I’m now outside MySQL AB, outside Sun Microsystems, outside Oracle.

Like all the many former colleagues who resigned before me, I did so with mixed feelings. Leaving the colleagues, finding freedom, I think you follow. The topmost feeling I have, the one I want to highlight right now, is gratitude. I’m very grateful for what MySQL AB has meant for my career, my personal development, my life experiences, my social life. Let me mention a small subset of the people that made my life at MySQL AB, and later Sun Microsystems, a truly memorable …

[Read more]
Showing entries 22751 to 22760 of 44965
« 10 Newer Entries | 10 Older Entries »