 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ORA-00902 invalid datatype when trying to create a table with primary key based on two columns in Oracle 10g</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/ora-00902-invalid-datatype/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/ora-00902-invalid-datatype/</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2013 03:14:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: techguys</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/ora-00902-invalid-datatype/#comment-78609</link>
		<dc:creator>techguys</dc:creator>
		<pubDate>Sat, 26 Jun 2010 03:28:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-78609</guid>
		<description><![CDATA[I apologize for not explaining the useage of the table. 
The table is used to store unique password and username combinations that were used in the past two years  for each application user.   So the actual senario is that  one particular application user&#039;s password expires every 90 days and he/she must change the password.  The previousely  used username and password combination must be stored in a table. Next time (after 90 days)  when this same user changes his/her password the system has to check that the new password for this particular user must not be any of the   passwords that have been used in the last two years. So, my question is this. How I can accomplish this requirement  by making only username a primary key?

Thanks a lot]]></description>
		<content:encoded><![CDATA[<p>I apologize for not explaining the useage of the table.<br />
The table is used to store unique password and username combinations that were used in the past two years  for each application user.   So the actual senario is that  one particular application user&#8217;s password expires every 90 days and he/she must change the password.  The previousely  used username and password combination must be stored in a table. Next time (after 90 days)  when this same user changes his/her password the system has to check that the new password for this particular user must not be any of the   passwords that have been used in the last two years. So, my question is this. How I can accomplish this requirement  by making only username a primary key?</p>
<p>Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/ora-00902-invalid-datatype/#comment-78607</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Sat, 26 Jun 2010 00:53:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-78607</guid>
		<description><![CDATA[I didn&#039;t say that the purpose of the pk would be nullified if you use &lt;b&gt;a cobination of two fields&lt;/b&gt; as primary key.  I said it would nullify it  &lt;b&gt;in this specific case&lt;/b&gt; (for the reasons exposed by Mrdenny).

We were assuming about the usage of this table since no information was provided in that respect.  The user should be unique if this is the main user catalog, but I guess it is not.  It seems that you will be using this table to store password change events only.

If you create the primary key including the password, it won&#039;t allow the same user-password combination never (if you want to prohibit the use of the last &lt;b&gt;24&lt;/b&gt; different passwords only, this is not the correct approach).  

On the other hand, if passwords are being stored encrypted, then, depending on the encryption method, the same password could result in a different string each time it is encrypted, and the pk would not prevent it from being stored.]]></description>
		<content:encoded><![CDATA[<p>I didn&#8217;t say that the purpose of the pk would be nullified if you use <b>a cobination of two fields</b> as primary key.  I said it would nullify it  <b>in this specific case</b> (for the reasons exposed by Mrdenny).</p>
<p>We were assuming about the usage of this table since no information was provided in that respect.  The user should be unique if this is the main user catalog, but I guess it is not.  It seems that you will be using this table to store password change events only.</p>
<p>If you create the primary key including the password, it won&#8217;t allow the same user-password combination never (if you want to prohibit the use of the last <b>24</b> different passwords only, this is not the correct approach).  </p>
<p>On the other hand, if passwords are being stored encrypted, then, depending on the encryption method, the same password could result in a different string each time it is encrypted, and the pk would not prevent it from being stored.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: techguys</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/ora-00902-invalid-datatype/#comment-78603</link>
		<dc:creator>techguys</dc:creator>
		<pubDate>Fri, 25 Jun 2010 23:18:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-78603</guid>
		<description><![CDATA[The idea of making username and password a primary key is to prevent one user from entering the same password as any previously used 24 passwords during password change.  In addition there is no any established rule to enforce username to be  unique. In a table where username and password are stored, there are already duplicate usernames.
How this can be corrected?
Carlosdl:  Can you explain how the purpose of primary key can be nullified if you use a cobination of two field as primary key?

Thanks]]></description>
		<content:encoded><![CDATA[<p>The idea of making username and password a primary key is to prevent one user from entering the same password as any previously used 24 passwords during password change.  In addition there is no any established rule to enforce username to be  unique. In a table where username and password are stored, there are already duplicate usernames.<br />
How this can be corrected?<br />
Carlosdl:  Can you explain how the purpose of primary key can be nullified if you use a cobination of two field as primary key?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrdenny</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/ora-00902-invalid-datatype/#comment-78585</link>
		<dc:creator>mrdenny</dc:creator>
		<pubDate>Fri, 25 Jun 2010 18:02:23 +0000</pubDate>
		<guid isPermaLink="false">#comment-78585</guid>
		<description><![CDATA[You should change the primary key to being just the username field.  With the current primary key you can have two people with the same username, as long as they have different passwords.  Putting the primary key on the username will allow you to have unique usernames.]]></description>
		<content:encoded><![CDATA[<p>You should change the primary key to being just the username field.  With the current primary key you can have two people with the same username, as long as they have different passwords.  Putting the primary key on the username will allow you to have unique usernames.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.047 seconds using memcached
Object Caching 309/315 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 16:46:07 -->