Posts

Database: What is a Synthetic Key?

Well, a synthetic key is really the surrogate key. Primarily, in MySQL which commonly use a "current database" (non-temporal), surrogate key are either primary keys or columns that emphasizes uniquness with its column values but with its functionality that is a system generated like an auto increment key or a procedural generated that is not derived from any application data from a database. Usually, the most significant meaning of a surrogate key is the primary key.  It is also possible that the surrogate key exists in addition to the database-generated UUID (for example, an HR number for each employee other than the UUID of each employee). Surrogate key is in contract to Natural Key which a natural key is defined customarily by the programmer or by the input, let say, is defined by it's national id number of a person or any number that is inputted from person's data that is not relying on a system generated UUID or a natural key is a user generated data, not syste...

Temporal Database: Does MySQL have it?

I'm so intrigue with Temporal Database and I'm not 100% sure as I haven't tried this yet how does it work in MySQL. So what's Temporal Database, well Wikipedia is your companion. See,  http://en.wikipedia.org/wiki/Temporal_database . I'm not sure if this works, from stackoverflow,  http://stackoverflow.com/questions/9446408/how-to-implement-temporal-upward-compatibility-in-mysql If anyone of you have tried Temporal Database in MySQL, please share your ideas about this in the comments below. Thank you.

What is "cluster key" in database?

Just for the notes, you can read the Wikipedia page about database index, discussing what a clustered and non-clustered keys mean. Also it discusses a cluster, which is not to be confused with clustered index. Below, this is what Wikipedia defines: Non-clustered The data is present in arbitrary order, but the  logical ordering  is specified by the index. The data rows may be spread throughout the table regardless of the value of the indexed column or expression. The non-clustered index tree contains the index keys in sorted order, with the leaf level of the index containing the pointer to the record (page and the row number in the data page in page-organized engines; row offset in file-organized engines). In a non-clustered index: The physical order of the rows is not the same as the index order. Typically created on non-primary key columns used in JOIN, WHERE, and ORDER BY clauses. There can be more than one non-clustered index on a database table. Cluster...

What is Disk Contention?

Okay, so let me take a note about this meaning... Disk contention occurs when multiple processes try to access the same disk simultaneously. Most disks have limits on both the number of accesses (I/O operations each second) and the amount of data they can transfer each second (I/O data rate, or  throughput ). When these limits are reached, processes must wait to access the disk. It's a situation occurring when multiple processes try to access the same disk(s) and the requests outrun the response times of the drive(s). This happens because most disks are restricted in the amount of data they can transfer and the number of accesses (I/O operations) they can handle each second. Disk contention became a more prominent problem when CPU speeds dramatically increased over the past 15 years, putting even greater demands on disk-based data storage and causing the modern data centers’ most significant operational constraint.

Understanding inode in Linux

I just wanted to keep myself acquainted with this inode. What is inode? In  computing , an  inode  (index node) is a  data structure  found in many  Unix   file systems . Each inode stores all the information about a file system object ( file ,  device node ,  socket ,  pipe , etc.), except data content and file name.  (from Wikipedia ).  From Cyberciti.biz , An inode is a data structure on a traditional Unix-style file system such as UFS or ext3. An inode stores basic information about a regular file, directory, or other file system object. So as what I understand, how does Linux stores the file and allocates a an index for its file system data structure  is thru index nodes (or inodes) (It's not clear if  i stands for index anyway, but it's easy if we term it i as "index").  inodes does not, " contain file names, only file metadata". Unix directories are lists of association structures, each of w...

MySQL: Show your database with its character set

I just wanted to take note of this as this is such a helpful query. SELECT * FROM information_schema.SCHEMATA WHERE SCHEMA_NAME LIKE '%DBNAME%

MySQL Client (using Percona Server) segmentation fault bug

I just wanted to take not of this, so if there are bugs that I might be facing for the next time with the same result, then this post can be helpful. I have this OS info: OS: CentOS release 6.4 (Final) Kernel: 2.6.32- 358.11. 1.el6.x86_ 64 PS version: Percona- Server- 5.6.12- rc60.4 Using this tarball which is the source, Percona- Server- 5.6.12- rc60.4. tar.gz from http:// www.percona. com/downloads/ Percona- Server- 5.6/Percona- Server- 5.6.12- rc60.4/ source/ and the build and installation went well. However, when I try to run mysql client with, # mysql -u root Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.6.12 Source distribution Copyright (c) 2009-2013 Percona Ireland Ltd. Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. ...