[Pharo-project] relational database and id field

laurent laffont laurent.laffont at gmail.com
Thu Apr 7 14:45:57 CEST 2011


On Thu, Apr 7, 2011 at 2:39 PM, laurent laffont
<laurent.laffont at gmail.com>wrote:

> On Thu, Apr 7, 2011 at 3:19 PM, Alexandre Bergel <alexandre.bergel at me.com>wrote:
>
>> Hi!
>>
>> Since there are some experts in databases here, I ask a general question
>> about it.
>> Assume that I have to use a relational database to store, let's stay
>> instances of Stef's ComicBook class.
>> Should the class ComicBook have a field id to uniquely identify a book?
>>
>
> I always put an id field. All cases without id I've encountered were always
> a pain.
>
>  I don't have any argument against unique id.
>
>

And if you are thinking about ISBN:
- ISBN "should" be unique. In reality they're not. Because we communicate
with software that have bugs. People who enter ISBN have bugs too. And when
you mashup datas you always get soon or later 2 different documents with
same ISBN.
- documents edited before 1972 and not reedited after don't have ISBN.

Laurent.



> Laurent.
>
>
>
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110407/1ba9474d/attachment.htm>


More information about the Pharo-project mailing list