Wednesday, December 25, 2013

21 Best Free Open Source Databases

21 Best Free Open Source Databases

As a developer or DBA, you must be using some of the widely used databases like MS SQL Server, MySQL, Oracle, PostgreSQL, MongoDB etc. MySQL is the best free open source database which is used today, that we all know. Beside MySQL there are a lot of free and open source databases which you might not be knowing or never used. Some of the free free and open source databases are PostgreSQL, MongoDB, HBase, Cassandra, Couchbase, Neo4j, Riak, Redis, Firebird and lot more. I am using Firebird in my current project which with Delphi XE4. I have compiled a list of 21 Best, Free and Open Source Databases available to us. Lets have a look at them:

1. MySQL

The most widely used open source database for Web apps (and many other things) remains MySQL. Support for multiple storage engines, clustering, full-text indexing, and plenty of other professional features have allowed numerous other apps profiled here, from WordPress to Movable Type, to rely on MySQL as their default database. Graphical front ends, such as phpMyAdmin and Adminer, make using the database far less of a chore. And for those seeking escape from the long shadow of Oracle, there's a community fork named MariaDB, maintained by MySQL's original lead developer, Monty Widenius.

2. PostgreSQL

When Oracle acquired MySQL, reduced the development staff, and more or less killed the open source nature of the project, it reopened a market that MySQL had locked down. PostgreSQL has a much nicer set of drivers and supports both standard ANSI-SQL and extended features, in many cases better than MySQL. On the downside, its long legacy has left it multiprocess in the era of multithreaded. The high-availability/clustering features of PostgreSQL require a lot of elbow grease and leave much to be desired. Yet while organizations look for a community developed database, one of the eldest starts to look pretty good. Many cloud providers, such as Heroku, have chosen PostgreSQL as their RDBMS storage option as well.

3. MongoDB

NoSQL? Document database? The first name that comes to mind is MongoDB, due to a dual-edged blade from developer 10gen. On one side, MongoDB has strong venture capital and consequently an extensive marketing strategy. On the other side, it is the only comparatively mature document database in the NoSQL world. Highly scalable horizontally with automated sharding and highly available due to autoreplication, MongoDB offers a very reliable and yet simple solution to modern document database problems. The downsides: Working with stored procedures can be difficult, and performing data manipulation can require writing complex JavaScript code.

4. Hadoop (HBase)

Hadoop is the name brand in big data. It is also the convergence of "clustered storage" systems like Gluster and Ceph with NoSQL. Hadoop is really a collection of projects to solve large and complex data problems. In fact, there are multiple types of databases and query languages built on the overall Hadoop framework. Hadoop's complexity is as legendary as its capability, and its lack of high-availability features has both held it back and created a commercial add-on ecosystem.

The project aims to host very large tables like "billions of rows, millions of columns". It has a REST-ful web service gateway that supports XML, Protobuf, and binary data encoding options.

5. Apache Cassandra

Written in Java, this BigTable-based key-value database is getting more popular by the day. Open source and built to integrate with Hadoop, Cassandra offers the column family solution to developers wanting to move away from the relational database model while working with Hadoop. Focusing mainly on getting in very fast writes and providing high availability, Cassandra has slower reads than some alternatives. It is mostly used for logging purposes and real-time analysis.

Cassandra is a highly scalable second-generation distributed database that is used by giants like Facebook, Digg, Twitter, Cisco & more. It aims to provide a consistent, fault-tolerant & highly available environment for storing data.

6. Couchbase

While Couchbase was a fork of CouchDB, it has become more of a full-fledged data product and less of a ball of framework than CouchDB. Its transition to a document database will give MongoDB a run for its money. It is multithreaded per node, which can be a major scalability benefit -- especially when hosted on custom or bare-metal hardware. With some nice integration features, including with Hadoop, Couchbase is a great choice for an operational data store.

7. Neo4j

The database for interconnected data, Neo4j provides a reliable Java-based platform for conquering highly interconnected database problems. Available with full ACID transaction compatibility -- rare in a NoSQL database -- Neo4j has a SQL-like query language called Cypher and a scripting language called Gremlin for graph traversals. Best used to accurately and efficiently model highly complex, interconnected networks like network topologies, social networks, and conditional access control problems, it provides indexes on nodes and relationships. Direct path calculations take hundreds of lines of code for a RDBMS but two lines of code for Neo4j.

8. Riak

