I have a website which I originally created using Dreamweaver. Attached to that website is a sql database of over a thousand names and addresses, etc. I would like to know how to transfer the original database to a new drupal 6 website so I can used and access this information through the views module in drupal. Does each piece of information in the original database convert into individual nodes once transferred? I hope someone can help me with this. If you need more information please don't hesitate to let me know.

Thanks.

Comments

dman’s picture

Did you look through the range of existing import modules? It depends a lot on both your input and where you want to put it to decide which one is best for your needs.
I can't tell if you are wanting to import user data as users, or client data as nodes. Both approaches have differences.

Jimmel’s picture

Thanks for the reply.

I had a look at the link you gave and am not too sure if that module is what i am looking for. I would guess that importing client data as nodes is what I require.

I have a list of client names, addresses, what they do, services provides, phone numbers etc. All of these are currently in one mysql database within 1 table. I would like to import each of these clients (eg each of the tables ROWS) so that each one has their own specific node. Once I have this I can use views to filter out the data the website user may want, eg by which profession the users might want. Is this possible and what would be the best method to use? I am open to any suggestions as I am sure there are many different possible methods.

dman’s picture

for a 1:1 simple table, all you need is csv import module then. Totally the easiest.
Define your node content type with named fields first (CCK) then use the csv wizard to match columns to fields and you are done.

Jimmel’s picture

Thanks for that, the module was perfect. Would never have found it without the advice.

tinem’s picture

I'm very interested in this subject would it be possible to see your new Drupal site after it's imported and also the old one for inspiration, please?

Jimmel’s picture

I have not tried to complete this job yet. But I now know that it will work and that s what i wanted from this post.

guruandgeek’s picture

I had the same problem of how to set up a business list. I guess it's a conceptual thing...I see these things called 'nodes' in Drupal as just a record in a table. Using CCK, I am assuming it is setting up a table of a particular content type which I assume is a table's name.

Anyway, as we speak, I'm using the node_import to about 450,000 records into nodes. It's a slow process, taking about 1.5 seconds to convert 6 records. I've got about 278,000 of them imported at the moment...and I am sure I'm going to have a whole new learning curve on how to create the searches to extract much smaller subsets of information.

I know how to write SQL, but not sure where I put it within Drupal. I am assuming the views are stored as a stored procedure within MySQL somewhere. We should keep in touch and share idea.

Chuck

Jimmel’s picture

Hi

Views is a module used for extracting lists of data from a sql database. Once you have the sql database then all you need to do is learn the views module ( quite complex but very powerful) in order to extract data. You do not need to know how to write sql as the views module will take care of this in the background. The only thing about views is that it is quite difficult to sort out theming (but thats another issue altogether). Just posting this in case you don't know about the views module. If you do then forgive me for presuming you didn't. I find the best answers always presume the least amount of knowledge on behalf of the inquirer.

Jimmel.

grahambeek’s picture

Excuse my ignorance, but why do you need to import as nodes? If the Views module allows you to extract information from a database/table can't you just import the table (using phpmyadmin or similar) and then use Views to extract what you want? What does nodes give you?

I'm new, so forgive me if I'm talking rubbish!

Jimmel’s picture

As far as I know, nodes just Drupals way of storing information in a database, threat them as rows and columns in a table. Threat the CCK nodes types as the same as making a column in a database and each node is a row within the CCK node types. So by making nodes, you are inserting columns and rows in a database in the mysql interface. It just the way Drupal overcomes the problem of inserting and deleting information to and from a database.

This is why when you are converting a sql database to drupal you link each column in that database to a CCK node type. The column information is then imported into that CCK type. Each row you import is then converted into a node.

I think that what happens anyway.
Hope it makes sense.

Jimmel