1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ORMとは何かシンプルに説明する

1
Posted at

1. ORMとは何か?

プログラムのオブジェクトとリレーショナルデータベース(RDB)のテーブルを対応付けることで、データベースのレコードをオブジェクトとして扱えるようにするツール

2. この仕組みの何がいいのか?

SQLを書く代わりに、オブジェクト指向のコードでデータベースを操作できるようになる

3. 具体的に何をしているのいか?

以下のようにオブジェクトとデータベースを紐づけている

オブジェクト指向 リレーショナルDB
クラス (Class) テーブル (Table)
フィールド / プロパティ (Object Field) カラム (Column)
インスタンス (Instance) レコード / 行 (Row)

例:
オブジェクトが ↓ なら、

class User {
id: integer
name: string
email: string
}

usersテーブルには ↓ と紐づけられる

id name email
1 一郎 ichiro@example.com
2 二郎 jiro@example.com

4. 参考

より詳細な解説はこちら

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?