An open source distributed database written in Erlang and C, Riak treats all nodes equally. No one is a master or a slave. Thus, there is no fear a master will be a single point of failure. However, the masterless, fully distributed model with SNMP monitoring is not available in the open source version. Much simpler than its peers (such as Cassandra), Riak is optimal for places where even seconds of downtime would hurt.

9. Redis

There are many NoSQL databases, but Redis remains close to our heart because it has so many features that some call it a "data structure store." You don't just store numbers and strings -- you can dump in entire hashes, lists, sets, and other complicated structures. Then, to make the deal sweeter, Redis offers replication and persistence.

Redis is an advanced fast key-value database written in C which can be used like memcached, in front of a traditional database, or on its own. It has support for many programming languages & used by popular projects like GitHub or Engine Yard. There is also a PHP client named Rediska for managing Redis databases.

10. Firebird

Firebird is a relational database that can run on Linux, Windows & various UNIX platforms. It offers high performance and powerful language support for stored procedures and triggers.

11. Memcached 

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. It is intended for use in speeding up dynamic web applications by alleviating database load.

12. Oracle Berkeley DB

It is an embeddable database engine that provides developers with fast, reliable, local persistence with zero administration. Oracle Berkeley DB is a library that links directly into your application & enables you to make simple function calls rather than sending messages to a remote server for a better performance.

13. Hypertable

Hypertable is a high performance distributed data storage system designed to support applications requiring maximum performance, scalability, and reliability. It is modeled after Google's BigTable and mostly focuses on large-scale datasets.

14. Keyspace

It is a consistently replicated, fault-tolerant key-value store that works in Windows OS. Keyspace offers high availability by masking server/network failures & appearing as a single, highly available service.

15. 4store

4store is a database storage and query engine that holds RDF data. It is written in ANSI C99, designed to run on UNIX-like systems & offers a high performance, scalable & stable platform.

16. MariaDB

MariaDB is a backward compatible, drop-in replacement branch of the MySQL® Database Server. It includes all major open source storage engines + the Maria storage engine.

17. Drizzle

It is a fork of MySQL that focuses on being a reliable database optimized for Cloud and Net applications.

18. HyperSQL

It is a SQL relational database engine written in Java. HyperSQL offers a small & fast database engine which has in-memory and disk-based tables, supports embedded/server modes. Also, it has tools such as a command line SQL tool & GUI query apps.

19. MonetDB

MonetDB is a  database system for high-performance applications in data mining, OLAP, GIS, XML Query, text & multimedia retrieval.

20. Persevere

It is an object storage engine and application server (running on Java/Rhino) that provides storage of dynamic JSON data for rapidly develop data-driven JavaScript-based rich internet applications.

21. eXist-db

eXist-db is built using XML technology. It stores XML data according to the XML data model & features efficient, index-based XQuery processing.

Monday, December 23, 2013

Apple iPhone Application Development - Initial Steps

Apple iPhone Application Development - Initial Steps

Today, Apple iPhone application development is in full swing and iPhone developers are in great demand. In order to develop iPhone apps, you should be a good Objective C developer. If you have good grip on C++, OOPS Concepts, I can guarantee you that you can learn Objective C easily and quickly and can start building your iPhone apps. There are a lot of iPhone apps development tutorials available on the internet and very good iPhone apps development community on the stackoverflow, so you will not feel alone if you stuck anywhere while iPhone app development. Today, companies are hiring a lot of iPhone app developers for building their iPhone apps. XCode is the full featured tool which eases your iPhone app development to a large extent. A lot of demos, sample codes, sample applications are available on the internet which can fulfil your basic iPhone app functionalities. So, I am just giving the initial steps which you should take while iPhone app development.

Step 1: Think of a good idea

Have a unique idea for an iphone app? So what makes an app stand out?  Why would anyone want to use your app?  Why would they pay money for it if you are going to charge?

Be sure to check that there aren’t other apps that do the same thing that you are proposing. Or if you want to create something better than an app that already exists, think about how your idea will be better.  Draw it out on paper or on the computer.

Step 2: Get A Mac

The iPhone is an Apple product and uses a variation of the Mac OS. Currently, the iPhone development tools are only available for Mac users. You can buy a Mac mini relatively cheaply if you don’t have a Mac at your disposal.

Step 3: Register As An Apple Developer

To work with the Mac tools, you will need to become an official Apple Developer. Registration is free so you simply have to give them your information and agree to their terms.  You only need to register once, and you are able to use the same username and password used for your iTunes account. Once you are an Apple Developer, you can develop iPhone apps for any of the Mac products.

Step 4:  Download The Software Development Kit For iPhone (SDK)

