473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Building a database backwards

I want to turn one large, un-normalized table into a relational database.

(Apologies if this is a simple problem. It is one I have not encountered before in my relatively limited work with Access).

I have inherited a “database” that is not a database. It is one table of more than 3 million records with about 50 fields. There is no normalization. It was created from a data-dump of one year’s worth of transaction information for purchases by about 100 different franchise locations.

I cannot access the data in the original system – believe me, I have asked. These data dumps will be occurring every six months from here on out, so I would like to transform this into a relational database that can be updated with each new set of purchase data instead of a series of unrelated tables for different time periods that are queried separately.

I have built smaller databases from scratch before, but I have not transformed existing records in one Access table into many tables. I can conceive of what the different entities would be in this new table – franchises, vendors, the associated addresses, orders, etc. – and what kind of query would yield the complete records I have now, but I do not see how to reassemble all the original records once I have broken down the fields into separate tables. I don't see how the relationships are maintained because there are no relationships as of yet.

So, in short:

-How do I ensure that each original record can be reconstituted from the separate tables?

and

-What is the best way to append the new data to the database when future data-dumps are available?
Mar 29 '13 #1
4 1209
Rabbit
12,516 Expert Mod 8TB
It's difficult to say without knowing anything about the design. Please post the current unnormalized design and your vision of the normalized design.

Fifty fields is a lot so if you want to start with a subset of those fields as a simple exercise, we can do that as well. So pick the fields that would make up two to three related tables and we can work on that subset. But if you want to do it all in one go we can do that as well.
Mar 29 '13 #2
Rabbit
12,516 Expert Mod 8TB
Just to get you thinking about the process, here is a simple example.

Imagine you have this unnormalized data:
Expand|Select|Wrap|Line Numbers
  1. ClientName PhoneNum1  PhoneNum2
  2. Bob        5551234567 5559999999
  3. Susan      8884561278
The normalized design would be this:
Expand|Select|Wrap|Line Numbers
  1. Clients
  2. ClientID - Autonumber
  3. ClientName - Text(50)
  4.  
  5. PhoneNum
  6. ClientID - FK
  7. Num - Text(10)
To normalize, you would:
  1. Select distinct client names from the unnormalized and insert it into Clients.
  2. Select PhoneNum1 from the unnormalized, join to Clients to get ClientID and insert into PhoneNum where the phone number isn't blank.
  3. Repeat above for PhoneNum2.

To denormalize, you would join the tables together and run a crosstab query.
Mar 29 '13 #3
nico5038
3,080 Expert 2GB
To get an idea you could use the analyse feature of Access under the Database tools. This will show some possible normalization, but it won't be the "silver bullet". Some normalisation expertise will still be needed.
For that check out out Articles section.

Nic;o)
Mar 31 '13 #4
ADezii
8,834 Expert 8TB
@meierrain:
Could you possible Upload an Access Database consisting of, say the first 500 Records from your Data? A Picture is worth a thousand words, especially so in this case (LOL).
Apr 1 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Michel | last post by:
Hi, I like to build a small simple dinamic website: Point-of-sale (detail-shop), So entering stock, logging all sales, print out invoices and download the logs to be imported into Excel. I...
3
by: lawrence | last post by:
If I do something like : $result = mysql_query($query); $dbArray = dbResultIntoKeyArray($result); and this is the function: function dbResultIntoKeyArray($result) {
6
by: JaZz | last post by:
Greetings fellow coders, I'm still gaining experiance in developing PHP applications, and have completed a couple of projects already. This has prompted me to look for ways to reduce the...
5
by: Krishna Srinivasan | last post by:
Right now I am offering some services on an ASP model that uses a single database. The tables are normalized to use the unique client ID when performing a query. Wouldn't it be simpler if I just...
4
by: M. Katz | last post by:
I'm relatively new to PHP/MySQL and I've heard about maintaining a persistent connection to the database. To save overhead, I'd like to maintain the connection in a session variable, but I have a...
7
by: Robert | last post by:
I have a php/mysql query working like so: $Query = "SELECT * FROM $TableName WHERE name LIKE '%".$searchterm."%' " All I want to do now is sort them alphabetically. By using the above...
12
by: Ken | last post by:
I have been working on this problem for a few days. When I write data into a sql database, the results are duplicate listings: PHP Code: <?php session_start(); $dbh=mysql_connect...
1
by: Brian | last post by:
I am writing a database to keep track of Network Equipment. Table Equip_1 ID,Node,Card,Slot,Port,Channel Table Equip_2 ID,Card,Port Table Equip_3 ID,Shelf,Card,Port As you can see no piece of...
1
by: Charles Turner | last post by:
Hi guys, Hope some of you SQL database experts out there can help me, 'cos at the moment I'm going mad! I want to use ACT! 2008 which uses MSSQL on 2 Laptops, (Vista & XP) one is my own...
4
by: Nano | last post by:
Hey, I have been studying and working on databases for quite a time now. I know quite a lot about databases. Now I have been assigned a project where I have to build an application using the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.