PHPTalk.com: Help With DB Schema - PHPTalk.com

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help With DB Schema

#1 User is offline   KevBurnsJr Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 0
  • Joined: 15-June 10

Posted 15 June 2010 - 08:16 PM

This question from Aaron was copied from another venue to be addressed here.

So, here is my DB Schema,

Posted Image

Roles:

Users can have many jobs.
Users have 1 profile.
Users can have many comments
Users with the job of reporter can have many news/event entries.
Users with the job of photographer can have many albums/photos.
Users with the job of videographer can have many videos.
Users with the job of dj can have many tracks.
Users with the job of designer can have many wallpapers.

All Entries can have many tags
All Entries can have many comments

Problems:

I don't know how to create a way to have both photos grouped in albums and have comments on them.

Ideas I would like integrated but don't know how to do it.

tag users in photos like facebook does.
assign profile photo to user
assign key photo to entry

Thanks for taking a look.

-Aaron
0

#2 User is offline   KevBurnsJr Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 0
  • Joined: 15-June 10

Posted 15 June 2010 - 08:26 PM

Aaron:

Regarding albums:

You should add a new table called entry_groups.
Each entry_group should have many entries.

A photo entry group would represent an album.

Maybe an event entry group could represent a series.
Who knows.

Regarding user photos:

You could add a blob field to the user table and store the photos directly as binary within MySQL, or you could add a photo_id to the user table. Either way.

Regarding tags:

I've got a great book for you that's all about tagging.
What you want is a machine tag. Check it out.
http://www.flickr.co...57594497877875/

If what you're looking for is a sexy interface for tagging photos, you might want to check and see if you can find a jQuery plugin that does what you need.
Here's one :
http://www.bennadel....oto-Tagging.htm

- Kev
0

#3 User is offline   KevBurnsJr Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 0
  • Joined: 15-June 10

Posted 15 June 2010 - 08:42 PM

Here is an example of a reserved machine tag ":featured" which allows community managers to denote which content should be displayed in the logged in homepage "featured" module.
http://www.wearecroh.../tags/:featured

Note the different "entry types" - photo, article, journal, poll, video, etc.
In that DB schema each of these entry types is actually stored in its own table.
The information you store for these different entry types will invariable be different.
You may want to revisit your decision to store them all in the same table.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users