登录表设计 [英] Table design for Login

查看:60
本文介绍了登录表设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#.net创建Windows窗体的登录页面.与往常一样,两个标签是两个用于输入用户名和密码的文本框.两个按钮用于登录和取消
完成设计级别后,我想在数据库中为此登录创建一个表,我应该在该表中为Login函数(例如用户名,密码,角色等)包括哪些基本字段

I''m creating a login page in windows form using C#.net. As usual two labels, two textboxes for username and password. two buttons for login and cancel
Have done with design level, I want to create a table in database for this login, what are the basic field I should include in that table for the Login function like username,password, roles,etc

推荐答案

应用程序通常会有所不同,但这是我在UserInfo表上放置的内容.
Applications usually vary but here is what I am putting on my UserInfo table.
UserID
UserName
EmailAddress
Password -- this should be at least hashed on the application side
RoleID -- a foreign key to the roles table
FirstName
LastName
DateOfBirth
...etc



在某些情况下,您想将用户信息分隔到另一个表,将用户名和密码分隔到另一个表.



There might be instances where you want to separate the user info to another table and your username and password to another table.


这篇关于登录表设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