Thread: Entering data issues....
03-15-08, 11:11 #1Registered User
- Join Date
- Mar 2008
Unanswered: Entering data issues....
CREATE TABLE holiday
(holidayId NUMBER(2) PRIMARY KEY,
flightno NUMBER(5) NOT NULL,
holmanagerid NUMBER(2) NOT NULL,
destination CHAR (15),
numdays NUMBER (2) DEFAULT 7,
basicprice NUMBER (2);
CREATE TABLE holidaymanager
(holmanagerid NUMBER (2) PRIMARY KEY,
holidayId number(2) NOT NULL);
CREATE TABLE flight
(flightno NUMBER (2) PRIMARY KEY,
airline VARCHAR (15),
CREATE TABLE booking
(numinparty NUMBER (2),
holidayid NUMBER (2) NOT NULL,
custid NUMBER (2) NOT NULL,
hotelid NUMBER (2) NOT NULL,
agencyid NUMBER (2) NOT NULL);
CREATE TABLE hotel
(hotelid number (2) PRIMARY KEY,
hotelname VARCHAR2 (25));
CREATE TABLE travelagent
(agencyid NUMBER(2) PRIMARY KEY,
CREATE TABLE customer
(custid NUMBER (2) PRIMARY KEY,
custname CHAR (15));
CREATE TABLE tripbooking
(holidayid NUMBER (2),
tripid NUMBER (2),
custid NUMBER (2));
CREATE TABLE trip
(tripid NUMBER (2) PRIMARY KEY,
tripdestination CHAR (15),
tripdate DATE);I have declared a number of the attributes as FOREIGN KEYS.
How would I succesfully enter data into the first table with out getting integrity constraint (F9092473.SYS_C0077418) violated - parent key not found?
03-15-08, 11:34 #2Registered User
Provided Answers: 1
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
>How would I successfully enter data into the first table
Which table is the "first table"?
A database is like a basket holding a number of colored balls.
Which ball is the "first ball"?
>I have declared a number of the attributes as FOREIGN KEYS.
but you have decided that we don't need to know what they are & yet expect answers to your question. WHY?
If you design "circular" constraints, you need to either change your design or be clever enough to work within its restrictions.
Simply because you can "design" a fatally flawed architecture, it does not mean you should actually deploy it.
One needs to be smarter than the tools they (ab)use.
I suspect that if the data elements were normalized into 3rd normal form, that it would eliminate the 'circular' constraints.
Last edited by anacedent; 03-15-08 at 15:07.You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.