Once you are an official developer, you can download the SDK for iPhone.  The version you need depends on the OS you are currently running.  This download is HUGE because it comes with all sorts of documentation, sample codes, and all sorts of things you will be glad to have later on. It could take a few hours, so you might want to start the download, put in a good movie, and wait.

Step 5: Download XCode

If you don’t already have it, download XCode.  According to Apple, “Xcode is a complete, full-featured IDE built around a smooth workflow that integrates the editing of source code, with the build and compile steps, through to a graphical debugging experience – all without leaving the view of your source code.”  This is another huge download, so you might want to rent a second movie.

Step 6: Develop Your iPhone App With The Templates In The SDK

Once you have your app drawn out on paper or in Photoshop, you can start designing it with the templates provided in the SDK.  This is where that HUGE amount of download time will be a huge benefit.  You will have lots of templates to choose from, and there are a lot of great YouTube clip tutorials on how to use the templates effectively.

Step 7: Learn Objective-C For Cocoa

If you love programming languages, you will love Objective-C.  If you don’t know how to program, this is the part that can get pretty sticky, so you might want to find a programmer friend or hire someone.  It really does help to get a book, too, for reference.

Step 8: Program Your App In Objective-C

Once you at least understand the basics of Objective-C (or at least know how to find answers to programming questions), you are ready to program your app.  It helps to take screenshots as you go along so you can remember what you tried.  Some apps can take just a few hours to program while other Apps can take months. Only you know how much detail you want out there for its maiden voyage in the App Store!

Step 9: Test The App In The iPhone Simulator

The SDK comes with a lovely iPhone Simulator.  You will need to load up your app and do your own testing.  You should try to work out as many bugs as possible and think about all the ways someone might use your app.

Step 10: Host A Bake Sale

Remember when I told you in the fine print that you would have to raise some cash?  This is that moment.  Sadly, loading an app into iTunes costs a one time member fee of $99 (USD).  There is no way out of this fee, but you might earn it back in triplicate if your app is worthy!  Truly though, you DO get a lot for your $99. For one, you get access to some of the coolest people on this side of Pluto!

Step 11: Have Others Test Your App

Once you pay your fee, you will be able to have others in the app community test your app and help you work out final bugs.  This is a great community, and testing new stuff is lots of fun. If you are a newbie like me, you will be in awe of the kings and queens of geeky stardom. Depending on the nature and complexity of your app, this process can take some time.

Step 12: Submit Your App For Approval

After testing your app in the community and working out all the bumps, you can submit the app to iTunes for approval.  You will be able to upload it right from the community.  The process of approval can take some time, so be patient!

Step 13: Watch The Dough & Traffic Roll In!

If you created a paid app, just wait for the money to roll in to shore. If you created a free app, watch the traffic!

ASP.NET Fundamentals: 7 Pillars of ASP.NET: A Basic Interview Question

ASP.NET Fundamentals: 7 Pillars of ASP.NET: A Basic Interview Question

If you are preparing for ASP.NET interview, must be ready for basic ASP.NET interview question "What are the Pillars of ASP.NET?" Pillars of ASP.NET means the fundamentals of ASP.NET like .NET Framework, CLS, CTS, MSIL, JIT, Object Oriented Concepts, Assemblies, DLLs, XCopy Deployment etc. I have listed down 7 Pillars of ASP.NET in detail.

7 Pillars of ASP.NET:

When ASP.NET was first released, there were seven key facts that differentiated it from previous Microsoft products and competing platforms. If you’re coming to ASP.NET from another web development platform, or you’re an old-hand .NET coder who has yet to try programming for the Web, these sections will quickly give you a bit of ASP.NET insight.


The .NET Framework is divided into an almost painstaking collection of functional parts, with tens of thousands of types (the .NET term for classes, structures, interfaces, and other core programming ingredients). 


ASP.NET applications, like all .NET applications, are always compiled. In fact, it’s impossible to execute C# or Visual Basic code without it being compiled first. 


No matter what language you use, the code is compiled into MSIL. MSIL is a stepping stone for every managed application. 


Perhaps the most important aspect of the ASP.NET engine is that it runs inside the runtime environment of the CLR. The whole of the .NET Framework—that is, all namespaces, applications, and classes—is referred to as managed code. Basic features of CLR are:

A) Automatic memory management and garbage collection
B) Type safety
C) Extensible metadata
D) Structured error handling
E) Multithreading


ASP.NET is truly object oriented. Not only does your code have full access to all objects in the .NET Framework, but you can also exploit all the conventions of an OOP (object-oriented programming) environment. 


