Giter VIP home page Giter VIP logo

arcaea-offline's Issues

数据库结构重构

原本的数据库对象,包括表架构(抄来的)、数据库类 arcaea_offline.database.Database,都是赶工出来的,架构很烂。

目前的设想是,数据库结构更改:

CREATE DATABASE songs (id, title, artist, ...)  -- 从 songlist 提取,包含标题、曲师等信息
CREATE DATABASE charts_info (song_id, rating_class, constant, ...)  -- 谱面定数等计算 PTT 用信息
CREATE VIEW charts (song_id, rating_class, ...)  -- 上面两张表的合并

CREATE DATABASE score (id AUTOINCREMENT, score NOT NULL, time, pure, far, lost, ...)  -- 存储成绩,除必要的分数外其他项可为 NULL
CREATE VIEW calculated (id, score, pure, far, lost, ..., potential, shiny_pure, ...)  -- 每个成绩经过计算得到的单曲 PTT 等

CREATE DATABASE r30 (*calculated)  -- r30 队列,按 score.time 刷新
CREATE VIEW bests (*calculated)  -- 从 calculated 中自动计算
CREATE VIEW final_potential (ptt, b30, r10)  -- 最后计算得出的最终 PTT

同时,不再提供单例 Database 类,改用 get_conn() 获取数据库对象,或者用 SQLAlchemy/peewee 进行数据库操作?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.