Internal imaging is a crucial part of healthcare to diagnose different conditions. DICOM has become the international standard for storing and transmitting medical images obtained by different internal imaging devices. These images are stored in DICOM files that cannot be opened and read as a regular text file. The files require special software to be viewed. Finding a specific file for a patient can therefore become a difficult task. A database management system can be used to easier locate the desired file. Traditionally, this is done with the use of a relational database, but there has been an increase in the use of NoSQL models in recent years. The benefit of using a document-based NoSQL model is its flexible schema and avoidance of join operations. Related information can be stored together in nested documents. This thesis compare the relational MySQL with the document-based MongoDB in terms of retrieval time for different queries to determine which model is better suited for storing DICOM data. The result of the thesis shows that the decision between the two models for storing DICOM data is largely dependent on the queries performed on the database. Although MySQL performed better for some queries, MongoDB was faster at executing simple queries that do not need aggregation.