From Database To Object Oriented
-
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 ???
-
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 ???
I go for #3. from DB to OO, check http://www.mygenerationsoftware.com. My Number 1 choice.
-
I go for #3. from DB to OO, check http://www.mygenerationsoftware.com. My Number 1 choice.
opps this is an application ... i need to know the algos .... if there are a documentation or something like that ... thanks a lot
-
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 ???
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.