Jump to content

Recommended Posts

dear all,

 

am new here, i've gone through lot of posts in here and found them very helpful, thanx to you all.

 

I am building a website for gospel music. i want the whole site to be database driven. gospel musicians (users) to be able to login and post their materials (text, pictures and audio). The site will also have some news

 

anyone with the idea how i should structure the database & tables?

Link to comment
https://forums.phpfreaks.com/topic/61360-gospel-music-site-full-database-driven/
Share on other sites

You should first enumerate the actual fields you are needing to store and how they are going to interact with each other. If you can be a little more descriptive of the site processing, I'm sure we can help you come up with a good, normalized database design to support your needs.

Ok, thanx,

 

I thought having of three tables, for users, for artists and for news.

 

Before posting his profile a user will have to register, the tbusers is for storing user infos. Fields I am thinking to include are

 

CREATE TABLE tbusers (

  id int NOT NULL auto_increment,

  firstname varchar (40) NOT NULL,

  lastname varchar (40) NOT NULL,

  userName varchar (40) NOT NULL,

  email varchar (40),

  phone varchar (20),

  Address text,

  category varchar (20),

  PRIMARY KEY (id)

  );

 

Registered Users (tbartists) to be able to login and post in to this table.

Intro is a field for displaying an introduction, there will be a page with intros for various artists. A person interested to read more about a specific artist can click to be taken to that particular artist page. I am thinking of including following fields;

 

  CREATE TABLE tbartists (

  id int NOT NULL auto_increment,

  UserName varchar (40) NOT NULL,

  category varchar (20),

  Picture longblob,

  intro (200),

  Profile text,

  PRIMARY KEY (id)

  );

 

 

tbnews has the following fields. It’s only me and few other guys, two may be three will be updating the news. Therefore no need to have a page to register users for this. Fields am considering to include are;

 

Id

Inputer

Picture

Subcontent

Content

 

hope i've made myself clear, Am kind of newbie to database thing though well knowledgeable  in html. any advice will highly be appreciated.

 

A few tips on your naming conventions: choose one (cameCase, posix_style, etc) and stick with it. You occasionally flip-flop between some of those. The "tb" prefix on your table names isn't really needed, unless your fields and table names might collide, which isn't a good design scheme in the first place.  And if you're beginning on website development and all that, storing your pictures in your database might not be the easiest idea. Instead, just link to it by filename.

Other than that, it seems like you have the basics of the structure nailed down.

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.