Author |
Topic |
grandhi
Starting Member
31 Posts |
Posted - 2013-05-23 : 04:06:17
|
Hi All, I don't know,is it correct question or not,but if it is doable,it will be useful in my database Design.I want to store Cuboid dementions in my databse table,each cuboid dimention format is in following below.{{xmin,ymin,zmin},{xmax,ymax,zmax}}.I have 30 dimentions,all are same format what I mention above.I want to create Table for this type of data.For this I tried with following code.after evaluation below code,it returns (1 row(s) affected)CREATE TABLE DimentionsTable (Xmin int,Ymin int,Zmin int,Xmax int,Ymax int,Zmax int);INSERT into DimentionsTable values(10,20,30,40,50,60) Know,I connected DB through WolframMathematica.I fetching data from DB.but I am getting output like {10,20,30,40,50,60},Indirectly it returns first row values in list form.But I want the format {{10,20,30},{40,50,60}}.for this How can I make table.I hope you understood,what I am trying.is it doable?Thank you. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-05-23 : 04:15:55
|
you can store them in separate rows if you want fields will beItemID DimensionID XVal YVal ZVal1 1 10 20 301 2 40 50 60 then based on dimensionid value you can get various coordinates------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
shettybhas
Starting Member
3 Posts |
Posted - 2013-05-23 : 04:18:44
|
quote: Originally posted by grandhi Hi All, I don't know,is it correct question or not,but if it is doable,it will be useful in my database Design.I want to store Cuboid dementions in my databse table,each cuboid dimention format is in following below.{{xmin,ymin,zmin},{xmax,ymax,zmax}}.I have 30 dimentions,all are same format what I mention above.I want to create Table for this type of data.For this I tried with following code.after evaluation below code,it returns (1 row(s) affected)CREATE TABLE DimentionsTable (Xmin int,Ymin int,Zmin int,Xmax int,Ymax int,Zmax int);INSERT into DimentionsTable values(10,20,30,40,50,60) Know,I connected DB through WolframMathematica.I fetching data from DB.but I am getting output like {10,20,30,40,50,60},Indirectly it returns first row values in list form.But I want the format {{10,20,30},{40,50,60}}.for this How can I make table.I hope you understood,what I am trying.is it doable?Thank you.
Create your Table Structure as below with flag of Min & max Seprately.XValue - x ValueYValue - y ValueZValue - z ValueFlag - 0 For Min and 1 For MaxInsert the rows seperately for Min and Max, so you will get seperate rows for Min & Max as you desired. |
|
|
|
|
|