Tuesday, November 23, 2010

Apache ODE Jacob part 1 - Introduction

Here I am going to introduce some topics related to Jacob which is the framework which provides the mechanism necessary to deal with two key issues in implementing BPEL constructs in Apache ODE. The interesting part of this framework is it can be use to achieve,

  1. Resistance of execution state
  2. Concurrency
without using Java Thread (I must say it's a Java framework). 

Here I am not going to talk about how BPEL constructs are designed using Jacob, instead what I am going to talk is the behavior, how to use it to write programs etc...  This is my first post and will continue till I am not find anything new in Jacob. In this first post I like to introduce some basic Jacob concepts. If you don't understand this don't worry, because it is necessary to see them in a program to understand. So just remember there are such things as follows.
  • JacobObject/ JacobRunnable
JacobObject is the simplest element use in Jacob which can be created by extending a Java class using JacobRunnable. JacobRunnable is a command pattern which implement run() method. Further we can say all the JacobObjects should have this run() method implemented. 
  • Channels
Channels are use to communicate between JacobObjects. In this channels we should defined the methods which we use the channels to invoke. There are various channel types which we can found in Jacob and we will discuss them in later.
  • Channel Listeners or Method Lists
When we create a channel there should be a JacobObject which listening to the channel till the other JacobObject invoke a method. This is done using a Channel Listener.
  • JacobVPU, ExecutionQueueImpl
This is where Jacob is processed. JacobVPU uses ExecutionQueueImpl to put all the artifacts (mostly channels and reactions) used in processing. When we add JacobObjects to the VPU queue in runtime, VPU popped them up and executed them, and that's it. 
According to references (I listed them below) "Jacob VPU is responsible for persisting and its internal state, like serialize or de-serialize the object", but I don't have and idea yet about it. 

There is an short way to create Channels and ChannelListeners in compile time using a channel interface, by adding @ChannelType annotation as follows,

Channel interface

import org.apache.ode.jacob.ap.ChannelType;

@ChannelType
public interface Call {
public void answer();
public void reject();
public void engage();
}

Channel

public interface CallChannel extends 
org.apache.ode.jacob.
Channel, 
org.apache.ode.jacob.examples.HelloWorld.Call
{
}

ChannelListener

import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;

public abstract class CallChannelListener
 extends org.apache.ode.jacob.ChannelListener <
org.apache.ode.jacob.examples.HelloWorld.CallChannel
>
 implements 
org.apache.ode.jacob.examples.HelloWorld.Call
{

    /**
*/
private static final long serialVersionUID = 1L;
private static final Log __log = LogFactory.getLog(
org.apache.ode.jacob.examples.HelloWorld.Call
.class);

    protected Log log() { return __log; } 

    protected CallChannelListener(
org.apache.ode.jacob.examples.HelloWorld.
CallChannel channel) {
       super(channel);
    }
}

To write this article I used three articles which were previously published,
  1. Exploring ODE part II: Jacob Framework by Jeff Yu http://jeff.familyyu.net/2010/01/exploring-apache-ode-source-code-part.html
  2. Wiki page of Apache ODE Jacob http://wiki.apache.org/ode/Jacob
  3. Documentation of Apache ODE Jacob http://ode.apache.org/jacob.html
When you read this you may find some places where I misunderstood, please let me and others know about it. 

Friday, October 8, 2010

How To Register The Nickname On Freenode

I thought to register my nickname in freenode because I want to keep my nickname as it is for a long time. (If not registered there is no guarantee that the same nickname can be used. Because anyone can assigned that nickname. After registering the registered nickname can be used only by using its owners password.)

This is the steps to follow to register on freenode,

First open the IRC client (Here I used X-chat)
Then select the FreeNode and click connect
Here is an image which shows that window.


NOTE: If you are using another client then you can connect to the freenode using the following command
/server irc.freenode.net

Now you are connect to the freenode
Then you will get a window that can connect to a IRC channel
And you can use it to connect it to any IRC channel (Here I am connecting to the Apache Derby IRC)
Or you can use Server->Join a Channel to join a prefered IRC channel.


Now lets do the registering
To do that enter the following commands in the text-box which is use for do the normal chatting.
(It is not a must to connect to the IRC to do the registration. But you have to connect to the freenode before registering)

Setting the nickname 
/nick nickname

Registering the nickname
/msg nickserv register password your_email

Login
This command will log you as the nickname owner
/msg nickserv identify password

Verify the registration
Go to the email account and get the verification code send by the NickServ
Then pass that verification code as other commands using the text-box.

Now you are done with the registering in freenode with your nick name.
Congratulations.....!!!

Wednesday, July 21, 2010

Silent killer

If you using UBUNTU or OTHER LINUX OS be aware of the silent killer
"rm -rf" - it removes everything without a warning. Once removed recovery may not be possible or extremely hard.

Transfer files one machine to another 2

I blog about two methods in the first and here is the second part which describes about
1. sshfs method
2. secret most easy two ways

SSHFS(mounting remote directory)

Here I am going to describe how to copy a file to remote machine using mounting it on to your machine. Lets see how to do that,
First you need sshfs install in your machine. You can do that by executing following command
sudo apt-get install sshfs.
Then what you have to do is create a folder in your machine where you want to mount the directory.
For example lets create a directory named eranda in Desktop.
Now you have to change the own of that folder, and it's content.
To do that execute the following command
chown -r username.username directory
eg: chown -r eranda.eranda Desktop/eranda

Now ready to mount the image.
You can mount the directory using the following command.
sshfs -o idmap=user username@remote-host:remote-directory your_directory
eg:sshfs -o idmap=user ishan@10.0.0.2:Desktop/xxx /home/eranda/Desktop/eranda

Now you can see the whole content of the xxx directory of the remote machine in your mounted folder. Now you can do r, w, x, copy from, copy to, delete, anything using that directory as a your local directory.
WARNING: All the changes that you done to this is changes to the original directory

As our main target now you can copy to/from remote machine.

After doing what you want you can unmount the directory as follows.
fusermount -u /home/eranda/Desktop/eranda

Two easy ways

1. Use a flash/portable drive etc...
2. Use a CD/DVD/Blue Ray etc...

NOTE: When you connect to the remote machine using ssh, scp or sshfs you always need to type the password of that user. If you doing it frequently you can save a passkey to that machine which will allow you to access without password. Now lets see how can we do that.

First you need to create a key.
ssh-keygen -t rsa
Now save it in the remote machine. To do that you first you should change your current location to home. Then execute the following command.
cat .ssh/id_rsa.pub | ssh user@remote.host 'cat >>.ssh/authorized_keys'


Special thanks to Damitha Kumarage, Tech lead at WSO2 Inc.

Transfer files one machine to another 1

These days I transfer files one machine to another frequently. There are few ways to do that.
1. scp (ssh)
2. using apache server
3. sshfs (by mounting remote directory)
4. the most easy two ways (this can be used even you don't know the ip address)

In this post I covered first two and will cover the next two in the 2nd part.

SCP (SSH)
To do this you need to install ssh-client in your machine and ssh-server in the other machine.
If you use Ubuntu in your machine you can install this by using sudo apt-get install openssh-client or openssh-server or you can download it and install from here.
If you have install ssh-client and server in your both machines then you can copy files from each another. To do this you can use the following command.

copy a file from remote machine to your machine
=>scp user@remote.host:file-path path-to-save
eg: copy a remote file named remotefile.txt which located in Desktop of the remote machine to your Desktop
scp eranda@10.0.0.4:Desktop/remotefile.txt ./Desktop

copy a file from your machine to remote machine
=>scp  file-path user@remote.host:path-to-save
eg:copy a file named remotefile.txt which located in Desktop of your machine to the Desktop of a remote machine
scp ./Desktop/myfile.txt  eranda@10.0.0.4:/home/eranda/Desktop

Using apache server
For this you have to have apache server install in your machine. If you do not have you can install using the command sudo apt-get install apache2 or you can download and install the apache server from here.

After installing apache2 your server should be up and running.
You can see that by going to the URL http://localhost/
You can see this kind of message in it.
------------------------------------------------------------------------------

It works!

This is the default web page for this server.
The web server software is running but no content has been added, yet
-----------------------------------------------------------------------------

If you see a Server Not Found 404 message, then you should start the apache2 server. You can do that by as follows
change directory to /usr/local/apache2
and execute the following commands
./clean.sh
./start.sh

Now lets start the file transferring.
First make directory in the location /var/
Put the file you want to copy to remote machine in that folder
For example I created a directory eranda in /var/ and put two of my files in that.

Now go to the remote machine and open a browser
Go to the URL http://your_machine_/your_folder_name (eg: http://10.0.0.4/eranda/)
You can see the files you put in the folder in your machine as follows

Now what you have to do is double click on the file you need and it will start downloading.

Special thank goes to Damitha Kumarage, Tech lead at WSO2 Inc.

Sunday, June 20, 2010

How to do Apache Derby Testing

Here I am going to log some important things which I had done during test Derby.
Here I have done two testings.
  1. derbyall test
  2. JUnit test
Before test Derby make sure that you build the trunk (need to put junit.jar (download) file in the tools/java folder if you don't skip the tests). You can build the truck by executing "ant all" command in the trunk and it will create classes folder which include build files. 

To run the test you need to set some class variables. One is path to classes which includes Derby build files. And path to the following jar files
  1. JUnit.jar (download)
  2. jakarta-oro-2.0.8.jar(download)
Here is my CLASSATH setting command I used,
export CLASSPATH=/home/eranda/Desktop/DERBY/trunk/classes:/home/eranda/Desktop/DERBY/trunk/tools/java/junit.jar:/home/eranda/Desktop/DERBY/trunk/tools/java/jakarta-oro-2.0.8.jar

Now we can start the the testing.

NOTE: Need to do the test in a separate folder not to mixes with others.

To run the derby all tests,
java org.apache.derbyTesting.functionTests.harness.RunSuite derbyall

This will do derbyall test and give you result files. Among them there are few important files which summarize the tests.
  1. derbyall_report.txt- in which include the summery of the tests
  2. derbyall_pass.txt- in which include the tests passed
  3. derbyall_fail.txt- in which include the tests failed
To run the JUnit all tests,
java -Xmx512m -XX:MaxPermSize=128m junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All

Normally I pump this JUnit test results to a file by adding the following piece of code to the above execution.
>junitAll.out 2>&1

In JUnit tests it will return dots(.) for every passes test, 'E' for every error tests and 'F' for every failures. Also at the end it will show the stack trace of every errors and failures. 

If it need to run single test then it can be run using the following command,

java junit.textui.TestRunner PathToFile.TestName

for example I ran following command to test the InbetweenTest which is a JUnit test for testing the inbeween syntax.

java junit.textui.TestRunner org.apache.derbyTesting.functionTests.tests.lang.InbetweenTest 

Here I want to thank Bryan Pendleton (Apache Derby committer) whom I learnt most of this from.



Sunday, May 30, 2010

Fedora add sudoers

I install a fresh copy of Fedora in my virtual machine and it troubled me with sudo. When I use sudo in the terminal it gave me something like the current user is not in the /etc/sudoers file. So I did as follows and rid from it.
First I log into root using "su -" (then I had to enter the password)
Then I change the mode of /etc/sudoers file so that we can write to it by executing the command chmod +w /etc/sudoers.
Thirdly I add eranda ALL=(ALL) ALL
eranda is my username of my user account in fedora.
Then I remove the writing mode if the /etc/sudoers file using chmod -w /etc/sudoers

I thought it was the finish and execute sudo but it gave me another error.
sudo: /etc/sudoers is mode 0640, should be 0440 (to execute this you need root privileges)

then I change the mode of /etc/sudoers to 440 by executing chmod 440 /etc/sudoers
Finally I can use sudo in my machine.
Search Amazon.com for movies

Tuesday, May 25, 2010

Web Service Client

I discuss about how to create the stub of the web service and check whether it works. Now I am going to discuss how to create a client program which uses the web service. Here I am going to create a client program to my favorite web service "HelloService".
I thought it would be better to know about how things work.
First of all what is a stub? In simple language it is the interface which represent web service in the client side. So using stub we can work with the web service as it is in the same project/package. 
Then why we use Axis2? This is which do the communication between stub and the web service. For this Axis2 use SOAP(Simple Object Access Protocol) messages. Here two Axis2 servers are involved. 
The first one is in the client side and the other one is in the server side. Client side Axis2 server is responsible for create SOAP messages which invoke the web service through the stub, and catch and execute the response SOAP message which send by the  server side Axis2 server. The Server side Axis2 server is responsible for catch the SOAP message which the client side Axis2 server send and invoke the web service, and create a SOAP message to the response of the web service and send it to the client side Axis2 server. (The process is more complex than this)
Now lets finish the client implementation.
First of all take a look at the stub to see how it gave an interface to the remote service(need to have a rough idea).
You will see all the parameters of the the web service are represent as java classes and their values should set through setter methods and the output is also implemented as a class and we have to use getter method to get the real output (you may not understand this but you will realize your self when creating the client class).
now follow the following steps to create a client class.....
1. Create a java class with main method.
2. Import the package which include the "stub" into your class. This step can be skipped if you creating the class in the same package.
3. Create a object of the stub class (my stub class name is HelloServiceStub.java) in the your class. 
4. Let my stub object be "stub" and the method I need to invoke in the web service be sayHello().
    Then you see that you can access that method using the stub object. (for example stub.sayHello())
    But the thing is the parameters you need to parse to that method cannot be directly send as a String, Integer or  like that data type.
    We can use the IDE or you can look at the stub to see what parameters we need to parse through sayHello() . In my case it need to parse a SayHello object. (This SayHello java class is in the stub)
    Then create a object of the class it need. 
                  SayHello sayHello = new Sayhello();
    Then set the value you need to send as parameters for the actual method. 
                  sayHello.setName(name);
    Then send the sayHello object as the parameter of the method as stub.sayHello(sayHello);
    
5. Now its time to get the response
    Response is always come as an java class object. So we need to get it to a related class reference object.
    Use IDE or stub to see the response class type and get the response to it as follows. For my case it returns a SayHelloResponse object.(This SayHelloResponse java class is in the stub)
              SayHelloResponse helloMsg = stub.sayHello(sayHello);
   So at the end we can use that respond class to get the needed output.
               String output = helloMsg.get_return();
   If you use System.out.print(output); to print you can see the output print in the console.
   After all my Hello client look like as follows

6. After creating the client class you can run it as a java application which print the web service result.
   I send Eranda as the input and and I got the result as "Hello Eranda" 


PS: When you  creating the object you have to use a try-catch around some lines to catch the RemoteException. and AxisFault exceptions (so you need to import java.rmi.RemoteException and org.apache.axis2.AxisFault classes)

Monday, May 24, 2010

Web service client using eclipse axis2 plugin

Few months ago I blog how to deploy a web service and today I am going to create a client for that web service.
Here is the java class which I am going to deploy as the service.

package WebServices;

/**
* @author Eranda
*
*/
public class HelloService {
public String sayHello(String name){
return "Hello "+name;
}

}

This we service take a "name" and return Hello name.

The following things should be done after deploying the service to verify it's existance.

Go to your browser and check whether your web service is deployed or not. Use http://localhost:8080/ProjectName/services/listServices to check it. If it doesn't show the web service list then you have to deploy your service again properly.

Here is the page you have to have.



Now click on the service name of what you deployed. It will show you the wsdl of the web service. Now copy the URL of the wsdl.

Then go to eclipse  and then select File->new->Other->Web Service Client and click Next.

You can see a window like follows,


Copy the wsdl URL to Service Definition textbox.
Set the slider to Start Client.
Then click Server link and see whether the server is selected and set Web service runtime to axis2.



Click OK
Then goto Client project: Axis2 link and set the Web service client name as your preference or leave it as it is.


Click OK
And then click Next

Then the project will create and the following window appears.


Set the parameters with your values or you may use default.
Check the box Generate a JUnit test case to test the service and click Finish and the web service stub and the test case will create after that.

Here is the look of the project after doing that.


To test the web service you can use the test case which create automatically. To do this right click on the test class (here it is HelloServiceTest.java) Run As->JUnit Test
If all the test are successful then your client side is working correctly. Later we will see how to write a class to invoke the web service methods and get results.

PS: Some times you may get Axis faults. This exception throws because of  the wrong server host in stub. By correcting the stub(there are 2 places to correct) with the correct host name you can make it correct. (This host change thing mostly occurred because of the dynamic IP of the internet connections.)
Search Amazon.com for web services java

Sunday, May 9, 2010

PATH variable went wrong

Today I update /etc/bash.bashrc and set PATH variable wrong. This cause the terminal malfunction. Because the files need to function the commands are not exported. So I can't even open a file with terminal.
Shoot this trouble is simple(but I tried last 2 hours to shoot this :D)
What I have done is add /usr/bin to the PATH by executing export PATH=$PATH:/usr/bin
Then I could used the terminal as normal and correct the bash.bashrc file.

Wednesday, April 7, 2010

My GSoC proposal

Proposal Title:Add compatibility tests to explore behavior differences between Derby and other DBMS implementations



Student Name: Eranda Sooriyabandara



Student E-mail:070468D@gmail.com



Organization/Project: Apache Software Foundation Derby DB project



Assigned Mentor: Bryan Pendleton



Proposal Abstract:



As the name of the project spells this project is to create a compatibility test for Apache Derby for explore the behavior differences between Derby and the other DBMSs such as Oracle, SQL server, MySQL, PosgreSQL etc...



In this project I've seen there are three parts which I am mentioned here and describe in the Detailed description,



Identified the differences of the functionalities and options between the DBMSs. Also in this part I can document the differences of Apache Derby and other DBMSs. It mainly 3 parts as Bryan mentioned,
I. Check which SQL fetchers implemented in the DBMSs according to the SQL 99/2003/2008 standards.
II. Check which JDBC methods supported by DBMSs.
III. Check the Platform support and the behavior of DBMSs in each Platform.
Analyse the data collected in the first step and decide which tests must be include in the test bundle. After finalizing the tests I can start implementing the tests.
Third and the final step is to test each DBMSs using the test create a comparison between Derby and other DBMSs to see what improvements do we need to do to Derby to be more likely to satisfy the users needs.


Detailed Description:

Project:

This project is to create a compatibility test which can identified the main differences between Derby and other major DBMSs. After creating this compatibility test we can identify what main functionalities lack in Derby which different kinds of people expecting in a DBMS. As an example some people needs DBMS which can withstand overloads. When we knows about the lacking main functions in Derby we can improve them so that this can be much popular than now. For creating this compatibility test I follow up the following procedures which I summarized on the abstract.

When adding a compatibility test case we need to consider what tests do we need to add in. To do this we have to compare with the other DBMSs such as Oracle, MySQL,SQL server,Sybase etc... So my first thing on this project is to compare DBMSs. According to this I did a sample general comparison of Derby and MySQL which you can find on http://emsooriyabandara.blogspot.com/2010/04/derby-vs-mysql_02.html. Also I gather facts on Derby and MySQL SQL and I will able to create SQL comparison of Derby and MySQL soon.

Then I should analyse the data I gathered to find which tests do I need to add to the test case. When selecting tests I thought I should give priorities to functionalities which DBMS users expect from a DBMS. Also I thought to analyse other DBMSs for their specialties and to find how they achieve them. For example oracle is popular for its security which has three way to achieve them 1.Transparent data encryption 2.Network encryption 2.Strong authentication which I am willing to discuss when I am comparing DBMSs' "Access control and security".

Implementing the compatibility test need time other than method because when we come to this step we are know what do we want to test.

After implementing the test case we have to test against each DBMS. So we can collect statistics. This statistics we can use to improve Derby. This is the most important part of the project because we can directly identify the functionalities Derby does not support, create them as major issues and implement them.

This project I choose for the intern because I like testing and analysis. Also when I am converting Derby tests into Junit I familiar with the Derby SQL and Derby JDBC methods. Also I referred Database System Concepts book for one of my course module so that I have better knowledge in database concepts and can be able to use to check compatibility. The other reason is I choose this is up to today I used many database management systems and I am familiar with using them.

Time Line:

May 24-June 7- Comparing SQL vs DERBY fetchers.Also make a comparison on SQL functional availability in different DBMSs.

June 7-June 21-Implementing test cases for check availability of identified important SQL functions.

June 21-July 5- Comparing JDBC functions available in different DBMSs.

July 5-July 19-Implementation test case for check JDBC functions.

July 12-Submit midterm evaluation

July 19-August August 10-Check previously made test cases in different platforms using each DBMSs.

August 10-August 16-Publish results and conclusion.



About Me:

I am Eranda Sooriyabandara (Weerasekara Mudiyanselage Eranda Mahesh Sooriyabandara). I am currently a student of Department of Computer Science and Engineering at University of Moratuwa Sri Lanka. Currently I am under my intern period at WSO2 Lanka pvt Limited which is an Open Source company in Sri Lanka.



Additional Information:

This is my second time of applying on Google Summer of Code and in the first time I did Apache Derby test and fix convert test into JUnit project and successfully completed that. Under that I completed several test conversions and several bug fixing as follows,



as tests



DERBY-4318 convert inbetween.sql to JUnit
DERBY-4317 convert columnDefaults.sql to JUnit
DERBY-4248 convert checkConstraints.sql to JUnit
DERBY-4187 Convert altertable.sql to JUnit


as bugs



DERBY-4282 strange behavior with the "update... where current c1" in the CheckConstraintTest
DERBY-4256 allow alter table to increase the maximum size of a blob and a clob
DERBY-4244 ALTER TABLE Sanity ASSERT in add column with autocommit off


Also for my school project I did complete two other test conversions



DERBY-4424 Convert outerjoin.sql into JUnit
DERBY-4423 Convert dropTable.sql into JUnit


Also currently I am working on the bug DERBY-2785 ij "describe" built in command cannot describe a table named "run" and it's work is almost done.

Friday, April 2, 2010

Derby vs MySQL

Derby vs MySQL

This document describe about the differences about the DBMSs Apache Derby and MySQL.

1. Operating system support

OS\DBMS

Derby

MySQL

Windows

Yes

Yes

Mac OS

Yes

Yes

Linux

Yes

Yes

Unix

Yes

Yes

Amigo OS

No

Yes

Symbian

No

Yes

MySQL supports all most of the OS than the Apache Derby. The reason is Apache Derby need java to run it.

2. Fundamental fetchers

Fetcher\ DBMS

Derby

MySQL

ACID

yes

yes

Referential Integrity

yes

yes

Transactions

yes

yes

Unicode

yes

partial

Interface

SQL

SQL

DBMS\feacher

Derby

MySQL

ACID

yes

yes

ACID- Atomicity/ Consistency/ Integrity/ Durability

MYSQL partially support the Unicode and Apache Derby fully supports the Unicode. MySQL supports- UCS-2 encoding /UTF-8 encoding.

3. Limits

fetcher \DBMS

Derby

MySQL

Max DB size

?

unlimited

Max table size

?

MyISAM 256TB

Max row size

?

64KB

Max column per row

1012(5000 in view)

4096

Max blob/clob size

2,147,483,647 chars

4GB ( long text/long blob )

Max char size

254 varchar

32672

Max number size

?

64bits

Min DATE

0001-01-01

1000

Max DATE

31/12/9999

9999

Max column name size

128

64

Max number size

?

64bits

We can see here there are number of limitations of Apache Derby than MySQL. The main reason for this is the limitations of java. For example,

Because of java array size limit is 231

I. Number of chars in names are limited

II. Number of row s per table is limited

III. Number of column per table is limited

IV. Characters in data types like CHAR,VARCHAR is limited.

4. Tables and views

DBMS

Derby

MySQL

Temp table

Yes

Yes

Materialized view

No

No

Both DBMSs are not capable of creating materialized views. But materialized view is very important when using DBMS in data warehousing.

5. Indexes

DBMS

Derby

MySQL

R-/R+ tree

No

MyISAM only

Hash

No

Memory, Cluster(NDB),

InnoDB tables only

Expressions

No

No

Partial

No

No

Reverse

No

No

Bitmap

No

No

GIST

No

No

GIN

No

No

6. Database capabilities

DBMS

Derby

MySQL

Union

Yes

Yes

Intersect

Yes

No

Except

Yes

No

Inner join

Yes

Yes

Outer join

Yes

Yes

Inner selects

?

Yes

Merge join

?

Yes

Blobs and Clobs

Yes

Yes

Common table expressions

No

No

Windowing function

No

No

7. Other objects

DBMS

Derby

MySQL

Data domain

No

No

Cursor

Yes

Yes

Trigger

Yes

Yes

Function

Yes

Yes

Procedure

Yes

Yes

External routing

Yes

Yes

8. Partitioning

DBMS

Derby

MySQL

Range

No

Yes

Hash

No

Yes

Composite(Range+Hash)

No

Yes

List

No

Yes

Shadow

?

?

Native Replication API

?

?

9. Data types

DBMS

Derby

MySQL

Type system

Static

Static

Integer

SMALLINT(16 bits)

INT(32 bits)

BIGINT(64 bits)

TINYINT(8 bits)

SMALLINT(16 bit)

MEDIUMINT(24 bit)

INT(32 bit)

BIGINT(64 int)

Floating point

FLOAT(32 bits)

DOUBLE(64 bits)

REAL(32 bits)

FLOAT(32 bit)

DOUBLE(64 bit)

Decimal

DECIMAL

NUMERIC

DECIMAL

String

CHAR
VARCHAR

CHARFORBITDATA

LONGVAR-

CHARFORBITDATA

CLOB

CHAR

VARCHAR

TEXT

Binary

BLOB

BLOB

Date/Time

DATE

TIME

TIMESTAMP

DATETIME

DATE

TIMESTAMP

YEAR

Boolean

BOOLEAN

BOOLEAN

Other

SET

ENUM

SET

10. Access control

DBMS

Derby

MySQL

Native network encryption

Yes

(can use with or without)

Yes

(SSL with 4.0)

Brute-force protection

Yes

No

Enter price directory compatibility

Yes

No

Password complexity rules

?

No

Patch access

?

Partial

No security page

Run unprivileged

Yes

Yes

Audit

?

?

Resource limit

?

?

Separation of duties

between admin/

operator backup like RBAC

?

?

Security

certification

No

No