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. Design and Architecture
  4. From Database To Object Oriented

From Database To Object Oriented

Scheduled Pinned Locked Moved Design and Architecture
databasehelpcsharpoop
4 Posts 3 Posters 11 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.
  • H Offline
    H Offline
    Hasan Jaffal
    wrote on last edited by
    #1

    i'm making an application in vb.net i made the database and i need to go to the classes... amy documentation can help me ????? while i'm trying i faced a problem with foreing keys ex : table house (id,name,address) table room (id,name,housid) so i pass to class by wich way : --------------------------------------------- 1- class house - id as integer - name as strind - address as string class room -id as integer -name as string -hous as house ----------------------------------------------- 2- class house - id as integer - name as strind - address as string - rooms () as room class room -id as integer -name as string ----------------------------------------------- 3- class house - id as integer - name as strind - address as string - rooms () as room class room -id as integer -name as string -hous as house wich choice ... if there are an alogrithm to make the pass from db to oo so can u help me ???

    O D 2 Replies Last reply
    0
    • H Hasan Jaffal

      i'm making an application in vb.net i made the database and i need to go to the classes... amy documentation can help me ????? while i'm trying i faced a problem with foreing keys ex : table house (id,name,address) table room (id,name,housid) so i pass to class by wich way : --------------------------------------------- 1- class house - id as integer - name as strind - address as string class room -id as integer -name as string -hous as house ----------------------------------------------- 2- class house - id as integer - name as strind - address as string - rooms () as room class room -id as integer -name as string ----------------------------------------------- 3- class house - id as integer - name as strind - address as string - rooms () as room class room -id as integer -name as string -hous as house wich choice ... if there are an alogrithm to make the pass from db to oo so can u help me ???

      O Offline
      O Offline
      Old John
      wrote on last edited by
      #2

      I go for #3. from DB to OO, check http://www.mygenerationsoftware.com. My Number 1 choice.

      H 1 Reply Last reply
      0
      • O Old John

        I go for #3. from DB to OO, check http://www.mygenerationsoftware.com. My Number 1 choice.

        H Offline
        H Offline
        Hasan Jaffal
        wrote on last edited by
        #3

        opps this is an application ... i need to know the algos .... if there are a documentation or something like that ... thanks a lot

        1 Reply Last reply
        0
        • H Hasan Jaffal

          i'm making an application in vb.net i made the database and i need to go to the classes... amy documentation can help me ????? while i'm trying i faced a problem with foreing keys ex : table house (id,name,address) table room (id,name,housid) so i pass to class by wich way : --------------------------------------------- 1- class house - id as integer - name as strind - address as string class room -id as integer -name as string -hous as house ----------------------------------------------- 2- class house - id as integer - name as strind - address as string - rooms () as room class room -id as integer -name as string ----------------------------------------------- 3- class house - id as integer - name as strind - address as string - rooms () as room class room -id as integer -name as string -hous as house wich choice ... if there are an alogrithm to make the pass from db to oo so can u help me ???

          D Offline
          D Offline
          dukemus
          wrote on last edited by
          #4

          What you describe is a tree. Depending on the direction you want to go in the tree you should choose 2 or 3: 2 if you go from the root to leafs (you have the house and you want the rooms) or both ways (previous + you know the room and want to find the house it belongs). Choise 3 is more complete and memory used to keep the pointer to house is small 4B. Usualy I do like this: a row in a table contains all the members of a class - each row = object; procedures that insert/update/delete in the database are methods of the class, each method calling corresponding stored procedure. Columns (members of classes) are accessed (read/write) through properties or functions offering a good consistency check even from the input of data.

          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