Skip to main content
Participant
November 7, 2006
Question

Best way to store info for Yellow Pages-type site?

  • November 7, 2006
  • 2 replies
  • 326 views
I'm working on a site that is similar in concept to a "Yellow Pages"-type setup, where you have a bunch of business listings with each of them able to customize their own profile.

Each business will be able to save standard things like its tel, fax, address, description, etc. There would also be a list of specific checkboxes for each business, such as "Delivery Available", "Open 24 Hours", "Now Hiring", etc. Also, businesses with multiple locations will be able to save these locations with their own specific tel, address, and other info. Lastly, they will be able to customize their listing to match their corporate look.

Whereas the searches will of course be database driven, I'm having trouble deciding which of the following ways to display a specific business information on their actual specific profile pages.

Database-only: Everytime any info about a business is needed, it's pulled via a database call.

XML: Create a single XML file for each business (named after its ID) with all of the business info and styles, load it, and pull from there.

Hybrid: Use database calls for the business' text information, but create a CSS stylesheet named after the business' ID for use in the business profile's layout.


Which of these would be most efficient and have the least server impact?
    This topic has been closed for replies.

    2 replies

    November 7, 2006
    Think it as a whole.
    Database will probably be faster than xml, particulary under heavy load.
    Under heavy load, your web and coldfusion server will work much more than your database server. You can even use stored procedure to load off your web server. Don't hurry, database servers are made to support a great charge, and in case of saturation, there are many solutions.
    November 7, 2006
    Think about a business wanting to update their information. New store, new address, phone number changes, no longer open 24 hours a day, new logo, etc.

    Now which of your three approaches looks most viable?

    Go with the database.
    Participant
    November 7, 2006
    I apologize - I should have clarified the XML and hybrid options. Let me do that:

    The customer's information will be stored in a database. When they go to edit their information, the editors will populated from the database. However, once they hit "save" the site will write an XML file with that information. If they update again, that same file is overwritten.

    Now, everytime someone visits their profile, the profile's characteristics and info are pulled from that XML file. The intent is to take a load off the DB so it can perform better for searches, updates, and other truly dynamic features for the site. My feeling is that there's no need to hit the database for the company profiles since it's information that would normally change pretty infrequently. For up-to-the-minute information (news, search results, forums, etc.), however, i would continue to do direct database calls via cfc's or whatever.

    My basic question is: what is easier for CF to do: 1) Parse an existing static XML document or 2) query and pull the appropriate info from a live database?

    Keep in mind that this site will eventually have thousands of businesses and a lot of activity outside of their profiles (event schedules, news, reviews, etc.).