Flat file database

hello i would like to learn how i can create a flat file
db..just for the sake of it. can anyone tell me what i need to
lookup and learn. thanks alot.

basically its a delimited text file with only one "table" of
information
use tabs or commas or some unique character to separate
"column" items, use a line return to separate "rows"
Is there a reason why you would want to do this? Depending on
your needs, you would probably be better off with using XML or
something of that nature - or get your hands on some type of actual
database

Similar Messages

  • Diifferent java apllications write to the same flat file database

    I have a variety of java applications that need to be able to write diagnostics to the same flat file database (containes just one file). Could somebody give me the pointers what is the best way to write my applications so that different application not need to worry about the updates in file?
    They should be able to write whenever they want.

    JavaFunda wrote:
    I have a variety of java applications that need to be able to write diagnostics to the same flat file database (containes just one file). Could somebody give me the pointers what is the best way to write my applications so that different application not need to worry about the updates in file?I guess my question would be: is it a file or a database (as in an RDB)?
    I think EJP's post was aimed at syncing writes to files (and he'll definitely tell me if I'm wrong : )), but it may be redundant if, in fact, your output is going to a database.
    Also, Java has some quite sophisticated logging applications (I believe log4j is quite popular; but there are others), which may serve your needs.
    Winston

  • Looking for a flat file database

    Hi,
    I am looking for a 'database' for my Java-Project. My requirements are: no ODBC, no DB-Server, all Windows Systems.
    I think my only option is a flat file based system. So my Question:
    Which database do you know, or do you advice an other solution for my problem.
    Thanks for your answers

    Why don't you go to the two sites above and look through their documentation?
    Edit: And why did you resurrect a four year dead thread for this?

  • Translating custom flat file database to an EJB

    Hello all
    I'm very new to JEE, so bare with me. ;-)
    I'm working on an application where we have a very large database spread across many flat files. The database contains key value pairs. We also have an index. Currently, our non-JEE application instantiates an object that loads the indexes from disk and handles lookups from a method call. A lookup involves finding the approximate location of a key value pair by looking at the index and then doing a search through one of the larger files.
    How does one translate this database to something that runs inside a JEE application server? Since we have multiple clients doing lookups, I'm guessing this custom database could be realized as a message-driven bean. However, how does one create these beans so that the indexes are only loaded once during the lifetime of the application? Also, how does one handle things like configuration of where the bean should find the indexes and flat files on disk?
    Loading our data into an SQL database and using JDBC isn't going to work in this case due to the size of the data we're dealing with.
    Thanks for any help.
    Regards,

    You can use the following as a guideline to do this. The loadIndexes() method must be called from (every) your business method. You can optimize this by calling loadIndex from a @PostConstruct method.
    As far as configuration, this code assumes that you have an environment entry called location that points to the location of your indexes.
    Example
    public class Foo implements MyBusinessInterface {
    private static Object lock = new Object();
    private static boolean loadedIndexes = false;
    public Foo() {
    public void loadIndexes() {
    synchronized (lock) {
    if (loadedIndexes == false) {
    String location = (String) ctx.lookup("java:comp/ejn/location");
    //location now contains the location of index.
    //Read and load index here
    loadedIndex = tue;
    public void someBusinessMethod() {
    loadIndexes();
    //doWork.......
    }

  • Saving database records in a flat file

    I am trying to save data from relational database into a flat file and then read back records based on the certain criteria.
    What will be a good approach for me? Should I use random access files or sequential files for storing and
    retrieving data or is there some other technique that is more efficient that I can use.
    Thanks

    I don't think that reading database records from a flat file based on certain criteria is a good approach, no matter how you produce the flat file. Using a second database table makes more sense to me, especially since you already have database software available and ready for use.
    (You asked about a "good approach" and then you wanted a technique that was "more efficient". Those two aren't the same thing at all.)

  • Flat file to Oracle Database - Invalid Month

    Hi All
    I am New to XI and trying to create a simple interface between Legacy system (flat file) and Oracle database.
    I have some date fields in the Oracle table.
    When i run the interface it says "invalid month" with some SQL exception number.
    I am using (mm/dd/yyyy) format for the date.
    Is there any conversion i need to do. I am using XML SQL format for Oracle database.
    Any help is appreciated.
    Thanks
    Nagakishore

    Hello,
    Oracle is very picky with the way date is stored. Assume that you have a field datefield that you need to save. In mapping add an attribute hasqQuote and set it to "NO". When mapping the value to the node use to_date as shown below.
    <DateField hasQuot="No">
       TO_DATE("2004-07-20", "yyyy-mm-dd hh:mi:ss")</DateField>
    cheers,
    Naveen

  • Uploading Data from a Flat file into Oracle Database

    Hi,
    I am a novice to Java . SO, please bear with me. I have a reqiurement where I have a flat file or excel file from which I need to read the data and insert into Oracle Database. The falt file will exist on the client machine. I have been reading and I see this can be done through I/O Streams. Correct me if I am wrong. I am looking for a sample code to get started. Any Java expert has an answer for it, I will appreciate it.
    Thanks

    Try UploadBean. It allows to upload files (from a browser) in Oracle.
    http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html
    You will find JSP and servlet samples.

  • Convert flat file to XML document and store into Oracle database

    First:
    I have a flatfile and created external table to read that file in Oracle
    Now I want to create an XML document for each row and insert into Oracle database, I think that XMLtype.
    Could you please provide me some information/steps.
    Second:
    Is there performance issues, because everyday I need to check that XML document stored in the database against the in coming file.
    Thank You.

    Oracle 11g R2 Sun Solaris
    Flat file is | (pipe delimited), so I did create an EXTERNAL Table
    row1     a|1|2|3|4
    row2     b|2|3|4|5
    row3     c|6|7|8|9
    I want to store each record as XML document. So it will be easy to compare with next day's load and make insert or update.
    The reason is:
         First day the file comes with 5 columns
         after some days, the file may carry on some additional columns more than 5
         In this case I do not want to alter table to capture those values, if I use XML than I can capture any number of columns, CORRECT!. Please make me correct If I am wrong.
         This is the only reason to try to use the XMLType (XML Document)
         On Everyday load we will be matching these XML documents and update it if there is any column's value changes
    daily average load will be 10 millions and initial setup will be 60-80 millions
         Do I have anyother option to capture the new values without altering the table.
    Please advise!.

  • SQL (Injection) Vs Flat File TXT Vs XML (XPath Injection) For Database.

    I will have to deal with robust login sessions so I need some advice on what type of database and language I will use.
    PHP and MySQL is the choice but I hear that flat file TXT are more faster so I am thinking about Perl.
    Perl is very flexiple and have many advantages but why do many folks use PHP.
    SQL and XPath injection are becoming more frequent plus MD5 and SH512 have been cracked by some angry folks.
    The Perl community is becoming very small so it will be difficult to receive support if I have a specific problem.

    In our projects we are extracting SMS messages and
    based on the
    MISDN (Telephone number) of each SMS we are fetching
    the corresponding
    account information (server name and password) from
    the database through (connecting through)
    webservice.The data is stored in the DB which you are accessing through a webserivce and that's too slow and unreliable so you are caching the results in a text file...
    That's horrible. The party responsible for the webservice should be fixing it or you should rethink the architecture. All this extra complexity and basically it's just causing problems for you. You'd be better off just accessing the DB directly. I assume this is possible since you know there is a database. In a good SOA architecture, you should not know or care about where the data is persisted.
    This webservice connection is slow/unreliable so a
    local copy of the
    MISDN number and corresponding account information
    are stored/updated in flat files tp prevent repeated
    accessing through webservice.
    My question is-which will be faster for accessing,
    using txt file or xml or a different format.I don't think it's going to matter much at all for the numbers you site, unless you are running this on a 20 year old PC or something.
    But I think you are addressing the wrong problem.

  • How to upload a Flat file into sap database if the file is in Appl'n Server

    Hello Sap Experts , Can you tel me
    " How to upload a Flat file into sap database if the file is in Application Server.
    what is Path for that ?
    Plz Tel Me its Urgent
    Thanks for all

    Hi,
    ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
    *& Report  ZUPLOADTAB                                                  *
    *& Example of Uploading tab delimited file                             *
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
    *    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    * Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.

  • FLAT file to Database load

    Hi All,
    we have been using OWB 10.2.0.3 version from past 6 months till now we are loading database to database.
    Data base version : 10.2.
    OWB version : 10.2.0.3
    Server operating system : Sun Solaries (10)
    Client operating system : Windows Xp.
    I would like to share some information to u and all.
    i have installed owb10gr2 on personal PC it has windows Xp operating system. i have one simple mapping for FLAT file.
    Steps handled by me to populate data flat file to Database.
    i have created one folder in C drive then i have created directory and i gave privilages to access that folder.
    i have created external table for flat file manually.
    after that i imported external table to mapp target table. it's working fine and data also loading.
    i am still getting confuse Flat file handling with SUN SOLARIES OPERATING SYSTEM
    How do we handle flat file in UNIX environment.
    How create directory and how to give access privilages.
    how to create EXTERNAL table with OWB.
    Could u please help me
    Regards.
    venkat.

    Hi,
    i have logged in sys and i created directory then gave privilages to 'c:\test_file'.... test_file is folder name which i created folder in windows PC. server is SUNSOLARIS.
    in OWB i have created table based on that file with delimited. below mentioned column names and values.
    no     name     sal     coom
    100     aa     10000     1000
    200     bb     20000     2000
    300     cc     30000     3000
    400     dd     40000     4000
    after that i have created external table under source module and then deployed that table in database table has created sucessfully but while using select statement it's showing error.
    ex: select * from table ( error)
    ORA-29913 error in executing ODCIEXTTABLEOPEN callout
    ORA-29400 data cartridge error
    KUP-04040 file abc.csv in test_v_s_loc not found
    ORA-06512 at "sys.ORACLE_LOADER",line 19
    i have done/given privilages like below
    create or replace directory sample_owb as 'C:\test_file'
    grant read,write on directory sample_owb to ods_inb_stg
    what is the cause and how to handle and resolve. could u please help me.
    regards,
    venkat.

  • Designing relational database from flat file

    hi all,
    I have little background in the filed of databases. As my work task I have to design a realtional databse from a flat file with 60 fields. would you please guide me how to or, the documents that i can refer to develop a good and efficient design.? I would appreciate your help and would love to work and read and learn to any level to get it right.have a good day

    user501335 wrote:
    Thank you very much Gerwin and Edstvens for your replies. I guess I must have elaborated a little more.
    Gerwin, I have gone throught the link you have sent me, and it was good to know that I am already aware of till this level.. Thank you for the help, can you please suggest little more so that i can go a little advance. we would be developing it for sql server2008.
    edstevens, So kind of you to send me a good suggestion.I will keep in mind while working on it.Would you please like to suggest me something more?
    No.
    If people would just get Third Normal Form burned into their brains, a lot of other problems would go away.
    wish you both a good day

  • ESB not moving data from database to flat file

    Using ESB, created an database adapter/routing service (polling for changed records) & file adapter to write all records from a database table to a flat file as a series of XML entries in the file. I only get the last record from the database into the flat file. Using JDev 10.1.3.2 and SOA Suite 10.1.3. Have a 'status' column in the source database table that is set to 'PROCESSED' when the record has been processed. After I get the one XML element, representing the last record in the database, I look at the database table and ALL rows have their 'status' column set to PROCESSED - the field was null before the database table was processed.
    How do I get ALL of the records into the flat file?
    Thanks - Casey

    Hi.
    Check this:
    ESB File Adapter: Append to log file not supported???
    Denis

  • Procurement Card data upload from flat file to database

    Hi All,
    I need to upload Procurement Card data from a flat file to the database in the table BBP_PCMAS.
    I found a BAPI BAPI_PCARD_CREATEMULTIPLE which uploads the data perfectly, however the structure PCMASTER that it takes as input does not contain the field for Blocking reason PCBLOCK - Reason for blocking procurement card. I need to upload this file as well from the flat file.
    Any suggestions?
    Thanks

    Hi,
    You are correct the function module BAPI_PCARD_CREATEMULTIPLE  does not contain the PCBLOCK field.
    Alternatively what you can do is read the PC data after it is created and modify it with the PCBLOCK appropiately. The necessary function modules are given below.
    BBP_PCMAS_READ_PCMAS - Read Data
    BBP_PCMAS_MODIFY_PCMAS - Modify Data
    Note: BBP_PCMAS_MODIFY_PCMAS is a Update Task FM. Hence it shoild be called as given below, ( refer form write_data of the FM BAPI_PCARD_CREATEMULTIPLE)
      call function 'BBP_PCMAS_MODIFY_PCMAS' in update task
           exporting
                i_pcmas     = i_pcmas
    *         I_PCMAS_OLD =
    *         I_DELETE    =
          tables
               t_pcacc     = i_pcacc
    *         T_PCACC_OLD =
          exceptions
               not_found   = 1
               others      = 2.
    Regards
    Kathirvel

  • How to dump a flat file into database?

    hi guys,
    I am new to jdbc. I am trying to transfer some data from flat file to database. What I can think of now is to create an array that is big enough to hold the entire file, dump the content of file in it and then store the array of data into database using insert statement. But this seems to be memory consuming especially when the file is very large. So could anyone tell me a more efficient way of doing that? thanks a lot.

    hi guys,
    I am new to jdbc. I am trying to transfer some data from flat file to database. What I can think of now is to create an array that is big enough to hold the entire file, dump the content of file in it and then store the array of data into database using insert statement. But this seems to be memory consuming especially when the file is very large. So could anyone tell me a more efficient way of doing that? thanks a lot.

Maybe you are looking for

  • Error while generating IMG View in project administration.

    Hi, When i try to generate IMG project in project administration, systems displays error "Syntax error in prog:000 SAPLSPRO_STATUS". How to resolve this. Regards, Giridhar

  • 32-bit Oracle client on Windows 7 64-bit?

    Hi, I have a Windows 7 64-bit OS and need to install an Oracle client on this machine. Instead of installing a 64-bit client, I would like to install a 32-bit client and was wondering if this is possible and compatible on a 64-bit machine? The reason

  • How do I re-install Mavericks without Apple ID

    My MacBook Air has recently been running very slow so I decided to foolishly Warsaw the OS. I have tried to restore the system using internet recovery however it does not recognise my Apple ID which is needed to re-install mavericks. If it help I had

  • Need minor credit boost for first home

    Evening all, First post on the forums. I hope this is not in the wrong section as I was not sure whether to post in the mortgage section or the credit repair section. Kind of a long story but here it goes. My GF and I (23 and 25) are preparing to buy

  • Logo display based on language.

    Hi all! How to capture the language attribute from the transaction to smartforms(i.e) ,when we assigning the output type, medium, language in TCODE 'ME22N' messages need trap the language which we are passing , based on that language i need to displa