Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hxx3b-0005zJ-Sr for pgsql-general@arkaria.postgresql.org; Wed, 14 Aug 2019 17:27:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hxx3Z-0001aZ-S9 for pgsql-general@arkaria.postgresql.org; Wed, 14 Aug 2019 17:27:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hxx3Y-0001aM-1C for pgsql-general@lists.postgresql.org; Wed, 14 Aug 2019 17:27:29 +0000 Received: from [66.111.4.25] (helo=out1-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hxx3U-0002IA-Lc for pgsql-general@lists.postgresql.org; Wed, 14 Aug 2019 17:27:26 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D671921E5B; Wed, 14 Aug 2019 13:27:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 14 Aug 2019 13:27:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=9 kXYBLHodJgqpStDVE2Ry00xI4YGOAHU/e0yRcYlyB0=; b=AZ/xgppnRyiBgpfqt cD+kCOu7SecuEB9ywegtngP60gDBJGC7VYjD8DZYro4ptOsAFjD4aE5owwhzXdOQ +5N7YakQPEha3uGhSV25AjWwxHEsa9jV20YUHon6BI16KBc3FzDB1bCy1v6tMsrc KiXMrD1dHJEx8E2SZlwnVTiYewG7RqWmp1Hl5T6pcymiNg6aTTg9poVv/z/vFQu8 iax8EHkyC0LVQcv1++rsR7f3LTJh+eotXfLz6vl+sdc7roC6QgHjjI7ZSaasXAMk kspba7YSme9K2tJuVDSSmbrMx/j5OM9fyMzl5+hOkoPci16S2CLjGksze74XeCz0 AodvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=9kXYBLHodJgqpStDVE2Ry00xI4YGOAHU/e0yRcYly B0=; b=RxD6pYPQiX1tZGvSC1hAvkCo01dDhq1VddWouk4iDRfTy+SjKHHzUhY4Q SlLmgxTucVL90Mp0DVhf27sFrx65aoY9cIG/pdy14wOLbuTtAkEDGRDIgBZIzkLm sWqbS6PnEbp3m2cVQ0ZYpGj0xNfkehfUMdTUTVlEEs0//IoUk+ArTVvC9l/mxCtc ZIzDYORd88RFntVwIuys9ycri7Xhsu15OqzskLLMPsyIsJjhDR9nT7aYtp3NeqG1 nygbXGpgc46KqCxhW1i4SA9IvSVg7z54HSDfLKHW/qrnvF07NScf/b7HkwLFMD9q wlOUxEJa29E/9mdzwy6YpuVpLAuYw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddruddvledghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlqddutddmnecujfgurhepuffvfhfhkffffgggjggtgfesthejredt tdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrg hvvghrsegrkhhlrghvvghrrdgtohhmqeenucffohhmrghinhepuhhsuggrrdhgohhvnecu kfhppeejgedrleegrdejfedrvddvvdenucfrrghrrghmpehmrghilhhfrhhomheprggurh hirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigv pedt X-ME-Proxy: Received: from ranger.suse (unknown [74.94.73.222]) by mail.messagingengine.com (Postfix) with ESMTPA id 99DFD380079; Wed, 14 Aug 2019 13:27:12 -0400 (EDT) Subject: Re: Converting Access .mdb to postgres To: Rich Shepard , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <53de1dad-ff15-c8dd-aa98-869962af9b12@aklaver.com> Date: Wed, 14 Aug 2019 10:27:11 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 8/14/19 10:09 AM, Rich Shepard wrote: > I have the need to convert a flat-file Access database to postgres. I've > exported the .mdb tables using mdbtools. There's an accompanying metadata > PDF with column names and data types for each of the 84 tables, but no > description of the tables or column headings. I've asked the agency to > provide that information ... if they have it. No table has primary or > referential keys and, of course, there's no E-R diagram of the schema. So you have the tables in Postgres, correct? > > If anyone's done this I'd appreciate learning from your experiences. And I > assume there are no tools to automate all or part of the process so it must > be done manually. I did something similar with the USDA Nutrient database(with notion of making it a test dataset): https://ndb.nal.usda.gov/ndb/doc/index Their PDF: https://www.ars.usda.gov/ARSUserFiles/80400525/Data/SR-Legacy/SR-Legacy_Doc.pdf contained table and field descriptions as well as relationships. Unfortunately the relationship information was not really accurate. Access allows you to define 'virtual' relationships that are not really enforced as I found out when looking at the data. Good luck on getting information, my experience is agencies(I have also dealt with USFWS) do not respond to requests about their data. If you do get the information I guessing you will have to create your own method of dealing with it. Don't count on the data being consistent. > > Among the tables are many lookup tables. I don't know whether to leave them > as tables or apply a different structure to them. > > Advice, suggestions, and recommendations are all welcome. > > TIA, > > Rich > > -- Adrian Klaver adrian.klaver@aklaver.com