visual3d:documentation:definitions:file_formats:sql_database_definition
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:definitions:file_formats:sql_database_definition [2024/06/19 12:47] – sgranger | visual3d:documentation:definitions:file_formats:sql_database_definition [2024/07/17 15:45] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{the exporting of data from visual3d | + | ====== SQL Database Definition ====== |
+ | |||
+ | The exporting of data from Visual3D | ||
\\ | \\ | ||
- | there are no restrictions as to which database system is used since connection to it is provided by odbc connections. | + | There are no restrictions as to which database system is used since connection to it is provided by ODBC connections. |
\\ | \\ | ||
- | the data structure is normalized to eliminate redundant data entry. | + | The data structure is normalized to eliminate redundant data entry. |
\\ | \\ | ||
- | note that some rdbms systems may need add-on modules or extensions to support | + | Note that some RDBMS systems may need add-on modules or extensions to support |
\\ | \\ | ||
- | the picture below illustrates the how the visual3d | + | The picture below illustrates the how the Visual3D |
\\ | \\ | ||
- | exporting_data_to_a_relational_database_doc_27915504.jpg | + | {{: |
\\ | \\ | ||
- | ==== table structure definition ==== | + | === Table Structure Definition |
- | the actual | + | The actual |
- | |**table name** |**description** |**columns** | | + | |**TABLE NAME** |**DESCRIPTION** |**COLUMNS** | |
- | |l0_cmo | + | |L0_cmo |
- | |l1_c3dfile | + | |L1_c3dfile |
- | |l2_type | + | |L2_type |
- | |l2_events | + | |L2_events |
- | |l3_folder | + | |L3_folder |
- | |l4_name | + | |L4_name |
- | |l5_framedata | + | |L5_framedata |
- | |l6_framedata | + | |L6_framedata |
- | |patient\\ (optional)|a sample patient table for linking to cmo' | + | |Patient\\ (OPTIONAL)|A sample patient table for linking to CMO' |
- | **sample sql scripts** to create this table structure are available for sql server, mysql, and ms access. | + | **Sample SQL scripts** to create this table structure are available for SQL Server, MySQL, and MS Access. |
\\ | \\ | ||
- | ==== parsing raw data ==== | + | === Parsing Raw Data === |
- | the data exported from visual3d | + | The data exported from Visual3D |
\\ | \\ | ||
Line 49: | Line 51: | ||
- | ==== signal example ==== | + | === Signal Example |
- | for a target signal called “lank” we would see a row in the database for the signal name in l4_name | + | For a target signal called “LANK” we would see a row in the database for the signal name in L4_name |
\\ | \\ | ||
- | in the l6_framedata | + | In the L6_framedata |
\\ | \\ | ||
- | 2847 849 ^1@x@0.106221@y@0.292641@z@1.214349@residual@0.000000@camera\\ | + | 2847 849 ^1@X@0.106221@Y@0.292641@Z@1.214349@Residual@0.000000@Camera\\ |
- | bits@0.000000^2@x@0.106105@y@0.292334@z@1.214423@residual@0.000000@camera\\ | + | bits@0.000000^2@X@0.106105@Y@0.292334@Z@1.214423@Residual@0.000000@Camera\\ |
- | bits@0.000000^3@x@0.106000@y@0.292041@z@1.214490@residual@0.000000@camera\\ | + | bits@0.000000^3@X@0.106000@Y@0.292041@Z@1.214490@Residual@0.000000@Camera\\ |
- | bits@0.000000^4@x@0.105904@y@0.291758@z@1.214550@residual@0.000000@camera\\ | + | bits@0.000000^4@X@0.105904@Y@0.291758@Z@1.214550@Residual@0.000000@Camera\\ |
- | bits@0.000000^5@x@0.105815@y@0.291485@z@1.214604@residual@0.000000@camera\\ | + | bits@0.000000^5@X@0.105815@Y@0.291485@Z@1.214604@Residual@0.000000@Camera\\ |
- | bits@0.000000^6@x@0.105729@y@0.291216@z@1.214653@residual@0.000000@camera\\ | + | bits@0.000000^6@X@0.105729@Y@0.291216@Z@1.214653@Residual@0.000000@Camera\\ |
- | bits@0.000000^7@x@0.105646@y@0.290951@z@1.214699@residual@0.000000@camera\\ | + | bits@0.000000^7@X@0.105646@Y@0.290951@Z@1.214699@Residual@0.000000@Camera\\ |
- | bits@0.000000^8@x@0.105563@y@0.290686@z@1.214741@residual@0.000000@camera\\ | + | bits@0.000000^8@X@0.105563@Y@0.290686@Z@1.214741@Residual@0.000000@Camera\\ |
- | bits@0.000000^9@x@0.105480@y@0.290420@z@1.214782@residual@0.000000@camera\\ | + | bits@0.000000^9@X@0.105480@Y@0.290420@Z@1.214782@Residual@0.000000@Camera\\ |
- | bits@0.000000^10@x@0.105395@y@0.290150@z@1.214822@residual@0.000000@camera | + | bits@0.000000^10@X@0.105395@Y@0.290150@Z@1.214822@Residual@0.000000@Camera |
\\ | \\ | ||
- | this approach makes parsing the data fairly straightforward using the built-in parsing tools of today’s programming languages. | + | This approach makes parsing the data fairly straightforward using the built-in parsing tools of today’s programming languages. |
\\ | \\ | ||
Line 75: | Line 77: | ||
< | < | ||
- | dim recset | + | Dim recset |
- | dim frames() | + | Dim frames() |
- | dim frameparts() | + | Dim frameparts() |
- | dim sqlstr as string | + | Dim SQLstr As String |
- | dim frametime | + | Dim frametime |
- | dim i as integer | + | Dim i As Integer |
- | dim x as integer | + | Dim x As Integer |
- | ‘ get the unparsed data signals | + | ‘ Get the unparsed data signals |
- | | + | |
- | ("select | + | ("Select |
| | ||
- | | + | |
- | ‘ parse out the frames for this signal – by the ^ delimiter | + | ‘ Parse out the frames for this signal – by the ^ delimiter |
- | frames = split(recset!bigdata, | + | frames = Split(recset!bigdata, |
| | ||
- | | + | |
- | | + | |
‘ where framepart(0) is always the frame number and then label-value pairs follow | ‘ where framepart(0) is always the frame number and then label-value pairs follow | ||
- | frameparts = split(frames(i), " | + | frameparts = Split(frames(i), " |
| | ||
- | ‘ store each signal component | + | ‘ Store each signal component |
- | | + | |
- | | + | |
- | sqlstr | + | SQLstr |
- | | + | |
- | sqlstr | + | SQLstr |
- | sqlstr | + | SQLstr |
- | | + | |
- | | + | |
| | ||
- | | + | |
| | ||
- | recset.movenext | + | recset.MoveNext |
- | | + | |
</ | </ | ||
\\ | \\ | ||
- | note that this routine could potentially take a very long time to run since a sql insert | + | Note that this routine could potentially take a very long time to run since a SQL INSERT |
\\ | \\ | ||
- | however, once parsed and inserted into the l5_framedata | + | However, once parsed and inserted into the L5_framedata |
\\ | \\ | ||
- | however, pivot tables can be avoided if only certain information, | + | However, pivot tables can be avoided if only certain information, |
- | }} |
visual3d/documentation/definitions/file_formats/sql_database_definition.1718801251.txt.gz · Last modified: 2024/06/19 12:47 by sgranger