# Data Model
Seafile internally uses a data model similar to GIT's. It consists of `Repo`, `Branch`, `Commit`, `FS`, and `Block`.
### Repo
A repo is also called a library. Every repo has an unique id (UUID), and attributes like description, creator, password.
### Branch
Unlike git, only two predefined branches is used, i.e., `local` and `master`.
In PC client, modifications will first be committed to the `local` branch.Then the `master` branch is downloaded from server, and merged into `local` branch.After that the `local` branch will be uploaded to server. Then the server will fast-forwardits `master` branch to the head commit of the just uploaded branch.
When users update a repo on the web, modifications will first be committed to temporary branchon the server, then merged into the `master` branch.
### Commit
Like in GIT.
### FS
There are two types of FS objects, `SeafDir Object` and `Seafile Object`.`SeafDir Object` represents a directory, and `Seafile Object` represents a file.
### Block
A file is further divided into blocks with variable lengths. We use Content Defined Chunking algorithm todivide file into blocks. A clear overview of this algorithm can be found at [http://pdos.csail.mit.edu/papers/lbfs:sosp01/lbfs.pdf](http://pdos.csail.mit.edu/papers/lbfs:sosp01/lbfs.pdf).On average, a block's size is around 1MB.
This mechanism makes it possible to deduplicate data between different versions of frequently updated files,improving storage efficiency. It also enables transferring data to/from multiple servers in parallel.
- 介紹
- 概览
- Seafile 组件
- 研发路线图
- 常见问题解答
- 修改日志
- 我要参与
- Linux 下部署 Seafile 服务器
- 部署 Seafile 服务器(使用 SQLite)
- 部署 Seafile 服务器(使用 MySQL)
- Nginx 下配置 Seahub
- Nginx 下启用 Https
- Apache 下配置 Seahub
- Apache 下启用 Https
- Seafile LDAP 配置
- 开机启动 Seafile
- 防火墙设置
- Logrotate 管理系统日志
- 使用 Memcached
- 使用 NAT
- 非根域名下部署 Seahub
- 从 SQLite 迁移至 MySQL
- 安装常见问题
- 升级
- Windows 下部署 Seafile 服务器
- 下载安装 Windows 版 Seafile 服务器
- 安装 Seafile 为 Windows 服务
- 所用端口说明
- 升级
- 从 Windows 迁移到 Linux
- 垃圾回收
- 部署 Seafile 专业版服务器
- 下载安装 Seafile 专业版服务器
- 从社区版迁移至专业版
- 升级
- Amazon S3 下安装
- OpenStackSwift 下安装
- Ceph 下安装
- 配置选项
- 文件搜索说明
- 集群部署
- 集群中启用搜索和后台服务
- NFS 下集群安装
- 常见问题解答
- 软件许可协议
- 服务器个性化配置
- ccnet.conf
- seafile.conf
- seahub_settings.py
- 发送邮件提醒
- 个性化邮件提醒
- 用户管理
- 存储容量与文件上传/下载大小限制
- 自定义 Web
- 管理员手册
- 账户管理
- 日志
- 备份与恢复
- Seafile FSCK
- Seafile GC
- WebDAV 和 FUSE 扩展
- WebDAV 扩展
- FUSE 扩展
- 安全选项
- 安全特性
- 日志和审计
- 开发文档
- 编译 Seafile
- Linux
- Windows
- Max OS X
- Server
- 开发环境
- 编程规范
- Web API
- Python API
- 数据模型
- 服务器组件
- 同步算法