Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Is this database dump design ok?

  • 23-01-2013 8:24am
    #1
    Closed Accounts Posts: 6,075 ✭✭✭


    I have written a Java program to do the following and would like opinions on my design:

    Read data from a CSV file. The file is a database dump with 6 columns.
    Write data into a MySQL database table.
    The database table is as follows:
    CREATE TABLE MYTABLE ( 
    ID int PRIMARY KEY not null auto_increment, 
    ARTICLEID int, 
    ATTRIBUTE varchar(20), 
    VALUE text, 
    LANGUAGE smallint, 
    TYPE smallint 
    );
    

    I created an object to store each row.
    I used OpenCSV to read each row into a list of objects created in 1.
    Iterate this list of objects and using PreparedStatements, I write each row to the database.
    The solution should be highly amenable to the changes in requirements and demonstrate good approach, robustness and code quality.

    Does that design look ok?

    Another method I tried was to use the 'LOAD DATA LOCAL INFILE' sql statement. Would that be a better choice?


Advertisement