| Contrast and Resemblances | ||||||||||||||||||||||
| Contrast and resemblances among Oracle, MySQL and PostgreSQL | ||||||||||||||||||||||
Objectives:
|
||||||||||||||||||||||
| Data Storage: | ||||||||||||||||||||||
| **~MySQL "database" as a schema/user in Oracle. If you have the
privileges, you can query the DBA_USERS view to see the list of schemas
|
||||||||||||||||||||||
| Oracle Super User and User with their own tables
|
||||||||||||||||||||||
| PostgreSQL Overview:
|
||||||||||||||||||||||
| PostgreSQL : Can hold more than one server
, pgaAdmin3.exe uploads the links for both the servers.
object hierarchies in postgresql
|
||||||||||||||||||||||
| MYSQL :
Made of database schemas
|
||||||||||||||||||||||
| Now let us use MySQL Workbench, note list of schemas in the
database.
|
||||||||||||||||||||||
It is two early
<?php
//$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
$mysqli = new mysqli("Manas9", "Manas9", "Manas9237", "test");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = "SELECT CURRENT_USER();";
$query .= "SELECT fname, lname FROM emp1 ORDER BY fname";
/* execute multi query */
if ($mysqli->multi_query($query)) {
do{
/* store first result set */
if ($result = $mysqli->use_result()) {
while ($row = $result->fetch_row()) {
echo("<br/>". $row[0]." ". $row[1]);
}
$result->close();
}
} while ($mysqli->next_result());
}
/* close connection */
$mysqli->close();
?>
|
||||||||||||||||||||||
| phpMyAdmin much more users friendly and
|
||||||||||||||||||||||
| Now use Browse menu to view the table
You may also use php script, order of data display was different, than the logical view, due a filter "order by fname" in the selection query.
|
||||||||||||||||||||||