Mark Hershberg

Greenhorn
+ Follow
since Nov 14, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mark Hershberg

Hello,
I'm developing a web based database driven application.
In my database tables, I have an integer column for primary key.
Currently, I'm using the auto update of the mysql for the updating of primary key, whenever a new record is created.
In some example applications that I have read, they do this manually. i.e. retrieve the value of last primary key using the max(x) function and then add 1 to it as the new primary key for the new record.

What I want to know, is which method is better to use? what are the pitfalls of using one method over the other?

Another question is that when using the auto update feature, does the first record always start with 1? or can I give it a startign value?

Your responses are greatly appreciated.
When Using MVC design pattern where a controller servlet is the center of all the requests and responces, won't this make the servlet a big java class file with lots of if-else statements? or a huge switch-case block?

Is this quite normal for the controller servlet? or are there any workarounds for this?

Your help is appreciated.
Hi
Just wanted to know if anyone here has designed a commercial real life database which (part of it) is to do with storing usernames and password and other personal information.

Do you keep all the data in the same table? i.e.
UserID(P.K) username, password, email, firstname, lastname, city, etc... in just one table or do you separate the details into more tables, such as
table 1 will hold UserID, username and password only and the rest of the personal details in another table with a reference to the first table.

My question is not only for design issue, but also taking into account any security issues for one design or the other.