Solved

Simplifying a DB

Posted on 2012-04-03
7
340 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 82

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 82

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

744 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