Database Design for Mere Mortals: A Hands-On Guide to Relational Database Design (2nd Edition)

Author: Michael James Hernandez
4.3
All Stack Overflow 13

Comments

by zer00eyz   2019-01-05
> DBs I've shunned most of my career.

Database Design for Mere Mortals: https://www.amazon.com/Database-Design-Mere-Mortals-Hands/dp...

This is the book I recommend to everyone who is shy about DB's - I have owned several copies and given every one away. It breaks down not only functionality but how to create a good design in a sensible and easy to understand way. Worth every penny (and now somewhat cheap)

by anonymous   2017-08-20

While I agree with others that your question right now is much too broad and can't really be answered (except for the "it depends" approach :-)), there is one book I would wholeheartedly recommend for anyone beginning database design in general:

Michael Hernandez: Database Design for Mere Mortals(R): A Hands-On Guide to Relational Database Design

alt text http://ecx.images-amazon.com/images/I/61XMDo4BFkL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg

It's a really hands-on, no-frills, down to earth book and introduces all the major and important concepts in a very understandable, very approachable fashion. Well written, interesting, very sound and useful - highly recommended!

Marc

by anonymous   2017-08-20

Security:

You have some elements of best practices, but there are some things missing.

  • Use HTTPS so that the traffic between the Android app and your PHP web server is encrypted. Otherwise anyone can "wiretap" and see what's in the packets going back and forth. Read https://blog.hartleybrody.com/https-certificates/ and https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-16-04
  • You only want people running your Android app to submit REST API requests. But anyone using a browser or running curl code can reach your REST server. You need to use authentication, so access to your REST API is restricted to legitimate clients. For example, see https://stormpath.com/blog/the-ultimate-guide-to-mobile-api-security
  • Please also read the book Essential PHP Security. Any web developer should learn proper security practices, in the same way that an electrician needs to learn how to do safe wiring to prevent accidental fires.

Database design:

You seem to be using the word "database" where I would expect you to say "table." Yes, you can and should have multiple tables on your MySQL server. The application I support has over 120 tables, and there are certainly many applications with many more tables. It depends on the complexity of the data you need to store.

Here's a good book to start with: Database Design for Mere Mortals

If you want to get more into the theory behind the practice, I enjoyed SQL and Relational Theory: How to Write Accurate SQL Code 3rd Edition.

And I have to plug my own book: SQL Antipatterns: Avoiding the Pitfalls of Database Programming.

by anonymous   2017-08-20

It's commendable that you're willing to jump in to this project, but in my experience trying to do a real project at the same time as you're learning the basics of any technical subject is likely to result in a project that doesn't work. And it takes ten times as long.

So I would recommend spending some time educating yourself first, by doing some reading and some experimentation. Design a practice database and the code to use it, but not the database you need for your project.

Here's a well-regarded book that might help you:

After you are more comfortable with the basics of database design, then you can start your real project.