Database Big Field (CLOB, BLOB) is not suitable for storing more than 1MB of data usual databases provide large field types such as Clob, Blob, Text, long to store more than 4K data, but this must not mean that you should use big fields to save more than More than 1MB of data files. The reason why there is a large field is often because the varchar type has a certain length limit, such as 4K. Text and binary data exceeding this length must be saved using large fields. However, in general, the big field does not mean that a large file is saved, usually only dozens to hundreds of KB data, such as very long articles, icons, small pictures, and more. More than 1MB of data is stored in the database has many performance issues: Slow Web Server can read the hard disk file directly, then return to the client, or apply the server to read the hard disk file to return to the client, the efficiency is far more than the application server Access the database read data Returns the client. It is inconvenient to open a stream to construct a buffer, then output a servletoutputstream. Occupy database connection, adding database access loads, if the user suddenly interrupts the download, you need to handle database shutdown action, which is easy to cause performance issues. If you read the entire data into memory and then output, the memory takes place very objective. If it is a hard disk file, you can go back to a URL. Even if you don't want the user to access the file directly, you can also construct an iostream to output a file, neither the database resource, the transmission speed is also fast. If you have any questions, if you concurrent a lot of users to download large files, the application server should take a lot of memory to cache file content, assume that 10MB files, download 10MB files, at least 100MB at least 100MB Memory is supported, it is easy to cause JVM crash. Oracle actually has a BLOB type, although it is also blob, but actually File is saved on the hard disk, this way you can try it, but I think this way is not as convenient, since the principle it's the same. Also add some, the regular database backup is unable to back up BLOB data, so if you save your files to blob, the database's backup is a very headache, you must write the BLOB data separately. , Write to the hard drive file, back up the file. And how do you put your files under a directory of your hard drive, instead of being blob in the database, the backup is simple. Of course, the shortcomings of the way to save the file is that the file cannot be renamed. Otherwise, it will be overwritten, and this problem is not difficult to resolve. The general fileupload API will have a lot of renaming strategies. There is a directory of the operating system. The number of files is limited, this limit is usually related to the number of file systems, such as one directory can only place 1024 files, however this problem can also be solved by some save policies of File Upload, such as adding one What is stored in the subdirectory. Oracle actually has a BLOB type, although it is also blob, but actually File is saved on the hard disk, this way you can try it, but I think this way is not as convenient, since the principle it's the same.