RE: ASP Login Database to Online Form Registration



Sounds fine to me.

Until you mentioned the idea of many children for one username, I was ready
to ask why you even bothered with two separate tables. No reason you
couldn't use one table that is partly filled in by one page and partly by
another.

That *STILL* might be the right idea for data that is common for all
children. Example: parent's phone number, address, parent's age, etc.

So you *ONLY* put in the child-specific stuff to the CHILDREN table.

One minor thing: Commonly, we use an autonumber field as the primary key in
the PARENTS table. And then use integer field as foreign key in the CHILDREN
table. Reason: If somebody wants to change his/her username, you don't have
to change any records in the CHILDREN table. This is called "NORMALIZATION".

But for a small DB, it's not a big issue. Username works fine.

[My own preference is to use EMAIL as the username and then the autonumber
field as primary key. Since EMAIL is always unique, you won't have the
problem of two people trying to use the same username. But, again, this is
implementation detail, not affecting the concepts.]

Did that help or make things worse?


"Jason" wrote:

Hey. I'm just starting to learn ASP and I'm trying to figure out to do
things. What I want to do is have a Login page as well as a Create
Account page (both is ASP). The user would create an account (username
and password) which would be put into an Access databse. Then they can
Login, and would take them to a Registration Form page, if their user
info is validated against the database.

Once they've gotten to the form page, they'll need to fill out the
form, submit it, and that info would be put into the database as well
(same database, just different table). What I figured I could do is
have the Username as the primary key for both tables so that if a user
logs back in to make any changes, it could pull the info from the
table and fill in the fields they previously filled in so when they
submit it again, it would overwrite what they previously put it.

Now here's a tricky part. This is a student registration, so lets say
a parent wants to register several children each at different schools,
and use the same Username/Password, I was thinking of just having it
put a seperate entry into the 'registration' table with the same
Username. That way when we go to look these up when the parent comes
in to sign paperwork, we can pull up the info by the Username, since
there are probably going to be people with same name.

Any help would be appreciated. Thanks.
~ Jason

.



Relevant Pages

  • Re: updating all rows within same field that have same values from separate table
    ... both tables have a field for username. ... it would have a foreign key field containing the primary key ... Some database systems do not provide a Cascade Update ...
    (microsoft.public.access.formscoding)
  • Re: E-mail server, minimalist approach
    ... > CREATE DATABASE IF NOT EXISTS database; ... PRIMARY KEY, ... mailboxes intNOT NULL default '0', ... username varcharNOT NULL default '', ...
    (freebsd-questions)
  • Re: how to get users details
    ... Well Im using email address instead of username for a few reasons, ... is already the memid field there. ... UserID, at least for login purposes, rather than as a separate entity ... ... usually it is not a good idea to have something like that (primary key ...
    (microsoft.public.dotnet.framework.aspnet)
  • Managing virtual e-mails
    ... I am running the Postfix+Courier on MySQL setup found on: ... and deleting aliases -- and managing my virtual e-mail database ... username varcharNOT NULL default '', ... PRIMARY KEY, ...
    (freebsd-questions)
  • Postfix: unable to deliver this message after 4 days
    ... CREATE TABLE IF NOT EXISTS alias ( ... goto text NOT NULL, ... PRIMARY KEY, ... username varcharNOT NULL default '', ...
    (freebsd-questions)

Loading