OO程序和SQL数据库 [英] OO program and SQL database
本文介绍了OO程序和SQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在使用 SQL 数据库后端编写 OO 程序时,对象的属性是否与表中的行相对应?或者不止于此?我不太明白对象的属性如何与表中的数据相关.感谢您的帮助.
When programming an OO program using a SQL database back-end, do objects' attributes correspond with the rows in the tables? Or more than that? I don't quite understand how objects' attributes relate to data in tables. Thanks for your help.
推荐答案
这实际上取决于您使用的是哪种 orm,但是,通常的想法是:
It really depends which orm you are using, however, in general the idea is:
class = > table
instance => row
attribute => column
这篇关于OO程序和SQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文