You are here

Data Tables

In the examples below a variety of tables have been defined for a shop. For a real shop, more details will be required, but the purpose of these tables are to show a variety of aspects of Web-D-Zine(WDZ). These aspects are:-

  • Data structure - There are several tables here, showing various aspects of data structure. If you decide that you want to copy information from one table to another, for example user address and the delivery address in the basket, it will make your life easier if you use the same field names for both so a field called postCode in user address relates to postCode in the delivery address.
  • Encryption - Some details for the user are encrypted in the data base, but from the users point of view, they can still edit their details as if the data was in plain text. However, the details will be encrypted when they are stored in the data base
  • Parent, Child links - There are several parent - child links, shown. The product linked to pictures, the user and their addresses and the user linked to a basket which is in turn is the parent of several basket items. This last set of links identifies the limit of what the code will produce automatically for you, because you will need to add code manually for looking at the basket items.
  • Xref links - There are two types of xref links
    • Two different parents - This is shown in the comments where the user and the product are both parents to the comment.
    • A Xref link - A link has been created between two different products
  • Pressing the Go WDZ Button - The data structures below are used to create all the code, the forms and the display lists automatically for you. Look at Press the Go WDZ button to see what will be generated automatically.

Managing Data Tables

    • Edit
    • Project
    • Table Name
    • Name
    • Desc
    • Prefix
    • Three fields
    • Add TS
    • Edit - 25
    • Web-D-ZineE
    • exUser
    • User
    • For this example we have encrypted the email address and the telephone number as this could be classed as personal data
    • exu
    • true
    • true
    • Edit - 26
    • Web-D-ZineE
    • exAddress
    • Address
    • Account or delivery address for the user
    • exa
    • true
    • true
    • Edit - 27
    • Web-D-ZineE
    • exBasket
    • Basket
    • Stores the customers details but can also be used independently for users who want to check out as guests.
    • exb
    • true
    • true
    • Edit - 28
    • Web-D-ZineE
    • exBasketItems
    • Basket Items
    • Looks after the items in the basket. Each item in the basket has a status, because some items may not be shipped with the initial delivery
    • exbi
    • true
    • true
    • Edit - 23
    • Web-D-ZineE
    • exProduct
    • Product
    • The example product only has a few fields associated with it like name and description. Real products have more fields associated with them like stock control, reorder levels etc.
    • exp
    • true
    • true
    • Edit - 24
    • Web-D-ZineE
    • exImages
    • Images
    • The images associated with the product, this table is a child of the parent product.
    • exi
    • true
    • true
    • Edit - 30
    • Web-D-ZineE
    • exProductXref
    • Product Links
    • Shows how products are linked together. This is also an example of a cross reference table where the two parents are from the same table
    • exl
    • true
    • true
    • Edit - 29
    • Web-D-ZineE
    • exComment
    • Comment
    • Looks after the comments a user makes about a product. This is also an example of a xref table where the parents are in different tables
    • exc
    • true
    • true
    • Edit - 31
    • Web-D-ZineE
    • exDialogue
    • Dialogue
    • Looks after the dialogue between vendor and customer after the initial comment is left by the customer
    • exd
    • true
    • true