简体   繁体   English

SQL中的分区和空值

[英]Partitioning and nulls in sql

I am working on mysql(wampserver) and i have made a simple database. 我在mysql(wampserver)上工作,我做了一个简单的数据库。 i am writing a paper about nulls in databases and how to handle them,manage them. 我正在写一篇有关数据库中的空值以及如何处理,管理它们的论文。 i have been working with all these functions ISNULL(IFNULL for mysql), COALESCE() etc, or replacing the "missing information" with unknown X and other ways. 我一直在使用所有这些函数ISNULL(对于mysql为IFNULL),COALESCE()等,或使用未知的X和其他方式替换“缺少的信息”。 and i was wondering if partitioning helps. 我想知道分区是否有帮助。 for example if i have NULLS in an order number(attribute) then if i move those tuples from my main table(customers) to another one(customers_1) will it help? 例如,如果我在订单号(属性)中有NULLS,那么如果我将这些元组从主表(客户)移动到另一个表(客户_1),会有所帮助吗? i will have all my tuples with NULL in order number to the new table, and i think it will be easier to manage them, or even improve my database? 我会将所有带元组的元组的顺序号添加到新表中,我认为管理它们甚至更完善我的数据库会更容易?

And another thing. 还有一件事。 is there any special way in relational algebra to manage nulls that are created from an outer join? 关系代数中是否有任何特殊的方法来管理由外部联接创建的空值?

Thanks in advance 提前致谢

You can filter Nulls in the where clause. 您可以在where子句中过滤Null。 Eg: 例如:

  Where ColName IS NOT NULL

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM