Open main menu

CDOT Wiki β

Changes

PostgreSQL Adapter

1,379 bytes added, 21:59, 9 December 2010
Project Phases
=== Phase 2: Connect to PostgreSQL===
* [[PostgreSQL_Adapter-nexj/test-env | Create Test Environment]]
 
=== Phase 3: Test first design ===
* 1- Create a PostgreSQL database through some scripts
: Through the process in postgresql_setup.sql, the database was created, initialized and tested:
:: A database called 'test is created in PostgreSQL : <code> CREATE DATABASE test </code>
:: To create a <code>user</code> along with <code>password</code>: <code> CREATE USER test WITH PASSWORD 'test'; </code>
:: Login to the database 'test' with username 'test': <code> psql -U test test </code>
:: Create a <code> Schema </code> called 'test' inside the database 'test' with particular owner 'test': <code> CREATE SCHEMA test AUTHORIZATION test;</code>
:: Create a <code>table</code> called 'Mutex' with primary key: <code> CREATE TABLE test.Mutex(id INT PRIMARY KEY); </code>
:: Insert a value into the primary key: <code> INSERT INTO test.Mutex(id) VALUES (1); </code>
 
* 3- Working inside Schema 'test'
 
: <code> CREATE TABLE test.xxx </code>
:: data types are changed in <code> appendColumnType() </code> in ''PostgreSQLSchemaManager.java'' based on each jdbc type's equivalent in PostgreSQL.
:: The implementation in <code> crateTextTable </code> in file ''PostgreSQLSchemaManager.java'' is removed for now (base class's version is being called).
: <code>CREATE INDEX test.xxx </code>
: <code> CREATE Trigger test.xxx // if it's needed for PostgreSQL as well as MySQL</code>
 
 
 
 
 
===Phase 2: Coding ===
1
edit