神刀安全网

SQLite schema boilerplate for user accounts, roles, logins and auth tokens

Membership Database Schema for SQLite

System Requirements

Naming Conventions

  • Singular UpperCamelCase for tables. E.g. UserLogin
  • Singular lowerCamelCase for columns. E.g. phoneNumber
  • Always try to use names that make sense and are descriptive of their purpose
  • Single column primary key fields should be named id
  • Use the following pattern for constraints and indexes: {tablename}_{prefix}_{columnname(s)} where the prefix is one of the following:
    • pk for a Primary Key constraint
    • uk for a Unique constraint
    • ix for any other kind of index
    • fk for a Foreign Key constraint
    • ck for a Check constraint

References

SQLite schema boilerplate for user accounts, roles, logins and auth tokens

SQLite Database System Design and Implementation , 2nd Edition

by Sibsankar Haldar, Self-published (2016)

This book provides a comprehensive description of SQLite database system. It describes design principles, engineering trade-offs, implementation issues, and operations of SQLite.

License

Copyright © 2016 Membership Database contributors. This source code is licensed under the MIT license found in theLICENSE.txt file. The documentation to the project is licensed under the CC BY-SA 4.0 license.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » SQLite schema boilerplate for user accounts, roles, logins and auth tokens

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址