摘要
网站设计中数据库查询是非常关键的技术,好的查询方法可以大大地节省开销。数据库越庞大,要求查询效率越高。文章以Django开发为背景,对ORM模型数据查询做了一些验证性研究。阐述了数据库中相关联表(如:一对多关系与多对多关系等)数据查询的优化方法,编写了视图函数和URL映射进行测试,并对结果数据做了比较与分析。贯穿全文,是一个完整的Django数据查询项目。
Data query is an essential utility in website design. A well-constructed data query method can lead to significant cost reductions. The requirement for data query efficiency also grows with the size of the database. This article conducted a series of confir. matory research on ORM model data query using Django. It also described the optimization of data query for associated table within a database (i.e. Many-to-one relationship, Many-to-many relationship, etc.). The author used Django view and URL mapping for testing, compared and analyzed the output. In summary, this illustrates a complete Django data query project.
作者
郭显娥
GUO Xian-e(School of Computer and Network Engineering, Shanxi Datong University, Datong Shanxi, 037009)
出处
《山西大同大学学报(自然科学版)》
2019年第3期27-31,36,共6页
Journal of Shanxi Datong University(Natural Science Edition)