Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Simplifying a DB

Posted on 2012-04-03
7
Medium Priority
?
359 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 252 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 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 498 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 498 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 249 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 249 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 70

Accepted Solution

by:
Scott Pletcher earned 252 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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

972 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