ASP.NET addresses the problem of cross browser compatibility in a remarkably intelligent way. Although you can retrieve information about the client browser and its capabilities in an ASP.NET page, ASP.NET actually encourages developers to ignore these considerations and use a rich suite of web server controls. These server controls render their markup adaptively by taking the client’s capabilities into account. 


Every installation of the .NET Framework provides the same core classes. As a result, deploying an ASP.NET application is relatively simple. For no-frills deployment, you simply need to copy all the files to a virtual directory on a production server (using an FTP program or even a command-line command like XCOPY). 

ASP.NET Fundamentals: ASP.NET is integrated with the .NET Framework

ASP.NET Fundamentals: ASP.NET is integrated with the .NET Framework

The .NET Framework is divided into an almost painstaking collection of functional parts, with tens of thousands of types (the .NET term for classes, structures, interfaces, and other core programming ingredients). Before you can program any sort of .NET application, you need a basic understanding of those parts—and an understanding of why things are organized the way they are. The massive collection of functionality that the .NET Framework provides is organized in a way that traditional Windows programmers will see as a happy improvement. Each one of the thousands of classes in the .NET Framework is grouped into a logical, hierarchical container called a namespace. Different namespaces provide different features. Taken together, the .NET namespaces offer functionality for nearly every aspect of distributed development from message queuing to security. This massive toolkit is called the class library.

Interestingly, the way you use the .NET Framework classes in ASP.NET is the same as the way you use them in any other type of .NET application (including a stand-alone Windows application, a Windows service, a command-line utility, and so on). Although there are Windows-specific and web-specific classes for building user interfaces, the vast majority of the .NET Framework (including everything from database access to multithreaded programming) is usable in any type of application. In other words, .NET gives the same tools to web developers that it gives to rich client developers.

Tip: One of the best resources for learning about new corners of the .NET Framework is the .NET Framework class library reference, which is part of the MSDN Help library reference. If you have Visual Studio 2012 installed, you can view the MSDN Help library by clicking the Start button and choosing Programs ➤ Microsoft Visual Studio 2012 ➤ Microsoft Visual Studio 2012 Documentation (the exact shortcut depends on your version of Visual Studio). 

ASP.NET Fundamentals: ASP.NET supports all Browsers

ASP.NET Fundamentals: ASP.NET supports all Browsers

One of the greatest challenges web developers face is the wide variety of browsers they need to support. Different browsers, versions, and configurations differ in their support of XHTML, CSS, and JavaScript. Web developers need to choose whether they should render their content according to the lowest common denominator, and whether they should add ugly hacks to deal with well-known quirks on popular browsers.

ASP.NET addresses this problem in a remarkably intelligent way. Although you can retrieve information about the client browser and its capabilities in an ASP.NET page, ASP.NET actually encourages developers to ignore these considerations and use a rich suite of web server controls. These server controls render their markup adaptively by taking the client’s capabilities into account. One example is ASP.NET’s validation controls, which use JavaScript and DHTML (Dynamic HTML) to enhance their behavior if the client supports it. Another example is the set of Ajax-enabled controls, which uses complex JavaScript routines that test browser versions and use carefully tested workarounds to ensure consistent behavior. These features are optional, but they demonstrate how intelligent controls can make the most of cutting-edge browsers without shutting out other clients. Best of all, you don’t need any extra coding work to support both types of client.

ASP.NET Fundamentals: ASP.NET is Easy to Deploy and Configure

ASP.NET Fundamentals: ASP.NET is Easy to Deploy and Configure

One of the biggest headaches a web developer faces during a development cycle is deploying a completed application to a production server. Not only do the web-page files, databases, and components need to be transferred, but components need to be registered and a slew of configuration settings need to be re-created. ASP.NET simplifies this process considerably.

Every installation of the .NET Framework provides the same core classes. As a result, deploying an ASP.NET application is relatively simple. For no-frills deployment, you simply need to copy all the files to a virtual directory on a production server (using an FTP program or even a command-line command like XCOPY). As long as the host machine has the .NET Framework, there are no time-consuming registration steps. Chapter 18 covers deployment in detail.

Distributing the components your application uses is just as easy. All you need to do is copy the component assemblies along with your website files when you deploy your web application. Because all the information about your component is stored directly in the assembly file metadata, there’s no need to launch a registration program or modify the Windows registry. As long as you place these components in the correct place (the Bin subdirectory of the web application directory), the ASP.NET engine automatically detects them and makes them available to your web-page code. Try that with a traditional COM component!

