If it's a simple database without relations, you can use out of the box DataTables objects.
Otherwise you will have to use the JDBC connector (http://support.ptc.com/help/thingworx_hc/thingworx_7_hc/#page/ThingWorx_Help_Center%2FThingWorxHelpC...) in order to connect to an external database and work with it.
If this does not answer your question, please provide specifics around your use case to help us gain a better understanding of your needs.
I'm not asking about connecting to an external relational database. I would like to create and maintain a relational database within thingworx platform.
Apologies for the misunderstanding.
It's not clear what your intent is but this link may be helpful. Note there are several other links to resources that can help you determine the best architectural design for your environment.
Once you have reviewed this information, please let us know if you have further questions. We will need to be provided with details of your requirements to provide appropriate answers.
If the previous post answered your questions, please mark it as the Accepted Solution for the benefit of others with the same questions.