SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Southern California, USA
    0 Post(s)
    0 Thread(s)

    Web vs. Traditional - Database Design


    I think they're about the same, but is there any difference between traditional database design versus web database design. What do I have to keep in mind about web database design?


  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Toronto, Canada
    63 Post(s)
    3 Thread(s)
    bottom line: a well designed database is designed not with regard to the transport mechanism that conveys requests and returns results, but on other issues, such as, for example, the types of requests, the inherent characteristics of the data, and the business rules which govern its creation and modification

    what to keep in mind? web form submissions translate into requests for action and/or data, and those requests translate into sql queries, and the sql queries will be as easy or as complex as the logical and physical structure of the tables in the database, so design your tables with that in mind | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Washington, DC
    4 Post(s)
    0 Thread(s)
    A little less theoretical:

    A fundamentally well normalized database will work well for the web. All the web is, after all, is a presentation layer for databases.

    Some tricks:

    When making complex queries, use views as the basic complex query. EG: You have a 5 table wide join to bring in all the relevent data about a product. Build a view with all the products properly joined. Then query the view instead of repeating the SQL everywhere. Better yet, build your common queries into stored procedures.

    When updating, stick with stored procedures wherever possible.


  4. #4
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    0 Post(s)
    0 Thread(s)
    As said, the fundamental principles of normalization apply for both. Web Apps are significantly different to traditional client server apps in many ways:

    a) they are often used for 99% data display: index everything well.

    b) they are in a very hostile environment: tighten up DB security, use stored procedures, sanitize input

    c) They can often be partitioned into 2 databases: one for Business Data and one for Application Data, track session state, protocol emails, cache large resultssets / whatever in a separate Database. This helps when managing the Size of DB Files.

    d) Web DBs are often not accessible with management tools due to firewalls, automate common tasks in stored procedures, buy beg or borrow a web frontend to the DB Server

    e) Web DBs are in a volatile environment, your site can go from 5000 to 50000 visitors overnight, this rarely happens in traditional C/S systems. So tune for performance and minimum resource utilization as much as possible.

    f) Be Agile. Web apps change nearly daily, as requirements change daily. Build a system which is flexible enough to keep on running even if you start making minor changes to the schema before updating the app. This is (for me anyway) the most challenging part



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts