+ 2
I want to store text file into database. Which data type should i take?
11 odpowiedzi
+ 5
Use StringBuffer. Its size can be expanded.
https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html
+ 4
Typically, large bodies of text are stored in BLOB or CLOB type column in an Oracle database.
Blob - binary
Clob - character based
Nclob - multibyte characters (eg unicode)
I think these are your choices.
https://doc.ispirer.com/sqlways/Output/SQLWays-1-124.html
https://docs.oracle.com/cd/B19306_01/appdev.102/b14249/adlob_intro.htm
+ 3
What about String?
Edit: StringBuffer.
+ 3
Sonic first of all it will to short and second thing i want to store whole txt file.
+ 3
i am making a desktop application which teaches java language. i created chapter as entity in db and i stored content of chapter in txt. file now i want to store that txt file into db i.e into chapter table
+ 3
Ipang thank u so much dear for hlp
+ 3
Tibor Santa thank you
+ 2
i m using oracle
+ 2
Sameena Ghaffar🇮🇳
I'm afraid I can't help with Oracle, no experience with that TBH. But I did a little search, and found this page, hopefully the explanation of what each type for in that page can assist you to decide which type to use.
Good luck with the project! 👍
https://www.w3resource.com/oracle/oracle-data-types.php
+ 1
Are you asking for the data type in SQL or Java?
Can you explain the reason why you want to save text file in a database? why can't you just store it in a subdirectory for uploaded files for example.
+ 1
Sameena Ghaffar🇮🇳
Which DBMS are you planning to use? I ask this because I see MySQL and Oracle are both in Relevant Tags. There may be difference of data types between the two.