Solved

Simplifying a DB

Posted on 2012-04-03
7
343 Views
Last Modified: 2012-04-10
Hello:

I was given a DB with 13 tables in it. These tables store info for a web site.
I need to simplify the DB and make it easy to transform into a MySQL RDBMS.
The current tables only have PKs and zero (0) FKs, which makes the table "un-relational" (am I right on this? please correct if I am wrong - I just don't see any relational lines when creating a Database Diagram from it.)
 
Is there anyway to make the DB more simple than what it is currently, being that there is no relation within the tables?

Thank you.
0
Comment
Question by:noamco36
7 Comments
 
LVL 7

Assisted Solution

by:micropc1
micropc1 earned 84 total points
ID: 37804383
By more simple do you mean more normalized or more consolidated? Without seeing the database it would be impossible to say for sure, but the fact that there are no FKs in a database of that size would indicate to me that the database it not normalized to at least 2nd Normal Form. So yes, I would say the database structure could most definitely be improved, but I'm not sure if this is what you're asking...
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 166 total points
ID: 37804401
I think the code that uses the tables is a more important issue.  13 simple tables is not a big deal but how are you going to access them?
0
 

Author Comment

by:noamco36
ID: 37804668
The way they are accessed is via a web site that fetches info like part numbers.
If I send the script of the DB will you be able to give more advice?
Where should I sent it to (FTP site or on this media)?
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 166 total points
ID: 37804692
You don't need to send it to me, that won't help you any.  Has any code been written yet?  If so, what kind of language was used?  PHP?, ASP?  ASP.NET?  Is it something you know how to do?  If not, then you should consider hiring someone.
0
 
LVL 25

Assisted Solution

by:jogos
jogos earned 83 total points
ID: 37805528
<<0 FK's>>
You mean no single column in a table that contains a value of a primary key of another table?  Yes then it's not relational.

Also possible that those columns exist but that there is not a FK-constraint in database that let database understand the link and guarantees the validity of the values. That lays all the consistency-checks of the values in the application.  Those relations are also used by tools to guide you in building a sql.
0
 
LVL 6

Assisted Solution

by:SJCFL-Admin
SJCFL-Admin earned 83 total points
ID: 37805974
My advice is that unless you understand the use of the data, do not mess with the structure.  You could unintentionally make it worse.

Many DBA's do not feel it is necessary to implement RI provided by the database as it can be achieved by the application and they can save on the overhead.  The downside to this is that the relationships are not immediately obvious and are not enforced during database changes (or employee changes).  

I would be very surprised if your 13 tables do not have some form of application RI involved.  The safest way of detecting it would be to run a profiling tool to determine attributes sharing the same values.  They most likely would be the relationships you would want to investigate further.
0
 
LVL 69

Accepted Solution

by:
ScottPletcher earned 84 total points
ID: 37806948
>> I need to simplify the DB <<

What do you mean by that?  Reduce the number of tables?

You'll hurt the design by doing that.  13 tables is probably too *few* already, not too many.  [I get 20+ tables with the most simple apps after reasonable normalization.]

>> The current tables only have PKs and zero (0) FKs, which makes the table "un-relational" <<

The tables are almost certainly still related to each other.  They're likely just not properly normalized and/or properly enforced.  A lot of people mistakenly think they can do the equivalent of FKs better than the db.  Aside from hiding the relationships in the code, and being very likely inconsistent, the overhead is more.

Institute the proper FKs in the db as you determine them, but do not get rid of tables without very careful consideration.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now