Flat files are obvious why they are poor choice for anything other than basic AUTH.
But what about LDAP vs DB, etc...
What do you prefer, think is best and why?
Cheers
Moderator: General Moderators
I've always used database as well, but it just doesn't seem to fit the bill very well once you get past authentication...feyd wrote:I prefer supporting as many different systems as reasonably possible. Although I have yet to work with LDAP in PHP, I have worked a bit with it in other languages. It's okay. I usually set up database first because I always have a database on hand when doing web stuff, overall. Besides, if database authentication is working, so is the database class.
Why? Any hierarchial system is really a list of nodes with relative or absolute location information about each node.Hockey wrote:Storing hiearchial(sp) data of any kind in a RDBMS database just feels wrong
Abstraction dude...I agree at the lowest level, everything in a computer is represented as linear data as ram is nothing more than an array of bytes, but we don't program in assembler anymore do we?arborint wrote:Why? Any hierarchial system is really a list of nodes with relative or absolute location information about each node.Hockey wrote:Storing hiearchial(sp) data of any kind in a RDBMS database just feels wrong
It is not just the run-time aspect of the choice, it is the ability to build administrative tools to manage the data.
Abstraction is done in the interface, not necessarily in the data store. Hierarchical storage systems often have a flat data store, just a DBMSs often do. And Object databases are not necessarily hierarchical, they just store objects in a convenient way.Hockey wrote:Abstraction dude...I agree at the lowest level, everything in a computer is represented as linear data as ram is nothing more than an array of bytes, but we don't program in assembler anymore do we?
Abstraction can and should be provided at every level...arborint wrote:Abstraction is done in the interface, not necessarily in the data store. Hierarchical storage systems often have a flat data store, just a DBMSs often do. And Object databases are not necessarily hierarchical, they just store objects in a convenient way.Hockey wrote:Abstraction dude...I agree at the lowest level, everything in a computer is represented as linear data as ram is nothing more than an array of bytes, but we don't program in assembler anymore do we?
I guess it depends on how you store your users...Roja wrote:I'm curious how you are defining authentication and authorization. More specifically, what do you think the hierarchy is in that data?Hockey wrote:Storing hiearchial(sp) data of any kind in a RDBMS database just feels wrong
Code: Select all
user, pass, perms <- [b]perms[/b] could be simple bit settings...Code: Select all
<group name="admin">
<rights>
<action1>TRUE</action1>
</rights>
<user id="1">
<user>Joe</user>
<pass>Schmoe</pass>
</user>
</group>I would agree. You are choosing to give users attributes that have a hierarchy. You can do so, but you don't have to. (In many cases, it is beneficial not to do so).Hockey wrote:I guess it depends on how you store your users...Roja wrote:I'm curious how you are defining authentication and authorization. More specifically, what do you think the hierarchy is in that data?Hockey wrote:Storing hiearchial(sp) data of any kind in a RDBMS database just feels wrong
Here, you are giving permissions to a *user*, when in reality, it is more likely that they have *roles*.Hockey wrote: 1) Users can be linear and have an associated groupid field which indicates which authorization class/group they belong too or you can hardcode permission bits in a single field inside the user data as well.
Code: Select all
user, pass, perms <- [b]perms[/b] could be simple bit settings...