Could anyone help me finish the databases before 12?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Anton111

Thread Starter
Joined
Jun 2, 2018
Messages
3
it's a SQL file , and here there's a lot of error needed to be fix




DROP DATABASE IF EXISTS `Game_store`;
CREATE DATABASE IF NOT EXISTS `Game_store`;
USE `Game_store`;
--
-- Table structure for table `Game``
--
DROP TABLE IF EXISTS `Game`;
CREATE TABLE `Game` (
`Gname` varchar(45) NOT NULL,
`Game_ID` int(11) NOT NULL,
`Platform` varchar(45) NOT NULL,
`Acheivement` varchar(45) NOT NULL,
`Author` varchar(45) NOT NULL,
`Recommend Tags` varchar(45) NOT NULL,
`Global Tags` varchar(45) NOT NULL,
`Price` varchar(45) NOT NULL,
PRIMARY KEY (`Game_ID`),
);
INSERT INTO `Game` VALUES ('Il Duce',1,'Windows','Singleplayer','Strategy RPG','$25'),('ROV',4,'IOS','Multiplayer','PVP Strategy','Free'),('EU4',5,'Windows','Singleplayer','Strategy','$10');
--
-- Table structure for table `user_account`
--
DROP TABLE IF EXISTS `user_account`;
CREATE TABLE `user_account` (
`Name` varchar(30) NOT NULL,
`ID` int(11) NOT NULL,
`Bdate` datetime NOT NULL,
`Location` varchar(60) NOT NULL,
`Password` varchar(25) NOT NULL,
`Gid` int(11) NOT NULL,
PRIMARY KEY (`ID`),
Foreign KEY (Gid) REFERENCES Game(Game_ID));
--
-- Dumping data for table `user_account`
--
INSERT INTO `user_account` VALUES ('John',123456789,'1965-01-09 00:00:00','731 Fondren, Houston, TX','300sparta',1),('Frankin',333445555,'1955-12-08 00:00:00','638 Voss, houston, TX','35352',4),('Joyce',453453453,'1972-07-31 00:00:00','5631 Rice, Houston, TX','25000',5),('Ramesh',666884444,'1962-09-15 00:00:00','975 Fire Oak, Humbble, TX','38000',1),('james',888665555,'1937-11-10 00:00:00','450 Stone, Houston, TX','55000',4),('Jennifer',987654321,'1941-06-20 00:00:00','291 Berry, Bellaire, tX','43000',1),('Ahmad',987987987,'1969-03-29 00:00:00','980 Dallas, Houston, TX','25000',5),('Alicia',999887777,'1968-01-19 00:00:00','3321 Castle, Spring, TX','25000',5);
--
-- Table structure for table `Modification`
--
DROP TABLE IF EXISTS `Modification`;
CREATE TABLE `Modification` (
`Mod_ID` int(11) NOT NULL,
`Uid` int(11) NOT NULL,
`G_ID` int(11) NOT NULL,
`Mname` varchar(45) NOT NULL,
`Mod_rating` varchar(45) NOT NULL,
PRIMARY KEY (`Mod_ID`,`Mname`)
Foreign KEY (Uid) REFERENCES user_account(ID)
Foreign KEY (G_ID) REFERENCES Game(Game_ID));
--
-- Dumping data for table `Modification`
--
INSERT INTO `Modification` VALUES (333,123456789,1,'Rise of Spartan','9/10'),(777,333445555,5,'Space Exploration','7/10'),(999,123456789,5,'The Root of Civilization','8/10'),(555,666884444,5,'Mad AI','5/10'),(666,453453453,1,'Dark Magic','9/10'),(111,333445555,1,'Back to the future','10/10');
--
-- Table structure for table `Friend`
--
DROP TABLE IF EXISTS `Friend`;
CREATE TABLE `Friend` (
`Userid` int(11) NOT NULL,
`Friend_of` int(11) NOT NULL,
PRIMARY KEY (`Userid`)
Foreign KEY (Friend_of) REFERENCES user_account(ID)
--
-- Dumping data for table `Friend`
--
INSERT INTO `Friend` VALUES (123456789,'Adolf'),(333445555,'Xerxes'),(666884444,'Vladimir'),(453453453,'Nicolas'),(333445555,'Sai');
--
-- Table structure for table `Friend_Message`
--
DROP TABLE IF EXISTS `Friend_Message`;
CREATE TABLE `Friend_Message` (
`Friend_ID` int(11) NOT NULL,
`Message` varchar(300) NOT NULL,
Foreign KEY (Friend_ID) REFERENCES Friend(Userid));
--
-- Dumping data for table `Friend_Message`
--
INSERT INTO `Friend_Message` VALUES (12,'Sieg heil!'),(13,'Meow Meow'),(14,'Hello, Comrade'),(15,'aaaaaahhhh'),(16,'Shut up!');
--
-- Table structure for table `Library`
--
DROP TABLE IF EXISTS `Library`;
CREATE TABLE `Library` (
`U_id` int(11) NOT NULL,
`GameID` int(11) NOT NULL,
Foreign KEY (U_id) REFERENCES user_account(ID)
Foreign KEY (GameID) REFERENCES Game(Game_ID));
--
-- Dumping data for table `Library`
--
INSERT INTO `Library` VALUES (123456789,1),(333445555,4),(453453453,5),(666884444,1),(888665555,4),(999887777,5);
--
-- Table structure for table `Buy`
--
DROP TABLE IF EXISTS `Buy`;
CREATE TABLE `Buy` (
`GamID` int(11) NOT NULL,
`UsrID` int(11) NOT NULL,
`Date_of_purchase` datetime NOT NULL,
PRIMARY KEY (`GamID`,`UsrID`,`Date_of_purchase`)
Foreign KEY (UsrID) REFERENCES user_account(ID)
Foreign KEY (GamID) REFERENCES Game(Game_ID));
--
-- Dumping data for table `Buy`
--
INSERT INTO `Buy` VALUES (1,123456789,'2013-01-09 00:00:00'),(4,333445555,'2018-01-09 00:00:00'),(5,453453453,'2009-01-09 00:00:00'),(1,666884444,'2006-01-09 00:00:00'),(4,888665555,'2017-01-09 00:00:00');
--
-- Table structure for table `Refund`
--
DROP TABLE IF EXISTS `Refund`;
CREATE TABLE `Refund` (
`GaID` int(11) NOT NULL,
`UsID` int(11) NOT NULL,
`Date_of_purchase` datetime NOT NULL,
`play_hours` datetime NOT NULL,
PRIMARY KEY (`GaID`,`UsID`,`Date_of_purchase`,'play_hours')
Foreign KEY (UsID) REFERENCES user_account(ID)
Foreign KEY (GaID) REFERENCES Game(Game_ID));
--
-- Dumping data for table `Refund`
--
INSERT INTO `Refund` VALUES (1,123456789,'2013-01-09 00:00:00',240),(4,333445555,'2018-01-09 00:00:00'),(5,453453453,'2009-01-09 00:00:00',100),(1,666884444,'2006-01-09 00:00:00',200),(4,888665555,'2017-01-09 00:00:00',180);
--
-- Table structure for table `Review`
--
DROP TABLE IF EXISTS `Review`;
CREATE TABLE `Review` (
`Rev_Rating` varchar(45) NOT NULL,
`Gam_ID` int(11) NOT NULL,
`Usr_ID` int(11) NOT NULL,
PRIMARY KEY (`Rev_Rating`,`Gam_ID`,`Usr_ID`)
Foreign KEY (Usr_ID) REFERENCES user_account(ID)
Foreign KEY (Gam_ID) REFERENCES Game(Game_ID));
--
-- Dumping data for table `Review`
--
INSERT INTO `Review` VALUES ('7/10',1,123456789),('6/10',4,333445555),('10/10',5,453453453),('9/10',1,666884444),('8/10',4,888665555);
 
Joined
Dec 15, 2011
Messages
3,397
First Name
Jim
Your inserts seem to be wrong ... syntax is:
Code:
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);
 
Joined
Dec 15, 2011
Messages
3,397
First Name
Jim
As the thread starter only you will see a green button (top left) mark solved ...
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top