d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Mysql Dilemma
Closed New Topic New Poll
Member
Posts: 5
Joined: Oct 15 2014
Gold: 0.00
Oct 15 2014 04:29pm
Hi,

I need some serious help. I am modifying this database and I dont have time for debugging. Hope someone has a quick eye for error, and could possibly help a damsel in distress. This is due tommorrow so I appreciate any and all comments.

DROP DATABASE if exists petespaintWO;

CREATE DATABASE petespaintWO;

USE petespaintWO;


DROP TABLE if exists customer;

CREATE TABLE customer (
custId INT NOT NULL AUTO_INCREMENT,
first VARCHAR( 30 ) NOT NULL ,
last VARCHAR( 30 ) NOT NULL ,
email VARCHAR( 50 ) NOT NULL,

ALTER TABLE customer
ADD CONSTRAINT custId_pk PRIMARY KEY (custId);
ALTER TABLE customer
ADD CONSTRAINT email_unq UNIQUE (email);
ALTER TABLE customer
ADD CONSTRAINT email_ck CHECK(email Like '%@%._%');

) ENGINE = InnoDB;



DROP TABLE if exists quote;
CREATE Table quote(
quoteId int NOT NULL AUTO_INCREMENT,
custId int NOT NULL,
typeJob VARCHAR( 50 ) NOT NULL ,
typePaint VARCHAR( 50 ) NOT NULL ,
color VARCHAR( 50 ) NOT NULL ,
time INT NOT NULL,
gallons INT NOT NULL,
area INT NOT NULL,
totalCost decimal(10,2) NOT NULL,

ALTER TABLE quote
ADD CONSTRAINT quoteId_pk PRIMARY KEY (quoteId);

ALTER TABLE quote
ADD CONSTRAINT quoteId_pk
FOREIGN KEY (custId)
REFERENCES Customer(custId);
) ENGINE = InnoDB;



DROP TABLE if exists wall;
CREATE TABLE wall(
wallId INT NOT NULL AUTO_INCREMENT,
quoteId INT NOT NULL,
length INT NOT NULL,
width INT NOT NULL,
CONSTRAINT length_ck CHECK (length >0),
CONSTRAINT width_ck CHECK (width >0),
ALTER TABLE wall
ADD CONSTRAINT wallId_pk PRIMARY KEY(wallId);

ALTER TABLE WALL
ADD CONSTRAINT quoteId_fk
FOREIGN KEY (quoteId)
REFERENCES QUOTE (quoteId);
) ENGINE = InnoDB;


I was adding constraints and checks for validation when this whole code fell apart. The constraints were to add primary keys and/or foreign keys to all three tables as well as email validation and Auto increment for random ids to be assigned at data entry point.

So yea, I have a huge headache and I hope one of you guys could help :)

:bonk: Lori :ph34r:



Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Oct 15 2014 05:03pm
Quote (Lori_35 @ Oct 15 2014 06:29pm)
Hi,

I need some serious help.  I am modifying this database and I dont have time for debugging.

I stopped reading here.

Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Oct 15 2014 05:09pm
Quote (carteblanche @ Oct 15 2014 06:03pm)
I stopped reading here.


Wow dude, I stopped there too to say the exact thing. Soulmates.

Seriously, guy, if you don't have time for debugging just quit now. This is not the profession for you.
Member
Posts: 5
Joined: Oct 15 2014
Gold: 0.00
Oct 15 2014 06:25pm
thanks. no. really. lol.
Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Oct 15 2014 06:28pm
Quote (Lori_35 @ Oct 15 2014 07:25pm)
thanks. no. really. lol.


We're serious.
Member
Posts: 5
Joined: Oct 15 2014
Gold: 0.00
Oct 15 2014 06:30pm
and im not a guy. so wow. The reason I dont is bc i have a ton of work from school and i work full time plus have kids, so um yea time is of an issue at the moment. Professionally it would be work, and if i can do all of these things now, Im not too worried about what I can accomplish. And are you acting like turds because you don't know or you could care less? If you cant be bothered why respond at all? LOL. Is it an existential complex? :p
Member
Posts: 5
Joined: Oct 15 2014
Gold: 0.00
Oct 15 2014 06:34pm
I cant believe I actually registered for this, have fun trolling and being of no particular use to anyone :) cheers to you
Member
Posts: 2,757
Joined: Nov 26 2007
Gold: 1,214.81
Oct 15 2014 06:36pm
Did you just sign up to D2JSP just to post this question? Also, if you're a chick, don't mention that you have kids. Nerds are 100x more likely to help you if they think they have a chance at having sex with you.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Oct 15 2014 06:38pm
Quote (Lori_35 @ Oct 15 2014 08:34pm)
I cant believe I actually registered for this

I can't either, tbh. what made you think it was a good idea in the first place?

Quote (Lori_35 @ Oct 15 2014 08:30pm)
And are you acting like turds because you don't know or you could care less?

Former, personally. I know very little, but i'm pretty good at googling error messages and posting the first link i found. would be helpful if you actually posted your error message.

Quote
6 User(s) are reading this topic (0 Guests and 1 Anonymous): Eep, Blind[zF], labatymo, Minkomonster, Lori_35

jesus, you have the most popular topic in this SF.
Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Oct 15 2014 06:40pm
Quote (Lori_35 @ Oct 15 2014 07:30pm)
and im not a guy. so wow.  The reason I dont is bc i have a ton of work from school and i work full time plus have kids, so um yea time is of an issue at the moment.  Professionally it would be work, and if i can do all of these things now, Im not too worried about what I can accomplish.  And are you acting like turds because you don't know or you could care less?  If you cant be bothered why respond at all? LOL.  Is it an existential complex? :p


No problem bro. Just an FYI, we have no desire to help out any dude who isn't interested in helping themselves.

Perhaps if you started out with "here's what I think is going wrong, can you validate my thoughts or point me in the right direction?" we would be more inclined to help. But just showing up and saying, "my shits broke, can you fix it cause I don't have time for this" is not going to fly. Sorry.

Go Back To Programming & Development Topic List
Closed New Topic New Poll