SQLite Forum

sqlite DB + data file - write out all entries
Login
Yeah, I'm with Random on that matter.

What I've figured out is that all you need should be in the DB file (Engelsk.gdb). The .dat file contains what seems like byte streams all put together with the DB having entries that refer to the byte offset and length/size of the streams. The first streams may be pictures or so, but I'm not sure. Later there are streams that are the sound data.

Either way, the tables seem to link English and Dansk together in a way that is not immediately obvious to me. One way I've been able to get some stuff out that seems to make some sense is with this query:

```
-- Dansk --> English
SELECT COALESCE(DN0.word_,DN1.word_) AS Dansk_Word, group_concat(ENG.word_,', ') AS English
  FROM      entries1            AS D2E
  LEFT JOIN lookup1             AS DN0 ON DN0.entry_id_ = D2E.id_
  LEFT JOIN collocation_lookup1 AS DN1 ON DN1.entry_id_ = D2E.id_
  LEFT JOIN reverse1            AS ENG ON ENG.entry_id_ = D2E.id_
 WHERE 1
 GROUP BY D2E.id_
 ORDER BY COALESCE(DN0.word_,DN1.word_)
 LIMIT 20;

  -- Exerpt from Results:
  -- Dansk_Word         |English                                                                                                                         
  -- -------------------|-----------------------------------------------------
  -- accept             |acceptance, confirmation                                                                                                        
  -- accept             |accept, accept, accept, accept, accept, accept, accept, accept                                                                  
  -- accept             |non-acceptance, non-acceptance, non-acceptance, non-acceptance, non-acceptance, non-acceptance, non-acceptance, non-acceptance  
  -- acceptabel         |acceptable                                                                                                                      
  -- acceptabel         |acceptable to                                                                                                                   
  -- acceptabilitet     |acceptability                                                                                                                   
  -- acceptabiliteten   |NULL                                                                                                                            
  -- acceptabilitetens  |NULL                                                                                                                            
  -- acceptabilitets    |NULL                                                                                                                            
  -- acceptant          |acceptor                                                                                                                        
  -- acceptanten        |NULL                                                                                                                            
  -- acceptantens       |NULL                                                                                                                            
  -- acceptanter        |NULL                                                                                                                            


```
and this one for the opposite:

```
-- English --> Dansk
SELECT COALESCE(EN0.word_,EN1.word_) AS English_Word, group_concat(DAN.word_,', ') AS Dansk
  FROM      entries2            AS E2D
  LEFT JOIN lookup2             AS EN0 ON EN0.entry_id_ = E2D.id_
  LEFT JOIN collocation_lookup2 AS EN1 ON EN1.entry_id_ = E2D.id_
  LEFT JOIN reverse2            AS DAN ON DAN.entry_id_ = E2D.id_
 WHERE 1
 GROUP BY E2D.id_
 ORDER BY COALESCE(EN0.word_,EN1.word_)
 LIMIT 20;


  -- Exerpt from Results:
  -- English_Wo-|                                                                                              
  -- rd         |Dansk                                                                                         
  -- -----------|--------------------------------------------------------------
  -- ad-lib     |improvisation                                                                                 
  -- ad-lib     |improviseret                                                                                  
  -- ad-lib     |improvisere                                                                                   
  -- adage      |mundheld, ordsprog, talemåde                                                                  
  -- adam       |adam                                                                                          
  -- adam       |jeg aner ikke hvem han er, jeg kender ham slet ikke                                           
  -- adam       |adamsæble                                                                                     
  -- adamant    |ikke lade sig rokke, være ubøjelig                                                            
  -- adamant    |ikke lade sig rokke hvad angår, ikke lade sig rokke med hensyn til                            
  -- adamant    |ikke lade sig rokke hvad angår, ikke lade sig rokke med hensyn til                            
  -- adamant    |holde stejlt på at, være fast besluttet på at                                                 
  -- adamantly  |være absolut imod, være en absolut urokkelig modstander af                                    
  -- adams      |nul og nix, slet ingenting                                                                    
  -- adapt      |afpasse, bearbejde, indrette, indrette sig, omarbejde, tilpasse, tilpasse sig, tilrettelægge  
  -- adapt      |tilpasse til                                                                                  
  -- adapt      |indrette efter                                                                                
  -- adapt      |indrette til                                                                                  

```
etc.

This may be a sqlite DB they use, but that format is not a well-known or open format (at least not one I am aware of)

Good luck on that.