6 green 7 I really like blue As

6 I really like blue
As you can see here, the poll, option, and votes elements can all be stored in a single XML file. Let’s assume we did not consider that a user might want to add comments to polls. To include the comments in the relational model, we would have to create a table for the comments. In XML we just add comment elements to the XML file. The really big advantages of XML over a relational model are the following: . SQL has a proprietary model for metadata while XML uses an open standard. . SQL is more or less a standard, but the way in which the data is internally stored is proprietary to each DBMS. . You cannot take a table and understand content without the DBMS interpretation and reporting facilities. . XML is designed for data interchange while the relational model has to bolt on transform tools. . You cannot send a proprietary SQL table in open code form. With XML, you can send simple XML files. Any transformation problems are also addressed by the open standard of XSLT. Finally, to implement an XML-based data model in PHP you must first define how, where, and why to store the data stream. You could use plain files somewhere in the file system or you could use an XML repository solution, like Ozone or dbXML (http://www.dbxml.org/). Chapter 21 has more in-depth coverage of PHP’s XML APIs. There we cover reading, writing, and transforming. Hybrid Model The hybrid data model combines two or more different data modeling strategies. For example, you can have a relational model and a set of XML DTDs and files co-existing in the same application. Hybrid models add complexity to the content layer since there will be more than one interface to store and retrieve data. Although hybrid models demand high levels of design skill at the planning stage, they are the most flexible, scalable, and useful in today’s e-business world. The Logic Layer The logic layer is where you find all the intelligence of an application. In this layer you manipulate data pulled from the content layer and prepare it. Data manipulation like calculations, transformations, statistical information, security, and audit pathing are all set by the logic tier. User tracking systems, logging systems, caching systems, and many others are found at the heart of this layer. The most important consideration about the logic layer in PHP is to design it in a modular way. You can design separate classes/functions for the different business rules or functions that the application demands. In our polls example, we could create a Polls class where we encapsulate all the methods needed for Page 532
Note: If you are looking for cheap and inexpensive provider to host and run your tomcat application check professional tomcat hosting services

Comments are closed.