ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
CREATE DATABASE sqoss;
USE sqoss;
CREATE TABLE Commiter
(
pk_cmterID INT(10) UNSIGNED not null,
cmterName CHAR(15) not null,
PRIMARY KEY(pk_cmterID)
);
CREATE TABLE Project
(
pk_projID INT(10) not null,
projName CHAR(30) not null,
projWebsite CHAR(50),
projContactPoint CHAR(30),
projSrcPath CHAR(80),
projMailPath CHAR(80),
PRIMARY KEY(pk_projID)
);
CREATE TABLE ProjectVersion
(
pfk_projID INT(10) not null,
projName CHAR(15) not null,
projVersion VARCHAR(10) not null
PRIMARY KEY (pfk_projID),
FOREIGN KEY (pfk_projID) REFERENCES Project(pk_projID) ON UPDATE CASCADE
);
CREATE TABLE Commit
(
pk_cmitID INT(30) UNSIGNED not null,
cmitTime TIMESTAMP not null,
fk_cmterID INT(10) not null,
cmitProperties CHAR(80)
cmitComment TEXT,
cmitCommentLines INT(10),
fk_projID INT(10) not null,
FOREIGN KEY (fk_cmterID) REFERENCES Commiter(pk_cmterID) ON UPDATE CASCADE,
FOREIGN KEY (fk_projID) REFERENCES ProjectVersion(pfk_projID) ON UPDATE CASCADE
);
and i get the following errors:
Code:
mysql> source /home/kostas/sqo-oss/db.sql
Query OK, 1 row affected (0.00 sec)
Database changed
Query OK, 0 rows affected (0.02 sec)
Query OK, 0 rows affected (0.00 sec)
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(pfk_projID),
FOREIGN KEY (pfk_projID) REFERENCES Project(pk_projID) ON UPDATE ' at line 6
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cmitComment TEXT,
cmitCommentLines INT(10),
fk_projID INT(10) not null,
FOREI' at line 7
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.