realbasic-nug
[Top] [All Lists]

Re: server database design

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: server database design
From: Norman Palardy <npalardy at great-white-software dot com>
Date: Fri, 28 Jul 2006 10:28:03 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <46f dot 3a158c80 dot 31fb90b7 at aol dot com>

On Jul 28, 2006, at 10:09 AM, GAmoore at aol dot com wrote:

What would be the file/table architecture for this situation? Suppose you have a company that puts out a spring catalog, a fall catalog, a summer catalog
and winter catalog   - made up of the same items and going to the same
customers.

If you had this on a server, would you have one big database with an items table and customers table, then have a table for winter 2005, spring 2005, .... winter 2009, etc? Or would you have the base info in one file (items and
customers) then have a separate file for each catalog?

Greg

That really depends on what would be needed.
Would you need to know pages, etc that each item is on ?

Since the basic items are the same (or similar) the catalog is basically a cross reference between the catalog issue its in, and the items that are actually in it.

You might make the table that is

        CATALOG
                catalog_name (spring 2005, summer 2005, fall 2005, winter 2005, 
etc)
                catalog_id (1,2,3,4)

Then a table that is the cross reference between catalog and products

        CATALOG_ITEMS
                catalog_id
                product_id

This set up allows you to rename a catalog without actually doing anything other than changing the name.
Duplicating a catalog is
        make a new entry in the CATALOGS table (this gets a new name and ID)

insert into CATALOG_ITEMS ( new id from previous step, product_id ) select product_id from CATALOG_ITEMS where catalog_id = catalog you want to copy

Now this may be simplistic as it does not hold things like page layout information which may be important.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>