Price lists on a site I'm creating a website for a company. One of the requirements is to have their price lists displayed on the website. All the data is in the MS SQL database. The question is, what would be the best way to:


Feed the data to Drupal (is it easier to connect directly to MS SQL database, or import data in XML or whatever else format?)
Display the data on the website (create a separate node for each separate price list and display the table it it? How to build that table?)


I'm using Drupal 7.
This really depends on the amount of data, how you have access to it and what you want to do with it in Drupal.

If you simply want to display it and if you have direct access to the MS-SQL database, have a look at the sqlsrv module, which provides a Database driver that allows to directly connect to MS-SQL databases. You can then set up the database configuration in your settings file and easily connect to it and fetch your data. To avoid performance issues, you can cache the result with the cache_get()/cache_set() functions if you need to.

That is probably your easiest solution, especially if you want to be certain that your price lists are always up to date (remember to set the cache expiration correctly).

When querying the data directly, you don't need to create nodes or another data structure, you expose them directly by implement hook_menu() and so on.

Alternatively, when importing the data into your site (could be useful if you want to integrate it more tightly with your site, like site search, views, ..), you might want to look into the Migrate project. It has both support for external databases and XML so that's not relevant. To store the data, you could set up content types with fields and then map that to your external data. What fields you want to use depends on the structure of your price lists. If they are simple key/value lists, you could look into Properties* and if it is more complex, maybe something like TableField would be useful.


Disclaimer: I developed Properties and am also (somewhat) maintaining it.