Difference between revisions of "User:Minooz/NexJ"

From CDOT Wiki
Jump to: navigation, search
(Database / Persistence)
Line 61: Line 61:
  
 
==Database / Persistence==
 
==Database / Persistence==
: Eclipse Tutorial Videos on [http://eclipsetutorial.sourceforge.net/persistence.html Persistence]
 
: [http://xstream.codehaus.org/persistence-tutorial.html XML/Object Binding] and [http://code.google.com/p/xbird/wiki/XmlObjectBinding Object Persistence] =[http://xstream.codehaus.org/index.html XStream] + [http://code.google.com/p/xbird/ XBird] (XML database system]
 
:  data persistence with [http://www.developer.com/xml/article.php/918111/Data-Persistence-and-Java-Data-Objects----JDO.htm JDO]
 
: java world [http://www.javaworld.com/javaworld/jw-03-2002/jw-0301-jdo.html jdo]
 
: JDBC [http://en.wikipedia.org/wiki/JDBC]
 
 
: Relational database Management System[http://en.wikipedia.org/wiki/Relational_database_management_system ]
 
: Relational database Management System[http://en.wikipedia.org/wiki/Relational_database_management_system ]
: JDBC Driver [http://en.wikipedia.org/wiki/JDBC_driver]
+
 
: Drivers table[http://devapp.sun.com/product/jdbc/drivers]
+
 
: [http://xstream.codehaus.org/persistence-tutorial.html XML/Object Binding] and [http://code.google.com/p/xbird/wiki/XmlObjectBinding Object Persistence] = [http://xstream.codehaus.org/index.html XStream] + [http://code.google.com/p/xbird/ XBird]
+
* Database
: Indexes [http://odetocode.com/Articles/70.aspx]
+
: Indexes & Hints
: Hints - Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the query optimizer might select for a query.
+
:: [http://odetocode.com/Articles/70.aspx Index]
 +
:: Hints - Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the query optimizer might select for a query.
 
:: Query Hints - http://msdn.microsoft.com/en-us/library/ms181714.aspx
 
:: Query Hints - http://msdn.microsoft.com/en-us/library/ms181714.aspx
 
:: Index vs Index Hint http://www.doens.be/2010/10/index-vs-index-hint/
 
:: Index vs Index Hint http://www.doens.be/2010/10/index-vs-index-hint/
  
* Trigger
+
: Trigger
 
:A trigger is a specification that the database should automatically execute a particular function whenever a certain type of operation is performed. Triggers can be defined to execute either before or after any INSERT, UPDATE, orDELETE operation, either once per modified row, or once per SQL statement. If a trigger event occurs, the trigger's function is called at the appropriate time to handle the event.[http://www.postgresql.org/docs/8.1/interactive/triggers.html]
 
:A trigger is a specification that the database should automatically execute a particular function whenever a certain type of operation is performed. Triggers can be defined to execute either before or after any INSERT, UPDATE, orDELETE operation, either once per modified row, or once per SQL statement. If a trigger event occurs, the trigger's function is called at the appropriate time to handle the event.[http://www.postgresql.org/docs/8.1/interactive/triggers.html]
 
: [http://en.wikipedia.org/wiki/Database_trigger Wiki]
 
: [http://en.wikipedia.org/wiki/Database_trigger Wiki]
Line 82: Line 78:
 
: [http://www.postgresql.org/docs/8.1/interactive/triggers.html PostgreSQL]- Syntax [http://www.postgresql.org/docs/8.1/interactive/sql-createtrigger.html]
 
: [http://www.postgresql.org/docs/8.1/interactive/triggers.html PostgreSQL]- Syntax [http://www.postgresql.org/docs/8.1/interactive/sql-createtrigger.html]
  
* Stored Procedures
+
: Stored Procedures
 
: [http://ovir.icp.ac.ru/oracle/doc/server/doc/scn73/ch14.htm Oracle Server Manual]
 
: [http://ovir.icp.ac.ru/oracle/doc/server/doc/scn73/ch14.htm Oracle Server Manual]
  
* Transactions
+
: Transactions
 
: [http://ovir.icp.ac.ru/oracle/doc/server/doc/scn73/ch12.htm#toc094 Oracle Server Manual]
 
: [http://ovir.icp.ac.ru/oracle/doc/server/doc/scn73/ch12.htm#toc094 Oracle Server Manual]
 +
 +
 +
* Persistence
 +
# Eclipse Tutorial Videos on [http://eclipsetutorial.sourceforge.net/persistence.html Persistence]
 +
# [http://xstream.codehaus.org/persistence-tutorial.html XML/Object Binding] and [http://code.google.com/p/xbird/wiki/XmlObjectBinding Object Persistence] = [http://xstream.codehaus.org/index.html XStream] + [http://code.google.com/p/xbird/ XBird] (XML database system]
 +
#  data persistence with [http://www.developer.com/xml/article.php/918111/Data-Persistence-and-Java-Data-Objects----JDO.htm JDO]
 +
# java world [http://www.javaworld.com/javaworld/jw-03-2002/jw-0301-jdo.html jdo]
 +
* JDBC
 +
# JDBC @ http://en.wikipedia.org/wiki/JDBC
 +
# Relational database Management System @ http://en.wikipedia.org/wiki/Relational_database_management_system
 +
# JDBC Driver @ http://en.wikipedia.org/wiki/JDBC_driver
 +
# Drivers table http://devapp.sun.com/product/jdbc/drivers
 +
 +
 +
  
 
===PostgreSQL and MySQL===
 
===PostgreSQL and MySQL===

Revision as of 13:50, 10 November 2010

NEXJ

About NexJ

Java

JBoss application server
example Salutation
example Dog

Build & Test

  • Junit
How to run JUnit test from Command Line Q & A
FAQ
Run individual tests Using build.xml
  • Ant
Tutorial Ant Apache
Min Ant


Tools

  • Mercurial
Mercurial SCM
Min Mercurial
  • Cygwin
http://www.cygwin.com/ Cygwin]
Min Cygwin
  • Eclipse
Eclipse Download
Eclipse Tutorials
All Eclipse Tutorial Videos
Create Web Application
setup and user-guide[1]
Mylyn user-guide[2]
install Mylyn FAQ[3]
Tasktop[4]
CodeBeamer Quick Tour[5]
Installing process of CodeBeamer on Eclipse [6]
Connect to the CodeBeamer Grace's account [7]

Database / Persistence

Relational database Management System[8]


  • Database
Indexes & Hints
Index
Hints - Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the query optimizer might select for a query.
Query Hints - http://msdn.microsoft.com/en-us/library/ms181714.aspx
Index vs Index Hint http://www.doens.be/2010/10/index-vs-index-hint/
Trigger
A trigger is a specification that the database should automatically execute a particular function whenever a certain type of operation is performed. Triggers can be defined to execute either before or after any INSERT, UPDATE, orDELETE operation, either once per modified row, or once per SQL statement. If a trigger event occurs, the trigger's function is called at the appropriate time to handle the event.[9]
Wiki
Oracle Server Manual
MySQL - Syntax [10]
PostgreSQL- Syntax [11]
Stored Procedures
Oracle Server Manual
Transactions
Oracle Server Manual


  • Persistence
  1. Eclipse Tutorial Videos on Persistence
  2. XML/Object Binding and Object Persistence = XStream + XBird (XML database system]
  3. data persistence with JDO
  4. java world jdo
  • JDBC
  1. JDBC @ http://en.wikipedia.org/wiki/JDBC
  2. Relational database Management System @ http://en.wikipedia.org/wiki/Relational_database_management_system
  3. JDBC Driver @ http://en.wikipedia.org/wiki/JDBC_driver
  4. Drivers table http://devapp.sun.com/product/jdbc/drivers



PostgreSQL and MySQL

  • Postgre
Tutorial
postgre connection
String literals and string functions in postgreSQL [12]
  • MySQL
Syntax
Tutorial
Mysql Connector
  • The current versions are MySQL 5.1 and PostgreSQL 8.4.
  1. PostgreSQL is a unified database server with a single storage engine. MySQL has two layers, an upper SQL layer and a set of storage engines. [13]
  2. MySQL began development with a focus on speed while PostgreSQL began development with a focus on features and standards. Thus, MySQL was often regarded as the faster of the two.
  3. Both PostgreSQL and MySQL support Not-Null, Unique, Primary Key and Foreign Key constraints. However MySQL silently ignores the CHECK constraint
  4. MySQL supports stored procedures, per se; PostgreSQL supports stored functions, which are in practice very similar.
  5. Trigger - Both PostgreSQL and MySQL support triggers. A PostgreSQL trigger can execute any user-defined function from any of its procedural languages, not just PL/pgsql.MySQL triggers are activated by SQL statements only. They are not activated by changes in tables made by APIs that do not transmit SQL statements to the MySQL Server; in particular, they are not activated by updates made using the NDB API. PostgreSQL has always been strict about making sure data is valid before allowing it into the database, and there is no way for a client to bypass those checks.
  6. DataTypes - PostgreSQL does not have an unsigned integer data type, but it has a much richer data type support in several aspects: standards compliance, the logically fundamental data type BOOLEAN, user-defined data types mechanism, built-in and contributed data types. PostgreSQL allows columns of a table to be defined as variable-length multidimensional arrays. Arrays of any built-in or user-defined base type, enum type, or composite type can be created. Arrays of domains are not yet supported. MySQL does not have network IP address data types that PostgreSQL has but does provide INET_ATON() and INET_NTOA() functions to convert IPv4 addresses to and from easily stored integers. Postgres does very good job supporting referential integrity, has transactions and rollbacks, foreign keys ON DELETE CASCADE and ON UPDATE CASCADE.
  7. Security - MySQL has exceptionally good fine-grained access control. You can GRANT and REVOKE whatever rights you want, based on user name, table name and client host name.
  8. Alter table - Postgres supports ALTER TABLE to some extent. You can ADD COLUMN, RENAME COLUMN and RENAME TABLE. MySQL has all options in ALTER TABLE - you can ADD column, DROP it, RENAME or CHANGE its type on the fly - very good feature for busy servers, when you don't want to lock the entire database to dump it, change definition and reload it back.
  9. Diagnostic Log - By default, PostgreSQL logs to stderr, meaning that it's highly installation specific where the dianostic information is put; on this author's system, the default ends up in /var/lib/pgsql/pgstartup.log. The default can be set to something more reasonable (such as syslog on unix, eventlog on Windows) by adjusting thelog_destination configuration parameter.
  10. Automatic key generation -
PostgreSQL doesn't support the standard's IDENTITY attribute. PostgreSQL's best offering for a column with auto-generated values is to declare a column of 'type' SERIAL:
CREATE TABLE tablename (
  tablename_id SERIAL,
  ...
)
MySQL doesn't support the standard's IDENTITY attribute. As an alternative, an integer column may be assigned the non-standard AUTO_INCREMENT attribute:
CREATE TABLE tablename (
  tablename_id INTEGER AUTO_INCREMENT PRIMARY KEY,
  ...
)
Compare SQL Implemenations[14]
Compare Postgre and MySQL [15]
Comparison based on Postgre website [16]

General

Tasks Done

Grace Links to read