Skip to main content

Posts

What is a Transaction?

To illustrate the concept, let us assume that you want to transfer money from a savings account into a current account. In this scenario, it is critical that both the accounts are changed from a successful transaction and neither is affected from an unsuccessful one. You just cannot afford to have your money vaporize if crediting your current account fails for any reason after the debit on your savings account! Therefore, the most important concept that one has to be aware of when dealing with enterprise applications is the concept of a transaction . To a user, a transaction is a single change event that either happens or doesn't happen. Although this may sound like a fairly straightforward and simple requirement, it is hard to make this work in a distributed system without deploying some form of transaction control - computers can fail and messages can be easily lost. Transactions provide a way to bundle a set of operations into an atomic execution unit. This atomic " all-or-...

GNU utilities for Win32

I have been using a W2K machine for the devlopment activities. However, sometime back I came acroos this set of tools that port some of the GNU Utilities to Win32 platform. Since then, I have been using them for various activities. Just check it out at http://unxutils.sourceforge.net/ .

What is P3P?

P3P is the Platform for Privacy Preferences Project . It was developed by the W3C, (World Wide Web Consortium) as a protocol for providing automated privacy information to the end user, giving them more control over their own personal information at the web sites they visit. P3P websites offer privacy information in a machine-readable format and P3P enabled browsers can read this and compare it to their own privacy standards. This protocol provides a standardization of privacy statements and presents it in a format that allows surfers to act on the information they are provided with. The two main goals of implemented P3P policies are: * To enable Web sites to present their data-collection practices in a standardized, computer-readable, easy-to-locate manner * To enable Web users to understand what data will be collected by sites, how that data will be used, and what data and uses they may "opt-out" of or "opt-in" to. How is it useful? Web Applications usually...

Common UNIX Commands

I just decied to look for a few commonly used UNIX command. A quick Google produces a lot more, but here are a list of more useful commands. cd - Change Directory. (Just like in dos) mkdir - Make Directory. rmdir - Removes a Directory that is empty! ls - List directory. (Like dir in Windows) cat – Short for concatenate. It was used to concatenate two filestogether via cat file1 file2 >file3 Didn‘t know that did you. Theechoing out to standard out gave cat a whole new meaning to the users. more - Just like less. It pages output to the screen. mv - Move. For moving files and directories around rm Remove a file. Also rm rf for removing a folder and it‘scontent. grep - Used to search for text within a stream or files. (man regex) vi – A text based editor. You‘ll find that it‘s really a symboliclink to vim now a days. rlogin - Remote login. I hope your admins disabled this! passwd - Used to change your password. ps - Used to processes. nice - Run a program with lower priority so you don...

What are the different type of JDBC drivers?

There are four types of JDBC database driver: The JDBC/ODBC bridge driver (Type 1) A piece of native C-code that translates a JDBC call to an ODBC call. Use this driver for development, not for industrial-strength application environments. Note that you have to have an ODBC database driver manager + an ODBC database driver installed on the server in addition to the JDBC/ODBC bridge. Though useful for learning JDBC and quick testing, bridging solutions are rarely appropriate for production environments. Native API partly java driver (Type 2) A piece of native C-code that translates a java JDBC call to a native database call level API. Use this driver for development and deployment. Due to its native code, this driver can only be used by Java Applications with full computer access (i.e. not Applets). Type 2 drivers generally provide the best performance, but they require the installation of native libraries on clients that need to access the database. Applications using Type 2 drivers ...

What’s the difference between Primary Key and Unique Key?

Both Primary & Unique keys are Indexes. Index - An index is a structure in a table that orders the data. It allows the database to access data quickly (In MySQL its implemented using B-tree algorithms). Primary Key - This is an index that cannot be NULL, Primary Keys are used in building relationships between tables in a database. (an index is automatically created on the primary key). The difference between primary and ordinary keys is that there can be multiple keys, but only one primary key. Unique Key - Unique and Index are same, the difference is, in Unique, duplicate are not allowed in any circumstances and that is enforced by database server. Primary key(s) qualify to be Unique on basis of their uniqueness. In case, your table has 2 primary keys means that the 2 fields together form one unique key. Each field by itself may have repeating values, but both primary keys combined together must be unique.