- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试找出一种有效的结构来在 Firestore 中存储学术时间表。
我需要解决的问题:
这是我现在的结构:
courses
- course_id: string
- duration: number (weeks, eg: 24)
- end_time: number (timestamp of the last course day)
- start_time: number (timestamp of the first course day)
- name: string
modules
- module_id: string
- lectures: array
- lecture_id
- name: string
- code: string
- no_students: number
classes
- class_id: string;
- start_time: string (eg: 10:00)
- end_time: string (eg: 11:00)
- weekday: string (eg: Monday)
- module: map (a copy of module object to reduce reads)
- start_week: number
- end_week: number
timetables
- timetable_id: string
- classes: array
- class_id
- duration: number (duration in weeks, eg: 11)
- semester: number
- week: string (current week, eg: 4)
users
...
- timetable_id: string
一个单独的类(class)集合将允许更容易查询以与出勤集合进行比较。
要读取时间表,我获取用户文档,然后获取时间表文档,然后使用 firestore.getAll()
获取类。这会导致大量文档读取。
要更新本周,我需要更新每个时间表文档。
解决这个问题的更好方法是什么?
感谢您的宝贵时间和帮助。
最佳答案
最好在 Firestore 的不同文档中重复重要数据。
假设戴安娜想通过电话阅读她的时间表,她的时间表有 4 门类(class)、3 个模块、10 节课。将所有这些详细信息放在一个文档中,因此当她想在应用程序屏幕上查看她的时间表时,该应用程序会读取一个文档来完成她的时间表。每个学生都会有自己的时间表文件
关于database - Firestore : Academic Timetable Structure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54632534/
我正在尝试找出一种有效的结构来在 Firestore 中存储学术时间表。 我需要解决的问题: 每门类(class)都有自己的开始和结束时间 每门类(class)都有自己的周数 每门类(class)有许
我关注这个example 创建示例时间表py文件,并将其放入$Home/airflow/plugins 创建示例 dag 文件,并将其放在 $Home/airflow/dags 中 重启调度器和网络服
我正在尝试将这个不错的 javascript 插件实现到 Angular6 项目中: Timetable.js/on Github 寻找一种方法来做到这一点,我遇到了这个: How to use Ti
在ionic2项目中是否可以使用timetable.js? http://timetablejs.org/ 我尝试创建如下的 timetable.d.ts。 declare class Timetab
关闭。这个问题是opinion-based .它目前不接受答案。 想改进这个问题?更新问题,以便 editing this post 提供事实和引用来回答它. 8年前关闭。 Improve this
Here's a problem . 在解决问题之前,我不了解问题本身。具体来说:每当火车应该离开 A 或 B 时,实际上必须有一辆火车准备出发。它是什么样子的?你能给我举个例子吗?谢谢。 问题 一条
我正在为一家 vert 诊所创建一个数据库。 我在 Microsoft SQL Server Management studio 2014 中有一个 SQL 表,其关系模型(模式)如下:Schedul
我是一名优秀的程序员,十分优秀!