What is a Web Database?
A web database is a database for the internet. You can get access to your data via the internet from anywhere in the world. Or, you can create a database driven website by using such databases. A web database stores large amount of information in an organized format that is easily accessible from scripting languages (like PHP).
In web databases, modifications, like the ones constantly used by e-commerce sites, for example, can be performed without any hassles .That makes the dense editing of the html code obsolete. Repeated types of data, like contact information, can be generated automatically in your website through a web database.
Daffodil DB: A web database
Daffodil DB is a J2EE-certified, SQL-99 and JDBC standards compliant Java RDBMS. It is the first java database which is compatible with PHP. With the release of PHP extension module, Daffodil DB has joined the select list of Java enabled web databases.
Daffodil DB is an ideal for anyone who is looking for a web database. It can be embedded within any application and delivers high performance with minimum system resource usage - thereby striking the right balance between size, features and performance. At less than 3 MB, Daffodil DB is a small/compact database.
Daffodil DB can run on virtually any platform as it supports all platforms for which a Java Virtual Machine (JVM) is available. These include Windows, Linux, Solaris and UNIX. With the help of Daffodil DB, developers can build applications for any platform and these can be compiled and delivered on all other major platforms.
PHP
PHP ( PHP Hypertext Preprocessor) is an open source server-side scripting language that is particularly suited for web development and can be used to generate dynamic web content.
PHP scripts are embedded within web pages along with HTML, similar to other web scripting languages such as Microsoft's ASP or Sun Microsystems's JSP. Like ASP and JSP, PHP runs on the web server when a page is requested via HTTP, rather than on the Web browser or other client.
PHP lets you insert instructions into your Web pages that your Web server software (be it Apache, Personal Web Server, or whatever) will execute before sending those pages to a browser that requests them.
PHP is easy to use for web development because it has been designed from the onset for the web environment. PHP has many built-in functions that make web programming simpler, so that programmers can focus on the logic of programming without wasting precious development time.
PHP as a language has its own way of doing things, and at the same time, has borrowed features from other languages. But for many people, the main reason for learning a scripting language like PHP is because of the interaction with databases it can offer. Moreover, PHP is cross platform i.e. it allows you to use/develop your solution on multiple OSs .
PHP is one of the fastest growing server side scripting languages around and you need to add it to your current arsenal of Perl, ASP, JSP, JavaScript, VBScript, Java...
PHP and Daffodil DB: Together??
Daffodil has come up with a PHP extension module that makes Daffodil DB/One$DB compatible with PHP. It is a database extension module driver that is required to work with Daffodil DB in PHP . This extension module uses the capabilities of a Java database and extends it to your web infrastructure.
By using this extensive module, PHP developers can create sophisticated data-driven web applications, having Daffodil DB as a web database, in a fraction of the time and with reduced cost.
PHP extension for Daffodil DB provides a simple, yet effective means for connecting to Daffodil DB from within PHP. The JVM is created using JNI invocation interface and everything runs in-process.
This PHP Extension module will boost open Source activities around Daffodil DB. Moreover, open Source stack -Linux, Apache, One$DB, and PHP; all being open source products, will give an ultimate combination to web development community.
PHP is platform independent, Daffodil DB is platform independent. PHP is free; so as Daffodil DB (open source version).PHP is open source; Daffodil DB has an open source version. So What about using the powers of two most promising technologies, PHP and Daffodil DB, together??
The capabilities of Daffodil DB & PHP can make up what must be the best blend for data-driven Web sites on the globe.
Users can use PHP and the Daffodil DB database to access/store information on the web and include it into their website. By using PHP as a front-end and Daffodil DB as a back-end web database, users can benefit from huge savings on the licensing costs of commercial alternatives.
Here are some practical examples where PHP and Daffodil DB, used together, can do wonders
Designing a database driven website
Any site that successfully attracts repeat visitors has to have fresh and constantly updated content. But this can be very tedious if your have a HTML based website. Moreover, the maintenance of a content-driven site can be a herculean task too. Many sites feel locked into a dry because rewriting those hundreds of HTML files to reflect a new look would take a long time. The solution of this problem is a database driven site.
In a database driven website, you have a web page that grabs information from a database (the web page is connected to the database by programming.) and inserts that information into the web page each time it is loaded. If the information stored in the database changes, the web page connected to the database will also change accordingly and automatically without human intervention.
This is commonly seen on online banking sites where you can log in (by entering your user name and password) and check out your bank account balance. Your bank account information is stored in a database and has been connected to the web page with programming thus enabling you to see your most updated banking information every time u access the site.
Add, edit & delete Web site content without using HTML
One great thing about a database-driven site is that it keeps your site design and content separate with each other. By achieving complete separation between your site's design and the content you want to present, you can work with each without disturbing the other. Instead of writing an HTML file for every page of your site, you only need to write a page for each kind of information you want to be able to present. Rather then endlessly pasting new content into your tired page layouts, create a simple content management system that allows the writers to post new content themselves without a lick of HTML!
If you have a large website and you want to change the design it can take a very long time to update and upload all the pages. With PHP and Daffodil DB your whole website could be managed in just one or two PHP scripts. These would access a Daffodil DB database to get the information for the pages. To update the website's design you would just have to change one page.
Banner Rotation
Banners can be found on any dynamic website, as moving text attracts the visitor of a site more than a static text. But a million dollar question is how these banners work. Actually, on a site where there is a banner running, a PHP script is called. This script opens a database and picks a random banner from it to show the visitor. It also counts the number of times the banner has been viewed and could, with a few changes, track clicks too. To add, change or edit the banners all that one need to do is just change the database and the script will pick the correct banners for all the pages on the site.
Forums
Forums/ message boards are among the most widely used applications of the internet. Now how do they work? Well, PHP magic again..!!! , and not to forget a web database is also needed to create such magic. These forums can be created using PHP and Daffodil DB. All the pages in the forum can be updated, whenever needed, by changing just one PHP script.
Apart from all above mentioned applications, there are some more areas where users can use Daffodil DB-PHP 'dynamic-duo'.
* Optimize the loading time of the website
* Build an ecommerce shopping cart
* Automatically send email on triggered events
* Handle file uploads using HTML forms
* Build a Web-based file repository or photo gallery
* Utilize sessions and cookies to track site visitors
Go Ahead: Give it a try
So now you are aware of both Daffodil DB and PHP, and what they can do, if used together. It's the time to try your hand on some simple PHP scripts.
Writing your first PHP Script
Writing your first PHP script may seem a little scary at first, but relax. It's really easy. Here is the code for your first simple PHP script.
< head >
< title>My first PHP script
head >
< body >
php echo 'Welcome to PHP '; ?>
|