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
https://forums.phpfreaks.com/topic/207268-begginer-db-design/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.