Jump to content

Begginer DB design


rafaelm

Recommended Posts

Hello,

I am writing a quick PHP app that will pull data from a web page and insert it in to a DB.

I have never "designed" a DB before and I am not sure how to organize the data.

 

Say for example that I'm pulling data off a movie website. Each page for each movie has the name of the movie,date,studio, an image of the movie poster and a list of links to reviews for the movie

 

Scraping and inserting the name of the movie,date and studio is pretty simple.

The part I'm not so sure about is the image and the review links

 

For the image, I've searched and the general opinion is that I should only save the location to the DB and the actual image on the filesystem.

 

I'm stuck on the links part. Since not every movie has the same number of links on the page (max 10 links per page), should I just create a single "links" field and add all the links in to that field? Or should I create 10 link fields and add each individual link even if there are going to be some empty fields left?

 

I need to be able to pull the links from the db and put them on my site.

 

Thanks!  :D

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.