7 Replies Latest reply on Feb 12, 2016 2:59 PM by rareddy

    Create large virtual DB

    shekhar78

      Hi

      I am planning to create a VDB schema with 200 + entities. I am using dynamic VDB and Model definition in my vdb.xml file is below.

       

        <model name="MyModel" type="VIRTUAL" visible="true">

              <property name="modelClass" value="Relational"/>

              <metadata type="DDL-FILE">MyDynamicModel.ddl</metadata>

         </model>

       

      The problem is with approach is that MyDynamicModel.ddl is became very big and hard to manage. Is there any suggested way to have multiple ddl files for each entity and combined them together in definitions? Something like ddl import etc.


      Thanks,

        • 1. Re: Create large virtual DB
          rareddy

          Shekhar,

           

          If I remember correctly you can have multiple lines of

           

           

          <metadata type="DDL-FILE">MyDynamicModel.ddl</metadata>


          inside single model, will that work? Note that the order defined is way they will be processed. So, far example, if use an "allter", the previous one must have the definition for the entity etc.


          Ramesh..

          • 2. Re: Create large virtual DB
            shekhar78

            I tried that earlier but it didn't work.I have Teiid 8.7.1 .

            • 3. Re: Create large virtual DB
              shawkins

              Support for multiple metadata elements was added in 8.11: [TEIID-3372] Support multiple metadata tags - JBoss Issue Tracker

              • 4. Re: Create large virtual DB
                shekhar78

                Thats great feature. However it will endup having 200+ likes for DDL-FILE metadata if we want to put a file for each view.

                A suggestion is to have a capability in DDL file to refer to another file.

                Like One DDL file will have link to another files containing views in organized way.

                • 5. Re: Create large virtual DB
                  rareddy

                  We are not asking you to create 200+ views. We are asking you to write


                  <metadata type="DDL-FILE">MyDynamicModel.ddl</metadata>
                  
                  

                   

                  for each file in the same model. They all will be in the single View. I do not see we implementing a new import mechanism to read DDL file from another DDL file, then that would become non-standard custom file, where we need to define the import semantics, merging etc. It does not seem appealing feature to me.

                   

                  Ramesh..


                  • 6. Re: Create large virtual DB
                    shekhar78

                    Just to clarify my understanding.

                    Model definition will look like  below.

                     

                      <model name="MyModel" type="VIRTUAL" visible="true">

                            <property name="modelClass" value="Relational"/>

                         <metadata type="DDL-FILE">ViewDef_1.ddl</metadata>

                         <metadata type="DDL-FILE">ViewDef_2.ddl</metadata>

                         <metadata type="DDL-FILE">ViewDef_3.ddl</metadata>

                         <metadata type="DDL-FILE">...</metadata>

                         <metadata type="DDL-FILE">ViewDef_200.ddl</metadata> 

                       </model>

                    • 7. Re: Create large virtual DB
                      rareddy

                      Yes