Jump to content

Database design help


glitterbaby

Recommended Posts

Hi! I'm trying to create a database for my portfolio but I'm kind of stuck. I have 3 questions that I hope people here can help me with...

 

1) I know that I will need a table which stores the projects' information (name, date, description, etc.). What I'm not sure about, is how to store the links to the project files. Some projects have only 1 file, while others have several (a video file, a documentation, etc.). Do I have to create another table for the files, and for each file, store the project id that the file belongs to? Or is there a way for me to do this without even having to store the file links?

 

2) If I want to display images in my description, do I simply use html img tags? I thought it was bad to store html inside the database? Which made me wonder, how do people store their blog entries? Blog entries can have links, images, etc., right? So is the blog entry field just a simple TEXT field?

 

3) How can I store tags for my projects? I read somewhere that you can simply do this by creating a TEXT field for the tags and use the MySQL fulltext search functions. Is that how people do it or.. are there other ways?

 

Um.. hopefully my questions aren't too confusing. Any answers will be much appreciated!

Link to comment
Share on other sites

1.  You want a table for your project, a table for your links, and tables for your categories, or static options.  Like you said you have links that are "video", "document"  Its easiest to put these in a table and then your links table could be:

 

link_id (autoincrement), project_id (referential), category (referential), path

 

2.  You can store HTML in your database.  The warning is if you take unfiltered html and store it in your database. 

 

3.  yes fulltext search "MATCH col AGAINST "query"

Link to comment
Share on other sites

Oh.. I see. Thanks for clearing that up for me!

 

Just one more question: what if I want to store the programs/resources used for each project? For example, photoshop & dreamweaver for a web project; photoshop & illustrator for a print design project..

Link to comment
Share on other sites

You know, I don't really use hard and fast rules for directory naming (that is the question, right?).  I generally just put all the programs in the root, and images in a separate folder.  If things get cluttered, that is when I start using subdirectories. 

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.