College Project
Hi
So I have a project and would like to know if im on the right lines
I need a database that will allow registered users to rate a company so I plan to have 3 simple tables and then use some views to get the data back.
My tables and structure are below, pointers appreciated.
John
Company Info
CREATE TABLE IF NOT EXISTS `companyinfo` (
`companyid` int(11 NOT NULL auto_increment,
`companyname` varchar(255) NOT NULL,
`companywebsite` varchar(255) NOT NULL,
`companyemail` varchar(255) NOT NULL,
PRIMARY KEY (`companyid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
User Info
CREATE TABLE IF NOT EXISTS `userinfo` (
`userid` int(11) NOT NULL auto_increment,
`fullname` varchar(255) NOT NULL,
`emailaddress` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Scoringinfo
CREATE TABLE IF NOT EXISTS `scoringinfo` (
`scoreid` int(11) NOT NULL auto_increment,
`companyid` int(11) NOT NULL COMMENT 'from companyinfo',
`userid` int(11) NOT NULL COMMENT 'from userinfo',
`score` int(11) NOT NULL COMMENT 'score',
PRIMARY KEY (`scoreid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Thanks
John
Subject
Written By
Posted
College Project
May 19, 2014 05:56AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.