Home » SQL & PL/SQL » SQL & PL/SQL » Table Instance Chart Question
Table Instance Chart Question [message #569151] Sun, 21 October 2012 11:29 Go to next message
migoysplace
Messages: 4
Registered: October 2012
Junior Member
Whenever you're trying to create a table instance chart,
and if theres 3 primary keys(composite keys). Do u put in the table instance chart
as PK1, PK2, PK3 for the 3 primary keys?
And also if theres 2 foreign keys in the table,
do u put in as FK1, FK2 on their key types?
Re: Table Instance Chart Question [message #569152 is a reply to message #569151] Sun, 21 October 2012 11:33 Go to previous messageGo to next message
Michel Cadot
Messages: 59422
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What does "put" mean?
A table has only ONE primary key.

Regards
Michel
Re: Table Instance Chart Question [message #569153 is a reply to message #569152] Sun, 21 October 2012 11:57 Go to previous messageGo to next message
migoysplace
Messages: 4
Registered: October 2012
Junior Member
Write on the data type section for the table instance chart
I mean if theres 3 composite keys. How do you write it on the data type section of the
table instance chart? Do u write PK1, PK2, PK3? Or all of them just PK?
Re: Table Instance Chart Question [message #569154 is a reply to message #569153] Sun, 21 October 2012 12:00 Go to previous messageGo to next message
Michel Cadot
Messages: 59422
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Still clear as mud.

Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.

Regards
Michel
Re: Table Instance Chart Question [message #569155 is a reply to message #569154] Sun, 21 October 2012 12:16 Go to previous messageGo to next message
migoysplace
Messages: 4
Registered: October 2012
Junior Member
CREATE TABLE INGREDIENTS VALUES(
PID NUMBER(2) REFERENCES PANCAKES(PID),
FID NUMBER(2) REFERENCES FRUITS(FID),
IID NUMBER(2) NOT NULL
PRIMARY KEYS( PID,FID, IID)

How do you write these on a table instance chart since theres composite keys


Re: Table Instance Chart Question [message #569156 is a reply to message #569155] Sun, 21 October 2012 12:40 Go to previous messageGo to next message
Michel Cadot
Messages: 59422
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is a "table instance chart"?
Note that you are in a SQL & PL/SQL forum, so we use SQL*Plus to execute SQL.
Maybe you didn't post your question in the correct forum.

Regards
Michel

[Updated on: Sun, 21 October 2012 12:41]

Report message to a moderator

Re: Table Instance Chart Question [message #569157 is a reply to message #569156] Sun, 21 October 2012 12:56 Go to previous messageGo to next message
BlackSwan
Messages: 22905
Registered: January 2009
Senior Member
>How do you write these on a table instance chart since theres composite keys

post complete results from SQL below

SELECT * FROM V$VERSION;
Re: Table Instance Chart Question [message #569188 is a reply to message #569155] Mon, 22 October 2012 08:54 Go to previous message
c_stenersen
Messages: 254
Registered: August 2007
Senior Member
I would say that you should write only PK. Don't add any number such as PK1, PK2, PK3. It doesn't really make any sense since as Michel says, there's only one primary key on the table.

And yes, I think this is in the wrong forum. I had to google it to find out what exactly a table instance chart was. (It's not an expression I have used for this before.) But this is something you draw to show the structure of the db, and not something linked to problems with actual code written.
Previous Topic: Oracle Group By Error!!! Please help
Next Topic: QUERY PROBLEM
Goto Forum:
  


Current Time: Thu Oct 23 16:17:46 CDT 2014

Total time taken to generate the page: 0.08975 seconds