Current location: Hot Scripts Forums » Other Discussions » Database » [MySQL] Database design recomendation


[MySQL] Database design recomendation

Reply
  #1 (permalink)  
Old 05-28-09, 12:54 AM
eddyvlad eddyvlad is offline
Wannabe Coder
 
Join Date: Sep 2003
Location: In The Bloody Pits Of Hell
Posts: 160
Thanks: 2
Thanked 0 Times in 0 Posts
Lightbulb [MySQL] Database design recomendation

Hi guys, I am designing a database. I've done numerous database designs by trial and error and frankly, most of them don't really work very well. This time I want to get feedback / recommendation from you guys who are smarter or more experience than me so that at least I can get close to perfection this time.

Attached is my current design done in phpmyadmin. A database abstraction layer will be develop in PHP 5 to accommodate the schema. The objective of the design is to ease development and have a more readable codes.

One question that always bugs me is do you think the 'media_' prefix in every field is necessary? I've never had a good experience with schema without the prefix. Kinda troublesome to relate. But the prefix can cause a mess in the future I guess.

Example coding style to achieve :
PHP Code:

$mediaObj = new Model('media');

if(
$thisCat $mediaObj->findAll('WHERE ! = ?',array('category_id',$_POST['category_id']))){
    foreach(
$thisCat as $index=>$media){
        
$html->table->addRow();
        
$html->table->column($index,'title',$media->child('property')->title);
        
$html->table->column($index,'categories',$media->childs('category')->getName()->implode("\n"));    // 1 media can have multiple categories
        
$html->table->column($index,'audio',$media->child('audio')->filename);
    }

Attached Images
File Type: png phpmyadmin.png (22.6 KB, 661 views)
__________________
Mr. Brown Eyes
Reply With Quote
Reply

Bookmarks

Tags
design, mysql, php


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Database design & deployment - MySQL vs SQLite Sabot Database 1 06-17-07 04:15 AM
Simple, searchable book database max fischer Script Requests 0 05-14-05 01:00 PM
Relational Database Design phppick PHP 2 11-19-03 10:12 AM


All times are GMT -5. The time now is 05:08 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.