Re: [sqlite] Criteria to define two fields as Primary Key or Unique

2018-06-18 Thread Markos
Many thanks Simon, Keith and Richard for your attention and didactic explanations. Em 17-06-2018 14:37, Keith Medcalf escreveu: Also note that you probably want your application to store the password as a salted-hash, and not as a plain-text password. Otherwise someone could look up the

Re: [sqlite] Criteria to define two fields as Primary Key or Unique

2018-06-17 Thread Richard Damon
On 6/17/18 12:55 PM, Markos wrote: > Good Morning, > > I am a beginner in database and I'm developing a Database (with > Tcl/Tk) to control the loans of books in a reading room. > > Some users will have administrator privileges (to make loans, register > other users etc). > > I am creating a table

Re: [sqlite] Criteria to define two fields as Primary Key or Unique

2018-06-17 Thread Keith Medcalf
Also note that you probably want your application to store the password as a salted-hash, and not as a plain-text password. Otherwise someone could look up the passwords with a text editor ... --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about

Re: [sqlite] Criteria to define two fields as Primary Key or Unique

2018-06-17 Thread Simon Slavin
On 17 Jun 2018, at 5:55pm, Markos wrote: > I want to avoid two administrators (admin_user) with the same login but for > this I am in doubt if I put the two fields as primary key or as unique: Your ideas both have different advantages, but are not the normal way to do things. Try this

[sqlite] Criteria to define two fields as Primary Key or Unique

2018-06-17 Thread Markos
Good Morning, I am a beginner in database and I'm developing a Database (with Tcl/Tk) to control the loans of books in a reading room. Some users will have administrator privileges (to make loans, register other users etc). I am creating a table to store login and password to be used in