Solved

Simplifying a DB

Posted on 2012-04-03
7
344 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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:
Scott Pletcher 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

816 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

13 Experts available now in Live!

Get 1:1 Help Now