论文部分内容阅读
在Web应用程序的开发过程中,常常需要在同一个界面内实现对多个数据表的访问,而这些表之间往往存在着主、从关系。这种主从复合结构(Master/Detail)是基于“一对多(1:n)”的关系,在一个数据库表中提供详细的信息,而这个表是通过另一个数据库表的外键FK(Foreign Key)访问相关记录的。基于主从复合结构,我们可以在浏览一个表中的数据时,同时给出另一个表中与这个记录相关的所有记录信息。文章详细介绍了一个在基于三层架构的Web应用程序中实现主从表的实例。
In the development process of Web applications, often need to achieve the same interface to access multiple data tables, and these tables often exist between the main and the relationship. This master / detail structure is based on a “one-to-many (1: n)” relationship that provides detailed information in a database table that is accessed through a foreign key of another database table FK (Foreign Key) access to relevant records. Based on the master-detail structure, we can browse the data in a table and give all the records in the other table related to this record at the same time. The article details an example of implementing a master-slave table in a three-tier architecture based web application.