Solved

MySQL standard

Posted on 2013-10-25
4
290 Views
Last Modified: 2013-11-01
I am brand new to mySQL and need to develop a standard for all mySQL databases for my company.

i do not even know where to start and what to include into the document. Any ideas?
0
Comment
Question by:YZlat
4 Comments
 
LVL 3

Accepted Solution

by:
Peter Haussl earned 125 total points
ID: 39600545
Hi,

Start with naming conventions and used data types. Which is in order to keep the overview very important especially when it is about a big amount of tables.

e.g. start names of tables with an tusers and so called views with an vuser.

Additionally Standard for database design should also include how fieldnames are called.
e.g. if Primary keys have to have a Special Name in order to have them the same way designed.

All the rest is quite depened on your businesscase and size and amount of tables.

br
Peter

[edit] within the following link you will find also example in order to get an idea. This example is related to Oracle database, i found on Google.

http://www.google.at/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&cad=rja&ved=0CHAQFjAF&url=http%3A%2F%2Fwww.bced.gov.bc.ca%2Fimb%2Fdownloads%2Fodeveguide2.doc&ei=q4hqUsDeDKjb0QXi7oCQBQ&usg=AFQjCNF_gcFdussc_EIKJn9ZIoxP3Ihwfg&bvm=bv.55123115,d.Yms

They are also including Terms of projectmembers (DBA,...) and their responsibilities.
How stored procedures needs to be coded,....

Maybe it is useful for your Job.
0
 
LVL 32

Assisted Solution

by:Daniel Wilson
Daniel Wilson earned 125 total points
ID: 39601034
Yeah, naming conventions, data types, and key conventions are the place to start.  I'm not a fan of prefixes for tables, but their use or non-use should be standardized for the organization.

You should standardize whether table names are singular or plural.  Whether the tables are Customer or Customers makes no real difference, but remembering that the Customer table links to the Orders table which links to the OrderDetail table which links to the Products table ... because singular vs plural was whimsical becomes a real drag.

Capitalization enters the picture too.  Will your names be CamelCase, underscored_lower, etc?  It's a matter more of preference than anything, but should be standardized so that remembering the names is easy.

Beyond the Primary key, will you require foreign keys?  What rule will be used on deletion? There's no one-size-fits-all right answer (though this is closer to right/wrong than the naming convention is), but it should be standardized.

Also, what storage engine will you use?  Better to determine early what you will use (and what exceptions might be) than to go with defaults or let each developer make his own choice without consideration of the relative advantages of each.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39603785
The kind of thing you're describing is usually done by a full time four year college engineering major.

I think I would start by making a Google search for "learning mysql" and would follow the many good links that can point you to learning resources.  You will quickly see that this is not a good area to be guessing, especially since you're going to be setting the foundation for your company's applications.  Once you have done that, you might want to go to a nearby college or university and hire someone in the computer science department who is an expert in data base design and administration.  You can make a modest investment now and enjoy a strong foundation for growth or you can spend your career struggling, patching and repairing a botched design.  

I've seen this happen too many times.  As but one example of what can go wrong, consider the rollout of the US healthcare.gov web site.  They spent over half a billion dollars but because they started with flawed underpinnings the site still does not work, and is a huge embarrassment for the administration!

As the great oil-well firefighter Red Adair famously said, "If you think it's expensive to hire a professional, just wait till you hire an amateur!"
0
 
LVL 35

Author Closing Comment

by:YZlat
ID: 39617785
thanks!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

16 Experts available now in Live!

Get 1:1 Help Now