Solved

MySQL standard

Posted on 2013-10-25
4
284 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

17 Experts available now in Live!

Get 1:1 Help Now