Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. xml datatype

xml datatype

Scheduled Pinned Locked Moved Visual Basic
questiondatabasedesignbusinessxml
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Ebube
    wrote on last edited by
    #1

    i am designing a database for inventory the field requirements vary a lot depending on the product nature? The fields for Digital Cameras (number of pixels, maximum zoom, type of storage) would be very different from say, Hard Disks (capacity, interface type, speed, form-factor). i hav a tables with the shema product proid int prodname varchar proattribute xml catid int category catid int catname vachar prodincatattribut (xsd) how can i be to able to store the attribute for a category of product as prodincatattribut (.xsd) as define by user . and ties the proattribute(xml) to it. so that users can only put the values of this attribute or any other better design approach will be appriciate

    J 1 Reply Last reply
    0
    • E Ebube

      i am designing a database for inventory the field requirements vary a lot depending on the product nature? The fields for Digital Cameras (number of pixels, maximum zoom, type of storage) would be very different from say, Hard Disks (capacity, interface type, speed, form-factor). i hav a tables with the shema product proid int prodname varchar proattribute xml catid int category catid int catname vachar prodincatattribut (xsd) how can i be to able to store the attribute for a category of product as prodincatattribut (.xsd) as define by user . and ties the proattribute(xml) to it. so that users can only put the values of this attribute or any other better design approach will be appriciate

      J Offline
      J Offline
      Johan Hakkesteegt
      wrote on last edited by
      #2

      Think templates. Each product category should get it's own attribute template. By assigning a category to a certain product, the product will also get that category's attribute template.

      My advice is free, and you may get what you paid for.

      E 1 Reply Last reply
      0
      • J Johan Hakkesteegt

        Think templates. Each product category should get it's own attribute template. By assigning a category to a certain product, the product will also get that category's attribute template.

        My advice is free, and you may get what you paid for.

        E Offline
        E Offline
        Ebube
        wrote on last edited by
        #3

        what do you mean by attribute template

        J 1 Reply Last reply
        0
        • E Ebube

          what do you mean by attribute template

          J Offline
          J Offline
          Johan Hakkesteegt
          wrote on last edited by
          #4

          Ebube wrote:

          The fields for Digital Cameras (number of pixels, maximum zoom, type of storage) would be very different from say, Hard Disks (capacity, interface type, speed, form-factor)

          Like you said, each product type (= category) has it's own attributes. So you create one xml template (xsd) per category. Then you have a choice, you can save the templates with unique names in a folder, and save the names to the Categories table, or you can try and save the entire file as a blob, or bits to the database (I would go with the first option). Then when a new product is entered into the system, you create a new xml file based on the correct attribute template, based on the category the user chooses for the product.

          My advice is free, and you may get what you paid for.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups