Single database naming style

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Arantir
Posts: 151
Joined: Wed Jan 04, 2012 7:10 pm

Single database naming style

Post by Arantir »

What about rework all column names in database, all to be in the same conventional style?
I propose a simple: all names have to be lowercase; words are separated with underscore.
Lowercase names are more compatible in general case.

There is a lot style blending, even in a single table... For example "created_time", "accessLevel", "lastIP", "pcIp" columns in accounts table. It's some salad of styles :D. Especially "lastIP" vs "pcIp"...
It really doesn't look pretty for me as for programmer.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Single database naming style

Post by jurchiks »

table names - lowercase with underscores
column names - lower camel case

That's the most used standard, not just in L2J.
I do agree that the column names should be changed to a single style, but not like table names.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Arantir
Posts: 151
Joined: Wed Jan 04, 2012 7:10 pm

Re: Single database naming style

Post by Arantir »

jurchiks wrote:That's the most used standard, not just in L2J.
I do agree that the column names should be changed to a single style, but not like table names.
I would agree for any style if it is just the same altogether through a database =)
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Single database naming style

Post by UnAfraid »

Yes i am agree but that's kinda time consuming task.
I don't think we have that much time now to perform such database update also there will be lots of typos.
By our side or by community's side (miss updated some change) and we'll create a lot of problems i think.
Image
Arantir
Posts: 151
Joined: Wed Jan 04, 2012 7:10 pm

Re: Single database naming style

Post by Arantir »

You could start with a little and do step by step =)

Sadly, but you're quite right about community's side. Simplest example is websites' registration scripts which, surely, use queries based on current db structure.
But, I think, those who can update their serves also should can change some other things, e.g. reg forms on site.
Not all updates are perfectly compatible with l2j-users' features =)

I hope you will keep in mind this good idea, to make l2j more gracefully, for a while... while there be a good chance for it.

Yeah, nothing hinders me to make a changes which I want on my sever. I just want also make something good for others too =)
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Single database naming style

Post by UnAfraid »

well changes like this one requires team decision, my isn't enough.
Image
Post Reply