Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Creating your MySQL Database: Practical Design Tips and Techniques
  • Table Of Contents Toc
Creating your MySQL Database: Practical Design Tips and Techniques

Creating your MySQL Database: Practical Design Tips and Techniques

By : Delisle
3.5 (2)
close
close
Creating your MySQL Database: Practical Design Tips and Techniques

Creating your MySQL Database: Practical Design Tips and Techniques

3.5 (2)
By: Delisle

Overview of this book

For most of us, setting up the database for an application is often an afterthought. While you don't need to be a professional database designer to create a working application, knowing a few insider tips and techniques can make both the process easier and the end result much more effective. This book doesn't set out to make you an expert in data analysis, but it does provide a quick and easy way to raise your game in this essential part of getting your application right.
Table of Contents (12 chapters)
close
close

Performance


A number of points must be examined if we want to improve our structure's efficiency in terms of access speed or disk space used.

Indexes

Adding indexes on columns that are used in a WHERE clause is a common way of speeding up the queries. Let's say that we intend to find all vehicles for a specific brand. The vehicle table has a brand_id column and we want to create an index on this column. In this case, the index won't be unique because each brand is represented by many vehicles.

Using phpMyAdmin, there are two ways to create an index. First, if the index applies to a single column, we can open the Structure page for a table and click the index (flash) icon on the same line as the brand_id column:

This generates the following statement:

ALTER TABLE `vehicle` ADD INDEX(`brand_id`)

We could also create an index on a composite key, for example model_id plus year. For this, we enter the number of columns for our index (two) on the Structure page and hit Go.

Next, on the index management...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Creating your MySQL Database: Practical Design Tips and Techniques
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon