Solved

MySQL standard

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

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Create a Select Query and Populate a Table 3 51
How many transactions can mysql handle? 3 44
updating the date data 12 34
Combining Queries 7 29
Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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