Linux Systems Administrator
Jupitermedia
US-AZ-Tucson

Justtechjobs.com Post A Job | Post A Resume

Best Practices: Sessions
It is the intention of this article to discuss and generate further debate surrounding best practices in developing database driven, session orientated dynamic websites and to present some adopted styles and conventions. The ideas and approaches that are developed here could be realised with almost any combination of server side scripting language and relational database.
Sessions and relational databases both offer the opportunity of storing information server side. Sessions can help to maintain state while you navigate an internet website and relational databases offer a medium for the permanent storage of information in a logical and consistent manner which allows for structured queries to be carried out against that stored information.
During the design process the dilemmas that are often encountered are deciding how information should be stored in a database and what information should be registered to the session.
What I would like to demonstrate now is a framework of cooperation between relational databases and sessions which is both aesthetically appealing as well as productive this will be done by examining features of a secure website.
First of all I would like to discuss in simple terms what it means for a table to be normalised. A table is considered normalised if information is organised logically without inconsistencies and there is minimal redundancy an example will help to demonstrate.
Consider the following simple normalised table called security, this table stores sensitive information and is queried against to gain authorisation to a secure website.
   username     password     access_level  screen_name   security_id


   rstallman     r5y8jv5f8      U            richard         1

   billgates     8yc2d42f5      X            bill            2

   linustorvalds h89x35f56      P            linus           3

Notice that this security table encapsulates all that is security related there is no redundancy, that is no unnecessary repetition and if you had to update a username or a password you have only to make a single change somewhere. This is normalisation.Also note that all records here in the security table have a unique identifier called security_id this in a important field called a "primary key".
[ Next Page ]


Comments:
RE: Don't get out of php modeFalk Koziol10/06/05 19:13
RE: "Orientated" is not a word.Vic Fryzel02/18/03 22:42
RE: "Orientated" is not a word.Ted Pennings02/08/03 22:48
what is phpbuilderGey11/03/02 11:06
RE: "Orientated" is not a word.TrueBrit10/29/02 07:06
tact.manar10/27/02 07:27
RE: "Orientated" is not a word.richard10/25/02 05:02
RE: "Orientated" IS a word in the UKKing_Dip_Shit10/17/02 15:22
RE: "Orientated" IS a word in the UKRod Tatham10/07/02 03:16
Enter in RAD, Ala CORBA or otherwise..Joe10/07/02 02:47
RE: "Orientated" is not a word.Matt Helmick10/04/02 19:24
RE: Don't get out of php moderickman10/04/02 14:23
RE: "Orientated" is not a word.John Adair10/03/02 01:07
Lets not hold a kangeroo court over a word.chris c10/02/02 05:59
Objects in a session?Eric09/17/02 01:20
RE: "Orientated" is not a word.Paul_C09/12/02 07:59
Don't get out of php modeMatteo Vaccari09/09/02 02:52
RE: "Orientated" is not a word.Peter Normann08/22/02 00:57
RE: "Orientated" is not a word.ffm08/21/02 23:37
RE: Password StorageHarry Fuecks08/21/02 18:38
Furthermore...Harry Fuecks08/21/02 18:19
This is NOT secure...Harry Fuecks08/21/02 17:59
RE: "Orientated" is not a word.paul08/20/02 12:25
RE: "Orientated" is not a word.Toby08/20/02 09:38
RE: "Orientated" is not a word.I Disagree08/16/02 22:46
RE: Password StorageRodney Johnson08/15/02 15:14
RE: Maintaining stateRodney Johnson08/15/02 14:30
RE: "Orientated" is not a word.David Boerwinkle08/13/02 14:12
RE: Password Storagejoe08/11/02 22:15
RE: Password StorageAuke van Slooten08/11/02 06:50
RE: "Orientated" is not a word.jaydee08/11/02 04:40
RE: Password Storagejaydee08/11/02 04:34
RE: Maintaining statepaulsbooker08/10/02 18:55
RE: Password StorageBDKR08/08/02 17:03
RE: Maintaining stateRodney Johnson08/06/02 04:43
RE: Session Variables OR repeated DB queriesRodney Johnson08/06/02 04:39
RE: "Orientated" is not a word.paulsbooker08/06/02 03:41
RE: "Orientated" is not a word.Mark08/05/02 19:28
RE: Session Variables OR repeated DB queriesSam Barnum08/05/02 18:48
RE: Session Variables OR repeated DB queriespaulsbooker08/05/02 12:17
RE: "Orientated" is not a word.Steve Eley08/05/02 09:59
RE: Maintaining statepaulsbooker08/02/02 17:25
Session Variables OR repeated DB queriesmbaweb08/02/02 17:07
RE: "Orientated" is not a word.paulsbooker08/02/02 13:55
RE: Encapsulate with objectpaulsbooker08/02/02 13:45
RE: Questions...paulsbooker08/02/02 13:36
RE: Password StorageUchendu08/01/02 17:19
RE: Error Handlingpaulsbooker08/01/02 05:06
RE: "Orientated" is not a word.paulsbooker08/01/02 03:00
Maintaining stateDavid Boerwinkle07/31/02 14:28
"Orientated" is not a word.Steve Eley07/31/02 14:28
just a typoshucker07/31/02 10:52
Password StorageWill Green07/30/02 18:33
Encapsulate with objectBryan Alsdorf07/30/02 12:43
Questions...Yuriy Horobey07/30/02 10:52
Error Handlingkyboshed07/30/02 07:44
PasswordsSebbi07/30/02 06:43
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.