[Netarchivesuite-devel] Database Guidelines

Colin Rosenthal csr at statsbiblioteket.dk
Fri Nov 27 15:05:16 CET 2009


One more question. Do we have a clever way to run all the unit tests on 
both derby and MySQL ?
Colin

Colin Rosenthal wrote:
> I see that DBConnect also needs a createTable() method to add a new line 
> to schemaversions.
> --
> Colin
>
> Søren Vejrup Carlsen wrote:
>   
>> Just go ahead then, Colin.
>>
>> /Søren
>> -----Oprindelig meddelelse-----
>> Fra: netarchivesuite-devel-bounces at lists.gforge.statsbiblioteket.dk [mailto:netarchivesuite-devel-bounces at lists.gforge.statsbiblioteket.dk] På vegne af Søren Vejrup Carlsen
>> Sendt: 27. november 2009 13:46
>> Til: netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>> Emne: Re: [Netarchivesuite-devel] Database Guidelines
>>
>> Hi Colin.
>> DBspecifics should be used to do this. It may be, that DBSpecifics may need some slight modifications for this to possible.
>> The SQL-files, however, need to be updated anyway, but mostly for documentation purpose, as they are a crucial element in the documentation of the database tables.
>>
>> regards
>> Søren
>>
>> -----Oprindelig meddelelse-----
>> Fra: netarchivesuite-devel-bounces at lists.gforge.statsbiblioteket.dk [mailto:netarchivesuite-devel-bounces at lists.gforge.statsbiblioteket.dk] På vegne af Colin Rosenthal
>> Sendt: 27. november 2009 13:38
>> Til: netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>> Emne: Re: [Netarchivesuite-devel] Database Guidelines
>>
>> Does this mean that DBSpecifics can also be used to create the initial 
>> version of a new table so that the .sql files
>> don't need to be updated at all? It seems that DBUtils.getTableVersion 
>> returns zero for a non-existent table, so this
>> should work.
>>
>> --
>> Colin
>>
>> Søren Vejrup Carlsen wrote:
>>   
>>     
>>> Hi Colin.
>>> Yes and no. The original database design was made by Lars, and either he did not want to introduce foreign keys, og foreign keys wasn't supported by 
>>> Derby at that time (I have to look in the docs for Derby to see whether or not foreign keys are included in the SQL supported by Derby.
>>>
>>> So any foreign constraints (which are you thinking about) need to enforced by code.
>>>
>>> Introducing new database tables should be quite straight forward, but we don't have any guidelines for this.
>>>
>>> You have to add an method to the DBspecifics class, and then implement the create operation itself for both MySQL (MysqlSpecifics) and Derby (DerbySpecifics).
>>>
>>> It would be easier if you left that job to me.
>>>
>>> Søren
>>>
>>> -----Oprindelig meddelelse-----
>>> Fra: netarchivesuite-devel-bounces at lists.gforge.statsbiblioteket.dk [mailto:netarchivesuite-devel-bounces at lists.gforge.statsbiblioteket.dk] På vegne af Colin Rosenthal
>>> Sendt: 27. november 2009 10:23
>>> Til: netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>>> Emne: [Netarchivesuite-devel] Database Guidelines
>>>
>>> Hi all,
>>>
>>> Creating a model for global crawler traps requires some new tables in 
>>> the database. Do we have any guidelines for this?
>>> For example, I note that our derby db schema has no foreign key 
>>> constraints even when they would appear to be
>>> indicated. Is this a general policy?
>>>
>>>
>>> --
>>> Colin
>>>
>>> _______________________________________________
>>> Netarchivesuite-devel mailing list
>>> Netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>>> https://lists.gforge.statsbiblioteket.dk/mailman/listinfo/netarchivesuite-devel
>>>
>>> _______________________________________________
>>> Netarchivesuite-devel mailing list
>>> Netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>>> https://lists.gforge.statsbiblioteket.dk/mailman/listinfo/netarchivesuite-devel
>>>   
>>>     
>>>       
>> _______________________________________________
>> Netarchivesuite-devel mailing list
>> Netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>> https://lists.gforge.statsbiblioteket.dk/mailman/listinfo/netarchivesuite-devel
>>
>> _______________________________________________
>> Netarchivesuite-devel mailing list
>> Netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>> https://lists.gforge.statsbiblioteket.dk/mailman/listinfo/netarchivesuite-devel
>>
>> _______________________________________________
>> Netarchivesuite-devel mailing list
>> Netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>> https://lists.gforge.statsbiblioteket.dk/mailman/listinfo/netarchivesuite-devel
>>   
>>     
>
> _______________________________________________
> Netarchivesuite-devel mailing list
> Netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
> https://lists.gforge.statsbiblioteket.dk/mailman/listinfo/netarchivesuite-devel
>   




More information about the Netarchivesuite-devel mailing list