Posts

Showing posts with the label database

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...