Archive for the ‘SQL’ Category
Sun could’ve just downloaded MySQL from the site and run without paying 🙂 .
Anyway, Sun buying MySQL is a big deal and a big surprise. Another slightly related acquisition news today is – Oracle buying BEA, the app server company. Incidentally, Oracle owns both InnoDB and BerkeleyDB – two of the better engine options of MySQL.
PostgreSQL and MySQL differ on databases vs schemas terminology. While creating constraints such as foreign key, MySQL lets anyone reference tables across databases (without explicitally using schema). OTOH, PostgreSQL doesn’t have any way to maintain cross database references (as of PostgreSQL 8.2). So, although MySQL’s implimentation is non-standard (and incorrect) it is more functional in this case.
MySQL aliases schema with database behind the scenes, such that create schema and create database behave identically. It can be said that MySQL therefore has implemented cross-table functionality, skipped schema functionality entirely and provided similar functionality into their implementation of a database. In summary, Postgres fully supports schemas, but lacks some functionality MySQL has with databases, while MySQL doesn’t even attempt to support true schemas.
Navicat – slick, fast and one can even print database table structure.
About Bit Field enumerations:
In C/C++/.net family of programming languages, there are 2 types of enumerations(enums) –
- Simple enums -Sequential or custom.
e.g. Days of a week
- Flag enums -Bit field. Bitwise operators give us the ability to store multiple settings in a single primitive data type (e.g. an integer). This is useful when a single item has potentially more than one setting of the same type.
e.g. bold, underline, italic style of text