Create database tables from an xsd

Is it possible to generate database table from a given xsd using toplink ?
I want to use these tables to persist java objects obtained by unmarshalling the xml (corresponding to this xsd).
Thanks in advance,
Mahima

Hello Mahima,
Although you could use TopLink to generate a database schema from an XSD using a combination of wizards available in the TopLink Workbench, the resulting database schema would probably not be an optimal design. If you're interested we can talk about how to use this approach as a guide.
Is your main use case the generation of a database schema or the actual movement of database data to/from XML?
Using a combination of TopLink's object-relational and object-XML support to move data between XML and a relational database is a valid pattern. Refer to the discussion thread below for some approaches at setting up the metadata.
TopLink-JAXB : Creating and Mapping tables from Toplink-JAXB POJOs.
-Blaise

Similar Messages

  • Labview database problem: Create a database table from user defined fields

    I am trying to create a new table in an access database opened by an ODBC connection from information entered a table stored in the database, but every time I try to create the table, the Labview Database connectivity toolkit VI for creating a table throws a cryptic error
    "Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition. in NI_Database_API.lvlib:Conn Execute.vi->NI_Database_API.lvlibB Tools Create Table.vi->DatabaseCreateHeaders.vi"
    I think this is becuase I am trying to re-create the database  column variable type, but I am not sure what I am doing wrong.  Everything seems to be fine as the data types go, and everything works as long as I use a constant to create the database columns.  I even tried putting all of the information into the format labview defined, changed that to a variant, and redefined it as the labview database column type. 
    I have attached a simplified VI and a picture of what I am trying to
    do, but I would appreciate any help I can get.  Hopefully I won't have
    pulled out all of my hair by the time some one replies!
    Solved!
    Go to Solution.
    Attachments:
    DatabaseUserDefinedTable.vi ‏14 KB
    UserDefinedColumns.JPG ‏48 KB

    Hi everyone. I am new to the database tool kit using labview. I am using labview 9.0f2 on Windows Xp. I am required to create a database (task is to create a table and to insert values into the table using Microsoft access 2007). I am trying to learn using the Create Database table.vi found with the software. I understand that need to create an access file and also had a mdl file which is name after it.(I had created them). Looking at the example given, I would like to add a few more variables, to be exact 6 more variables(therefore i would have 6 colum in my access file rite?). From the "connection information" the help information shows that it contain an 1D array of DB tools colum. ctl and also a cluster of 4 elements. the link to the access file, LabVIEW.udl shows that it restrict the colum in the access file.eg it has only stringcol,intcol,doublecol. I need to add more colum but cant add just like tt.
    qn1: How to i add insert more varibles into the database so that it will apprears in access.
    qn2: I cant drag and insert the "connection information" just to have more input. how do i do it?
    qn3: where can i edit the info so that i can add more cluster into the access? when i drag out the input turn greyish.

  • Create oracle table from sql server

    Dear Gurus,
    I need to create some tables from sql server 2008 to a oracle 11g database. Some tables contain vbinary datatype. Now my queries are
    1. How can I do that?
    2. If DB link is a solution then would you please provide me a step by step process to do so?
    3. Is there any issue with datatype?
    SQL Server db is on windows 2008 R2
    Oracle is in RHEL 5.5
    Will appreciate ur help.

    well suppose i generate flat files from sql server and load in oracle by sqlloader then will there be any issue with vbinary datatype? what should be the equivalent data type in oracle table?

  • Unable to fetch database table from webdynpro application

    Hello,
    I have a Webdynpro application trying to fetch data from the database table. I have used the following code to get the connection to the database and execute the sql statement.
              InitialContext dbInitContext = new InitialContext();
              Properties sysProperties = System.getProperties();
              String sysname = sysProperties.getProperty("SAPSYSTEMNAME");
              String dbName = "jdbc/" + "SAP" + sysname + "DB";
              DataSource dataSource = (DataSource) dbInitContext.lookup(dbName);
              Connection conn = dataSource.getConnection();
              String SelectStmt = "Select * from INV_CUSTOMER";
              PreparedStatement stmt = conn.prepareStatement(SelectStmt);
              ResultSet resultSet = stmt.executeQuery();
    I logged into the database using user superdba in sqlcli, and created the table "INV_CUSTOMER". I am trying to run this application in my sneak preview java installation which comes with maxdb 7.6. But when I run the app, it always throws up the error:
    The SQL statement "SELECT * FROM "INV_CUSTOMER"" contains the semantics error[s]: - 1:15 - the table or view >>INV_CUSTOMER<< does not exist
    I am new to this concept, so any help would be appreciated.
    Thanks,
    Ajay

    >
    Ajay Singh wrote:
    > Hi Isaias,
    >
    > I created a dictionary project with the same structure, and used it in my app. Right now, everytime I run my app, the old data I entered is lost. I need to store data in the table, and reuse those records the next time I run the app. How do I do this?
    > Another question I have is, I have created Database Tables inside Local Dictionary of my dictionary project. Does this create a table in the actual database?
    > Forgive me, but I am new to this topic.
    >
    > Thanks,
    > Ajay
    Hi,
    It seems to me like there is more than one issue here. Let me try and help you out with some details.
    1.) If you have created the Dictionary project and the code in your original post is not giving you problems then it's good. However, the problem of the data disappearing from your Java Dictionary seems little bit wierd. You need to ensure that you are not running any "delete" command and ensure that the select statement (of it has and conditions) is correct.
    2.) As far as where the tables actually reside: When you create the Dictionary tables in a Dictionary Project-  this will actually create a script that will be run on the server that has an installed database (like Oracle, MSSQL Server or MaxDB, UDB). This means that the dictionary tables are just an abstraction of actual database tables.
    In order to ensure that you are not deleting the data - debug your Web Dynpro Application or EJB so that you can go through it step by step and see whether all the database statements are correct. Sometimes you may not get an SQL error due to a NullPointer in the dynamic queries as well - so keep a check on that as well.
    If you require a more detailed solution - please give us a small piece of code that we can analyse.
    Hope that helps.
    Thanks.,
    p256960.

  • Generate database tables from Business Components

    Is it possible to generate the database tables from a set of existing business components?
    This would be a handy feature to have, similar with JPA tables generation based on Entity Beans.
    Thanks
    Florin Marcus

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dmitri:
    Dear Laura,
    I mean first variant where the database would be the same:
    scott/tiger@database1
    foo/bar@database1
    Of course I understand that we must register every user in database by "CREATE USER XXX" and it is unacceptable for Internet. But it may be very convenient for an Intranet because we can build access restriction based on set of views without any changes in applications.
    Best wishes,
    Dmitri.<HR></BLOCKQUOTE>
    null

  • How create temporary table from list of values

    Can you anybody advise me how can I create temporary table from list of values? I have list of values and need create temporary table for next use with command JOIN etc.
    Thank you for help

    NO, you can not create temporary table in oracle on the fly ( Like #Tabels in SQl Server or Sybase ) , you will have to use the GTT i.e Global Temporary Tables
    check the following link GTT :
    to flush the tables after commit
    CREATE GLOBAL TEMPORARY TABLE my_temp_table (
      column1  NUMBER,
      column2  NUMBER
    ) ON COMMIT DELETE ROWS;In contrast, the ON COMMIT PRESERVE ROWS clause indicates that rows should be preserved until the end of the session.
    so to keep rows in Table after commit
    CREATE GLOBAL TEMPORARY TABLE my_temp_table (
      column1  NUMBER,
      column2  NUMBER
    ) ON COMMIT PRESERVE ROWS;

  • How to create a table from an existing table with new column

    Hi !
    Please help me.
    I want to create a table from an existing table with data and add two new column to the new table.
    What will be the syntax?

    craete table new_table as select a.*, 'somevalue' new_col1, 'somevalue'
    new_col2 from old_table a;Also there is a pitfall - newly created table will accept column type and precision from the select statement, so further you can be needed to modify columns
    if you want to have VARCHAR2 instead of CHAR for example:
    SQL> create table new_dept as select dept.*, 'New data' new_col from dept;
    Table created.
    SQL> desc new_dept
    Name                                      Null?    Type
    DEPTNO                                             NUMBER(2)
    DNAME                                              VARCHAR2(14)
    LOC                                                VARCHAR2(13)
    NEW_COL                                            CHAR(8)
    SQL> alter table new_dept modify (new_col varchar2(8));
    Table altered.
    SQL> desc new_dept
    Name                                      Null?    Type
    DEPTNO                                             NUMBER(2)
    DNAME                                              VARCHAR2(14)
    LOC                                                VARCHAR2(13)
    NEW_COL                                            VARCHAR2(8)Rgds.
    Didn't see michael's post - it reflects the fix for this problem using CAST.
    Message was edited by:
    dnikiforov

  • Steps to follow while creating Database table in notes or paperwork

    what are the steps to follow while creating Database table in notes or paperwork
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    hi,
    1. Goto Transaction SE11.
    2. Enter the table name to be created. It should start with a Y or Z.
    3. Press Create
    4. Enter the Short description for the table
    5. Enter the Delivery class for the table. It can be 'A', 'C' or other.
    6. In the Fields tab, specify the table fields and the corresponding data elements or the built-in data types.
    7. If the table needs to be made a client-depenedent table, the first field should be MANDT.
    8. Goto Technical settings of the table and sepcify the Data Class and Size for the table. Also, there u can specify if buffering for the table should be allowed or not.
    9. Now, activate the table.
    if helpful reward some points.
    with regards,
    Suresh Aluri.

  • Using execute immediate creating a table from another

    hi friend i wanted to create a table from a select statement in a pl sql procedure. i am using execute immediate but getting problems with it pls can anyone help me.
    here is the query i am using
    EXECUTE IMMEDIATE 'CREATE TABLE table_name AS  (SELECT * FROM  a_view   WHERE column_name LIKE '%some_string%');
    i need to know if this can be done and if yes how. pls help me its bit urgent too. the schema name is same and the privileges are available to create tables too.

    Your syntax is wrong.
    If you would use a syntax higlighted editor, it would show.
    Yout try to execute a string where another string is embedded. Please use two times single quote or use the 'q' function:
    This one is correct:
    EXECUTE IMMEDIATE 'CREATE TABLE table_name AS (SELECT * FROM  a_view WHERE column_name LIKE ''%some_string%'')';
    or this one:
    EXECUTE IMMEDIATE q'|CREATE TABLE table_name AS (SELECT * FROM  a_view WHERE column_name LIKE '%some_string%')|';
    good luck

  • Modify database table from internal table

    Hi All,
    I need to update database table from internal table which is having around 30000 records.
    I am using MODIFY tabname FROM TABLE int_tabname...
    Using this statement, I can modify the databse records very well. But user has some additional requirement.
    He wants that the table should be modified from the internal table and after modification we should have the erroneous records to be displayed if any.
    e.g. if 1500 records out of 30000 are erroneous then only 28500 records should be updated and 1500 records should be displayed as erroneous records so that the user can correct them and use them again for executing the program.
    Is there any FM which imports the database table name and internal table, modifies the database and exports an internal tanle with erroneous records?
    Any help will be appriciated,
    Regards,
    Neha

    Hi
    modifying datbase table useing internal table
    <b>advises</b> before updating this datbase table plz lock that table to avoid incosistency
    write the logic for modifying
    Modify the database table as per new dunning procedure
      MODIFY fkkvkp FROM TABLE lt_fkkvkp   .
    and finally unlock the table
    <b>example</b>
    *To lock table for further operations
      constants: lc_tabname TYPE  rstable-tabname  VALUE 'FKKVKP'  . "FKKVKP
      CALL FUNCTION 'ENQUEUE_E_TABLE'
        EXPORTING
          tabname        = lc_tabname
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
      IF sy-subrc EQ 0.
      To fetch all the contract accounts for customers of the segment
      Households/SME.
        PERFORM fetch_contract_accounts using lc_tabname .
      ENDIF.                    " IF sy-subrc EQ 0.
    *wrote the logic
    Modify the database table as per new dunning procedure from internal table
      MODIFY fkkvkp FROM TABLE lt_fkkvkp   .
    *unlock the tbale
      CALL FUNCTION 'DEQUEUE_E_TABLE'
       EXPORTING
         TABNAME   =  uc_tabname .
    <b>Reward if usefull</b>

  • Creating a table from a query

    I am trying to create a table from the results of a query. With other products, I could issue the following SQL statement to achieve my goal but this doesn't work with Oracle.
    select MyTable.* into NewTable from MyTable where MAPID < 1000
    What am I missing?

    Try this way :
    create table NewTable as
    select * from MyTable where MAPID < 1000;

  • How to Import/Export database tables from one server to other in oracle8i

    Hello friend,
    Please can any one tell me how to import/export groups of database tables from one server with oracle to another using VB.net. It would be nice if some one can provide some code of it.
    I am a software developer and I am in middle of a large project development, in which I need to export a large oracle database from one server to another efficiently.
    Its very urgent so please someone help me.

    At command prompt (source db)
    set ORACLE_SID=db_name
    exp system/password@db_name full=y buffer=104857600 file=(c:\file1.dmp, c:\file2.dmp....) log=c:\exp.log filesize=2000M
    Then ftp the export dump files (in binary) to the other server or copy to target server over the network.
    At command prompt (target db)
    set ORACLE_SID=db_name
    imp system/password@db_name full=y ignore=y buffer=104857600 file=(c:\file1.dmp, c:\file2.dmp....) log=c:\imp.log filesize=2000M
    If the path names of the datafiles are going to be different in the target server (as compared to the source), then precreate the tablespaces before import. Set buffer value accordingly.
    Message was edited by:
    FeNiCrC_Neil

  • How to create database link from oracle to sql server

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal
    Hi Vishal,
    I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
    https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
    We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
    Regards,
    Elvis Long
    TechNet Community Support

  • Create one tables from 2 different tables

    Hi,
    How I can create one table from 2 different tables. Source tables have data and I want to include it in new table.
    I try this:
    create table NEW_ONE
    select * from OLD_ONE
    union
    select * from OLD_ONE2;
    But it didn't work correctly :/

    I don't have any error. This syntax create table NEW_ONE, but this table have columns only from OLD_ONE table :/ There aren't any column from OLD_ONE2 :/ Any suggestions?
    I don't forget about "as" in my query, only in this post.
    Edited by: tutus on Sep 8, 2008 6:36 AM

  • How to Create adf table from java bean

    Hi,
    How to Create adf table from java class (Not from ADF BC).
    Thanks
    Satya

    @vlsn -- you have to follow what shay said.
    Do the following in Model layer ::
    create a table property java class with your columns setters and getters like :
    *public class gridProps {*
    private int sno;
    private String orderNum;
    *public void setSno(int sno) {*
    this.sno = sno;
    *public int getSno() {*
    return sno;
    *public void setOrderNum(String orderNum) {*
    this.orderNum = orderNum;
    *public String getOrderNum() {*
    return orderNum;
    Create another table java class which will populate the values to your column values and return the collection :
    *public class gridPopulate {*
    private  List<gridProps> gridValues ;
    *public List<gridProps> setToGrid(ArrayList<ArrayList> valuesToSet) {*
    *if (valuesToSet == null) {*
    return gridValues;
    gridValues = new ArrayList<gridProps>();
    if(btnValue.equals("completeBtn"))
    return gridValues;
    for(ArrayList<String> tempArr:valuesToSet)
    gridProps gp = new gridProps();
    gp.setSno(Integer.valueOf(tempArr.get(0)));
    gp.setOrderNum(tempArr.get(1));
    return gridValues;
    Right click gridPopulate class and create this as data control.This class will be seen in Data control list.Under this data control,Drag the grid property collection(created earlier) to your page.Then execute your binding(gridPopulate) according to your logic.
    Thanks.(My jdev version 11.1.1.5.0)

Maybe you are looking for