德尔福15326654_德尔福ORM

德尔福15326654

Working with database data in Delphi can be really simple. Drop a TQuery on a form, set the SQL property, set Active and there's your database data in a DBGrid. (You do also need a TDataSource and a connection to a database.)

在Delphi中使用数据库数据非常简单。 在窗体上放置一个TQuery,设置SQL属性,设置为Active,然后将数据库数据存储在DBGrid中 。 (您还需要一个TDataSource和一个数据库连接。)

Next, you'll want to insert, update and delete data, and introduce new tables. That's also easy but can get messy. It can take some finagling the correct SQL syntax before you can lay it out correctly. What is supposedly a simple task becomes slightly cumbersome.

接下来,您将要插入,更新和删除数据,并引入新表。 这也很容易,但是会变得凌乱。 在正确布局之前,可能需要对正确的SQL语法进行一些整理。 所谓的简单任务变得有些繁琐。

Can all this be done relatively easily? The answer is yes—as long as you use an ORM (Object Relational Mapper).

所有这些都可以相对容易地完成吗? 答案是肯定的,只要您使用ORM (对象关系映射器)即可。

hcOPF:Delphi的ORM ( hcOPF: an ORM for Delphi )

This Open Source Value Type Framework provides a base class (ThcObject) composed of attribute objects that can be automatically persisted to an object store (normally an RDBMS). An object persistence framework is essentially a library of pre-written code that takes care of the details of persisting or permanently storing an object. The object may be persisted to a text file, XML file etc., but in the business world it will most likely be to an RDBMS and for this reason, they are sometimes referred to as an ORM (Object Relational Mapper).

此开放式源值类型框架提供了一个基类(ThcObject),该基类由属性对象组成,可以自动保存到对象存储(通常是RDBMS)中。 对象持久性框架本质上是一个预先编写的代码库,用于处理持久存储或永久存储对象的细节。 该对象可以保存到文本文件 ,XML文件等中,但是在商业环境中,它很可能保存在RDBMS中,因此,有时将它们称为ORM(对象关系映射器)。

对象 ( DObject )

A macrobject DObject suite is an O/R Mapping component package to be used in Delphi. DObject O/R Mapping suite allows you to access database completely in the way of object-oriented. It includes OQL. Delphi, which is a strong-typed OQL (Object Query Language) based on native Delphi language, even you needn't write a single line of SQL statement based on the string.

宏对象DObject套件是要在Delphi中使用的O / R映射组件包。 DObject O / R映射套件允许您以面向对象的方式完全访问数据库。 它包括OQL。 Delphi是一种基于本机Delphi语言的强类型OQL(对象查询语言),即使您不必基于该字符串编写一行SQL语句。

SQLite3框架 ( SQLite3 Framework )

The Synopse SQLite3 database Framework interfaces the SQlite3 database engine into pure Delphi code: database access, User Interface generation, security, i18n, and reporting are handled in a safe and fast Client/Server AJAX/RESTful model.

Synopse SQLite3数据库框架将SQlite3数据库引擎连接到纯Delphi代码中 :数据库访问,用户界面生成,安全性,i18n和报告均以安全,快速的客户端/服务器AJAX / RESTful模型处理。

OP ( tiOPF )

The tiOPF is an Open Source framework for Delphi that simplifies the mapping of an object oriented business model into a relational database.

tiOPF是Delphi的一个开源框架,简化了面向对象的商业模型到关系数据库的映射。

TMS奥雷留斯 ( TMS Aurelius )

ORM framework for Delphi with full support for data manipulation, complex and advanced queries, inheritance, polymorphism, and more. Supported databases: Firebird, Interbase, Microsoft SQL Server, MySQL, NexusDB, Oracle, SQLite, PostgreSQL, DB2.

用于Delphi的ORM框架全面支持数据处理,复杂和高级查询,继承,多态等。 支持的数据库:Firebird,Interbase,Microsoft SQL Server,MySQL,NexusDB,Oracle,SQLite,PostgreSQL,DB2。

翻译自: https://www.thoughtco.com/orm-for-delphi-1058346

德尔福15326654

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值