

Similar course is available at coursera (free, online): I suggest you to take this course at Stanford (free, online): Learning Data(base) Modelling - Start-up Guidance Every single index causes maintenance overhead when inserting, updating and deleting data - indexes aren't free, use them only if you really know what you're doing and see an overall performance benefit (of the whole system) when adding one. Indexes: in general, don't over-index your tables - most often devs tend to have too many indexes on their tables, not fully understanding if and how those will be used (or not used). I would advise against just using blob type / TEXT / VARCHAR(MAX) for everything - those types are intended for really long text - use them sparingly, they're often accompanied by less than ideal access mechanisms and thus performance drawbacks. Use such knowledge to "tune" your string lengths. Windows file system paths (file names including path) have a Windows limitation of 260 characters.E-Mails have a max length of 255 characters as defined in a RFC document.Try to pick a few lengths, and use those throughout Those typically use 2 bytes per character, but they're the only viable options if you need to support non-European languages and character sets.Īs for length: pick a reasonable value, but don't use varchar(67), varchar(91), varchar(55) and so forth - try to settle on a few "default" lengths, like varchar(20) (for things like a phone number or a zip code), varchar(50) for a first name, and maybe varchar(100) for a last name / city name etc. If you need to support Arabic, Hebrew, Japanese, Chinese, Korean or other Asian languages, then pick a Unicode string type to store those characters.


Inserting / Creating SQL Database Valuesįor names, should I use varchar / text / tinytext / blob? What is the typical name length? I think SQL and database design are different (but complementary) skills. Harrington and found it very clear and helpfulĪnd as you get up to speed this one was good too Database Systems: A Practical Approach to Design, Implementation and Management (International Computer Science Series) (Paperback) I started with this book: Relational Database Design Clearly Explained (The Morgan Kaufmann Series in Data Management Systems) (Paperback) by Jan L. A beginner's guide to SQL database design
