glitterbaby Posted May 24, 2010 Share Posted May 24, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/202771-database-design-help/ Share on other sites More sharing options...
andrewgauger Posted May 24, 2010 Share Posted May 24, 2010 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" Quote Link to comment https://forums.phpfreaks.com/topic/202771-database-design-help/#findComment-1062776 Share on other sites More sharing options...
glitterbaby Posted May 27, 2010 Author Share Posted May 27, 2010 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.. Quote Link to comment https://forums.phpfreaks.com/topic/202771-database-design-help/#findComment-1063935 Share on other sites More sharing options...
andrewgauger Posted May 28, 2010 Share Posted May 28, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/202771-database-design-help/#findComment-1064442 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.