数据库杂谈之:如何优雅的进行表结构设计

作者:仁风H
链接:https://zhuanlan.zhihu.com/p/20785905
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。本文首发于知乎专栏,转载请注明出处 zhuanlan.zhihu.com/p/20数据库表结构设计作为后端软件开发不可或缺的一环,是每个后端工程师都会经历的过程。笔者也多次经历过这样的过程,也尝试过多种不同的设计方案,也从一些优秀的框架中学到不少,但并没有发现相关的文章对其进行总结。所以本文尝试把笔者看到的、学到的总结下来,希望对阅读本文的读者有所启发。 继续阅读

A beginner’s guide to Big O notation

(原文:https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/

Big O notation is used in Computer Science to describe the performance or complexity of an algorithm. Big O specifically describes the worst-case scenario, and can be used to describe the execution time required or the space used (e.g. in memory or on disk) by an algorithm.

继续阅读

How does a relational database work

(原文:http://coding-geek.com/how-databases-work/

When it comes to relational databases, I can’t help thinking that something is missing. They’re used everywhere. There are many different databases: from the small and useful SQLite to the powerful Teradata. But, there are only a few articles that explain how a database works. You can google by yourself “how does a relational database work” to see how few results there are. Moreover, those articles are short.  Now, if you look for the last trendy technologies (Big Data, NoSQL or JavaScript), you’ll find more in-depth articles explaining how they work. 继续阅读

14 Essential PHP Interview Questions(14个重要的PHP面试问题)

(原文:https://www.toptal.com/php/interview-questions

Question1

Consider the following code:

$str1 = 'yabadabadoo';
$str2 = 'yaba';
if (strpos($str1,$str2)) {
    echo "\"" . $str1 . "\" contains \"" . $str2 . "\"";
} else {
    echo "\"" . $str1 . "\" does not contain \"" . $str2 . "\"";
}

The output will be:

"yabadabadoo" does not contain "yaba"

Why? How can this code be fixed to work correctly? 继续阅读