如何设计物理问题数据库?
我有二十多年物理学博士资格考试的问题和解决方案,我希望这些问题和解决方案更容易访问、可搜索和有用。
Quals 上的问题分为几个不同的类别。第一类是本科或研究生问题。 (考试第一天为本科,第二天为研究生)。在这些类别中,有几个需要测试的科目:机械、电力和电气。磁学、统计力学、量子力学、数学方法和其他。其他识别特征:年份、季节和问题编号。
我对设计一个基于网络的数据库系统特别感兴趣,该系统可以以某种方式存储问题和解决方案以及所有识别信息,以便可以完成以下类型的操作。
- 搜索并返回所有电力和电力磁性问题。
- 搜索并返回所有研究生统计力学问题。
- 创建随机资格考试 - 意味着一个新的 20 个问题测试,从过去的资格考试(在某些有限的日期范围内)中随机挑选 2 个本科机械问题、2 个本科 E&M 问题等。
- 可以选择隐藏或显示结果中的解决方案。
任何有关如何最好地完成该项目的建议或意见将不胜感激!
I have both problems and solutions to over twenty years of physics PhD qualifying exams that I would like to make more accessible, searchable, and useful.
The problems on the Quals are organized into several different categories. The first category is Undergraduate or Graduate problems. (The first day of the exam is Undergraduate, the second day is Graduate). Within those categories there are several subjects that are tested: Mechanics, Electricity & Magnetism, Statistical Mechanics, Quantum Mechanics, Mathematical Methods, and Miscellaneous. Other identifying features: Year, Season, and Problem number.
I'm specifically interested in designing a web-based database system that can store the problem and solution and all the identifying pieces of information in some way so that the following types of actions could be done.
- Search and return all Electricity & Magnetism problems.
- Search and return all graduate Statistical Mechanics problems.
- Create a random qualifying exam — meaning a new 20 question test randomly picking 2 Undergrad mechanics problems, 2 Undergrade E&M problems, etc. from past qualifying exams (over some restricted date range).
- Have the option to hide or display the solutions on results.
Any suggestions or comments on how best to do this project would be greatly appreciated!
I've written up some more details here if you're interested.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于您的情况,似乎实现接口比数据存储更重要。要存储数据,您可以使用数据库表或标签。数据库(或标签)中的每条记录应具有以下属性:
直接查询数据库,你会得到一个数组,然后显示部分或全部问题。
要生成随机考试,您应该首先概述每个类别的问题数量及其抽取的年份。例如,如果您想要 2 UG EM 问题。查询数据库中的所有 UG EM 问题,然后对问题数组执行随机洗牌。最后,选择前两个并向学生显示该问题。继续其他类别,您将获得完整的随机试卷。
您的工作是确定是否希望学生看到答案。它应该仅由一个变量控制。
For your situation, it seems that it is more important part to implement the interface than the data storage. To store the data, you can use a database table or tags. Each record in the database (or tag) should have the following properties:
Directly query the database and you will get an array, then display some or all questions.
To generate a random exam, you should first outline the number of questions for each category and the years it drawn from. For example, if you want 2 UG EM question. Query the database for all UG EM questions and then perform a random shuffling on the question array. Finally, select the first two of them and display this question to student. Continue with the other categories and you will get a complete random exam paper.
It is your job to determine whether you want the students to see answer. It should be controlled by only one variable.
“电与磁”和“统计力学”是在同一维度上相互排斥的分类吗?您要搜索的类别中是否有多个维度?
如果两者的答案都是肯定的,那么我建议您研究多维数据建模。作为一名物理学家,在评估问题的维数时,您比大多数人更有优势。以多维方式分析现实是物理学家所做的事情之一。
有时获取和学习 MDDB 工具是多余的。一旦您研究了多维建模,您可能会决定喜欢该建模概念,但您仍然希望使用使用 SQL 接口的关系数据库来实现。
在这种情况下,接下来要研究的是星型模式设计。作为设计原则,星型模式与规范化有很大不同,并且它不提供相同的优点和限制。但在问题确实是多维问题的情况下,值得了解一下。
Are "Electricity & Magnetism" and "Statistical Mechanics" mutually exclusive categoriztions, along the same dimension? Are there multiple dimensions in categories you want to search for?
If the answer is yes to both, then I would suggest you look into multidimensional data modeling. As a physicist, you've got a leg up on most people when it comes to evaluating the number of dimensions to the problem. Analyzing reality in a multidimensional way is one of the things physicists do.
Sometimes obtaining and learning an MDDB tool is overkill. Once you've looked into multidimensional modeling, you may decide you like the modeling concept, but you still want to implement using relational databases that use the SQL interface.
In that case, the next thing to look into is star schema design. Star schema is quite different from normalization as a design principle, and it doesn't offer the same advantages and limitations. But it's worth knowing in the case where the problem is really a multidimensional one.