+ 2

I want to store text file into database. Which data type should i take?

23rd Sep 2019, 11:02 AM
Frozen Pearl
Frozen Pearl - avatar
11 Answers
+ 5
23rd Sep 2019, 1:38 PM
Sonic
Sonic - avatar
+ 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
23rd Sep 2019, 7:20 PM
Tibor Santa
Tibor Santa - avatar
+ 3
What about String? Edit: StringBuffer.
23rd Sep 2019, 11:54 AM
Sonic
Sonic - avatar
+ 3
Sonic first of all it will to short and second thing i want to store whole txt file.
23rd Sep 2019, 1:22 PM
Frozen Pearl
Frozen Pearl - avatar
+ 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
23rd Sep 2019, 2:21 PM
Frozen Pearl
Frozen Pearl - avatar
+ 3
Ipang thank u so much dear for hlp
23rd Sep 2019, 7:16 PM
Frozen Pearl
Frozen Pearl - avatar
+ 3
Tibor Santa thank you
24th Sep 2019, 8:36 AM
Frozen Pearl
Frozen Pearl - avatar
+ 2
i m using oracle
23rd Sep 2019, 2:38 PM
Frozen Pearl
Frozen Pearl - avatar
+ 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
23rd Sep 2019, 5:01 PM
Ipang
+ 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.
23rd Sep 2019, 2:03 PM
Ipang
+ 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.
23rd Sep 2019, 2:25 PM
Ipang