Database-Driven Web Sites Presented by Xueying Bai Nov. 23 2004 Overview 1. Introduction 2. When and why to build a database-driven Web site? 3. Choosing a database 4. Choosing a scripting language 5. Why information architects should be concerned? 6. Conclusion 7. References Static Web pages vs. dynamic Web pages Static Web pages Data is stored in .html files Won't change until someone changes their source codes Dynamic Web pages Web pages that respond to users' requests and gather information from them. Oftentimes, they have built-in links to a database, from which they extract data based on input from the users Created in real time What is data and database? Data: a general term meaning the facts, numbers, letters, and symbols processed by a computer or communications system to produce information. In a computer system these items are stored in files. Database: A collection of related files is a database What is a database-driven Web site? Definition: A database-driven Web site is a Web site that uses a database to gather, display, or manipulate information Example: News sites: CNN.com and MSNBC.com E-commerce companies: Amazon.com, which is a Web interface of a big-sized database system containing customer and transactional information. When do we need a databasedriven web site? We would need a database-driven Web site if our information changes very often, just like in a banking site Most organizations have a great deal of information in databases and could benefit if this information is made available online When the content on a site reaches critical mass, it's time to stop managing it as “resources embedded in static HTML" and start to create a database-driven Web site Why do we need database-driven Web sites? (I) Web pages of database-driven Web sites are created dynamically (in real time) thus giving a Web site visitor an up-to-date view of information stored in the database. Users can do their own maintenance via a set of Webbased data entry forms Such as we can change our address, credit card information of our Amazon account by ourselves The information that the Web site visitor sees on a dynamic Web page can be quickly customized For example, the sort order of the items can be changed or certain database fields can be shown or hidden Why do we need database-driven Web sites? (II) The look & feel of the database-driven pages can be easily changed vs. having to redo dozens if not hundreds or thousands of static Web pages in the event that a site's design needs to be modified Several different views of the database information can be presented in the same time For example, the items could be presented in alphabetical order by name but then could also be sorted and presented by cost The site visitor can do a search on the items in the database It is easy for Web masters to maintain the Web sites 3. Choosing a database Commercial databases: Oracle, SQL Server Cost: expensive Hardware requirements: high Target customers with more specific needs than open source databases (enterprise edition and standard edition) Have an impressive array of advanced features Open source databases: MySQL, PostgreSQL Cost: cheap Hardware requirements: low Be lack of some advanced features Oracle Oracle databases are used by the big-sized businesses which stored data >= 100GB Strengths full of features fast reliable Weaknesses Very expensive High hardware requirement SQL Server SQL Server caters to small and mid-sized businesses Strengths Overtakes Oracle as the No. 1 DBMS on Windows Cheaper than Oracle Weaknesses SQL Server can't scale. SQL Server is not very secure. Prices comparison between Oracle and SQL Server Number of CPUs Oracle 10g Enterprise Edit ion SQL Server 2000 Enterprise Edition 1 $40,000 US $19,999 US 2 $80,000 US $39,998 US 4 $160,000 US $79,996 US 8 $320,000 US $159,992 US 16 $640,000 US $319,984 US 32 $1,280,000 US $639,968 US MySQL vs. PostgreSQL MySQL is the most popular open source database vs. PostgreSQL is the most advanced open source database MySQL is faster than PostgreSQL MySQL is used more often than PostgreSQL MySQl has stronger community and resource support than PostgreSQL MySQL lacks some advanced features that PostgreSQL has. Choosing a Scripting language Open-source scripting languages PHP JSP Perl Proprietary scripting languages ASP.NET Cold Fusion PHP Strengths Cost: PHP is free. Portability: can be compiled for any operating system Ease of Maintenance Maturity: mature enough to be used in any production environment Weaknesses Be lack of exceptions, event-based error-handling instances Its function names are case insensitive JSP (Java Server Pages) Strengths Platform independent: write once, run anywhere Developers can extend the JSP language Easily write and maintain pages Weakness One significant disadvantage of JSP documents is that no XML-compliant version of JSP comments exists. A JSP document developer can use client-side (HTML-/XML-style) comments or embed Java comments. Perl Strengths There is a big developer community and a great deal of support for Perl Perl is good for quick, single Web sites Weakness Some of the syntax is quite frightening ASP.NET ASP.NET is the product of Microsoft Strengths Developers can choose many programming languages (ASP.NET works with scripted languages such as VBScript, JScript, Perlscript, and Python, as well as compiled languages such as VB, C#, C, Cobol, Smalltalk, and Lisp) Developers can use many development environments (such as WebMatrix, a community-supported tool, Visual Studio .NET, or various Borland tools such as Delphi and C++ Builder) to create ASP.NET pages Weakness It needs more memory usage and more execution time. Cold Fusion Cold Fusion is the product of Macromedia Strengths A very nice development environment called Macromedia ColdFusion MX 6.1 Fewer lines of code than ASP, PHP, and JSP Easy to learn and write Weakness Harder to maintain Why information architects should be concerned? (1) How to show retrieval results from databases: sorting and ranking Sorting: helpful to users who want to make a decision or take an action Example: Amazon.com Ranking: there is a need to understand information or learn something Example: UTNetCAT Why information architects should be concerned? (2) Show retrieval results in sets of pages Example: Google Why information architects should be concerned? (3) "Hidden Web“ problem Valuable data is buried alive in isolated databases Information architects need to work together with developers and system integrators to provide users with intellectual access to information and data, independent of format Why information architects should be concerned? (4) "deep Web" search engine The information inside Web databases is called the "deep Web". Information architects of database-driven Web sites should provide Web sites' users the "deep Web" search engine to easily and quickly access data in database (such as search engine of Amazon.com, users can use it to search information about books, DVDs etc. that is stored in the database). Why information architects should be concerned? (5) Proper database and scripting language choice Increase of data size: according to the Web site's longtime requirements Now: 5000 users 2 years later: 50000 users Speed: if there are thousands of users per second visit your Web site, you can’t use ASP.NET because it needs more memory usage and more execution time Conclusion The exponential increase of the number of database-driven Web sites on the Internet Information architects should know: When and why they need to build databasedriven Web sites and How to build good database-driven Web sites. References (1) Boulton, C. (2003). Are Open Source Databases Following in Linux' Footsteps? Retrieved Oct. 22, from http://boston.internet.com/news/article.php/2221901 Building database driven Websites using Dreamweaver (n.d.). Retrieved Oct. 22, from http://www2.shu.ac.uk/schools/cms/itf/course2.cfm?Course_ID=building Cold Fusion Overview (n.d.). Retrieved Oct. 22, from http://telecom.fit.edu/cfdocs/gettingstarted/gs030006.htm Database-driven Web Sites (n.d.). Retrieved Oct. 20, from http://www.crendo.com/database-driven-websites.htm Database driven websites (n.d.). Retrieved Oct. 20, 2004, from http://www.summersault.com/services/database.html Definition of PostgreSQL(n.d.). Retrieved Nov. 15 2004, from http://www.wordiq.com/definition/PostgreSQL#Features DevGuy(2002). Avoid PHP code leaks - Source Guardian. Retrieved Oct. 21, from http://www.pchardware.ro/Articles/article.php?id=179&p=2 Gary, R. (2000). Designing a Database-Driven Web Site, or, The Evoluation of the INFOIGUANA. Retrieved Oct. 20, 2004, from EBSCOhost database. References (2) Gesker, D. (2001) Alternatives for Dynamic Web Development Projects. Retrieved Oct. 20, 2004, from ACM database. Ghanem, T. & Aref, W. (2004). Databases Deepen the Web. Retrieved Oct. 20, 2004, from IEEE Xplore database. Hull, S (n.d.). PHP and ASP.NET Go Head-to-Head. Retrieved Oct. 22, from http://www.oracle.com/technology/pub/articles/hull_asp.html Ian Gilfillan (2003). PostgreSQL vs MySQL: Which is better? Retrieved Nov. 13, from http://www.databasejournal.com/features/mysql/article.php/3288951 JavaServer Pages Overview (n.d.). Retrieved Oct. 22, from http://java.sun.com/products/jsp/overview.html Lowe S. (2002). Selecting a database: Open source or commercial? Retrieved Nov. 13, from http://techrepublic.com.com/5100-6265_111054291-2.html Macromedia ColdFusion MX 6.1(n.d.). Retrieved Nov. 13, from http://www.macromedia.com/software/coldfusion/ Rosenfeld, L. & Morville, P. (2002). Information Architecture for the World Wide Web (2nd ed.). Sebastopol, CA: O'Reilly and Associates, Inc. Questions? Thank you!