Configuration is another challenge with application deployment, particularly if you need to transfer security information such as user accounts and user privileges. ASP.NET makes this deployment process easier by minimizing the dependence on settings in IIS (Internet Information Services). Instead, most ASP.NET settings are stored in a dedicated web.config file. The web.config file is placed in the same directory as your web pages. It contains a hierarchical grouping of application settings stored in an easily readable XML format that you can edit using nothing more than a text editor such as Notepad. When you modify an application setting, ASP.NET notices that change and smoothly restarts the application in a new application domain (keeping the existing application domain alive long enough to finish processing any outstanding requests). The web.config file is never locked, so it can be updated at any time.

ASP.NET Fundamentals: ASP.NET is Object-Oriented Language

ASP.NET Fundamentals: ASP.NET is Object-Oriented Language

ASP provides a relatively feeble object model. It provides a small set of objects; these objects are really just a thin layer over the raw details of HTTP and HTML. On the other hand, ASP.NET is truly object oriented. Not only does your code have full access to all objects in the .NET Framework, but you can also exploit all the conventions of an OOP (object-oriented programming) environment. For example, you can create reusable classes, standardize code with interfaces, extend existing classes with inheritance, and bundle useful functionality in a distributable, compiled component.

One of the best examples of object-oriented thinking in ASP.NET is found in server-based controls. Server-based controls are the epitome of encapsulation. Developers can manipulate control objects programmatically using code to customize their appearance, provide data to display, and even react to events. The low-level HTML markup that these controls render is hidden away behind the scenes. Instead of forcing the developer to write raw HTML manually, the control objects render themselves to HTML just before the web server sends the page to the client. In this way, ASP.NET offers server controls as a way to abstract the low-level details of HTML and HTTP programming.

Here’s a quick example with a standard HTML text box that you can define in an ASP.NET web page:

<input type="text" id="myText" runat="server" />

With the addition of the runat="server" attribute, this static piece of HTML becomes a fully functional server-side control that you can manipulate in C# code. You can now work with events that it generates, set attributes, and bind it to a data source. For example, you can set the text of this box when the page first loads using the following C# code:

void Page_Load(object sender, EventArgs e)
{
  myText.Value = "Hello World!";
}

Technically, this code sets the Value property of an HtmlInputText object. The end result is that a string of text appears in a text box on the HTML page that’s rendered and sent to the client.

HTML Controls VS. Web Controls

When ASP.NET was first created, two schools of thought existed. Some ASP.NET developers were most interested in server-side controls that matched the existing set of HTML controls exactly. This approach allows you to create ASP.NET web-page interfaces in dedicated HTML editors, and it provides a quick migration path for existing ASP pages. However, another set of ASP.NET developers saw the promise of something more—rich server-side controls that didn’t just emulate individual HTML tags. These controls might render their interface from dozens of distinct HTML elements while still providing a simple objectbased interface to the programmer. Using this model, developers could work with programmable menus, calendars, data lists, validators, and so on.

After some deliberation, Microsoft decided to provide both models. You’ve already seen an example of HTML server controls, which map directly to the basic set of HTML tags. Along with these are ASP.NET web controls, which provide a higher level of abstraction and more functionality. In most cases, you’ll use HTML server-side controls for backward compatibility and quick migration, and use web controls for new projects.

ASP.NET web control tags always start with the prefix asp: followed by the class name. For example, the following snippet creates a text box and a check box:

<asp:TextBox id="myASPText" Text="Hello ASP.NET TextBox" runat="server" />
<asp:CheckBox id="myASPCheck" Text="My CheckBox" runat="server" />

Again, you can interact with these controls in your code, as follows:

myASPText.Text = "New text";
myASPCheck.Text = "Check me!";

Notice that the Value property you saw with the HTML control has been replaced with a Text property. The HtmlInputText.Value property was named to match the underlying value attribute in the HTML <input> tag. However, web controls don’t place the same emphasis on correlating with HTML syntax, so the more descriptive property name Text is used instead.

The ASP.NET family of web controls includes complex rendered controls (such as the Calendar and TreeView), along with more streamlined controls (such as TextBox, Label, and Button), which map closely to existing HTML tags. In the latter case, the HTML server-side control and the ASP.NET web control variants provide similar functionality, although the web controls tend to expose a more standardized, streamlined interface. This makes the web controls easy to learn, and it also means they’re a natural fit for Windows developers moving to the world of the Web, because many of the property names are similar to the corresponding Windows controls.