Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Okay to naming database with dots

Status
Not open for further replies.

aspnetvbnetnerd

Programmer
Feb 3, 2008
31
0
0
SE
Is it okay to naming database with dots.
Like Retail.Dev.Solution or is it bad to naming database with dots?
 
I would avoid it. Use _ (underscore) instead.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
I thought the namespace of the application should match the database name.
 
I'm not an expert by any means. I just know that in my experiences, when you break apart a database name with spaces or dots, it gets a little messy. It also can effect database migrations depending on what the other system is. The name of your application should have no baring on the name of your database. In fact, you do not want to "hard code" your database to your application. Say your database crashes and you have to use your backup database. You want to have to recompile for something like that? no. You'll be too busy trying to get your primary back to worry about a recompile. Database names should be as dynamic as other variables. I have an application that hits 4 different databases depending on the user's selection.

Remember. I'm not an expert, and would welcome any other thoughts on the subject.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
For what it's worth, I agree with ousoonerjoe.

Why make things harder on yourself (having to worry about using brackets all the time).

For example....

[tt][blue]Create Database [a.b.c.d.e][/blue][/tt]

or....

[tt][blue]Create Database [Database][/blue][/tt]

With the brackets, each of those commands will execute and a database will be created. Without the brackets, both of them will fail.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Sure you can, if you want to make your life miserable :)

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
#1 reason NOT to do it. The naming convention is to separate the different parts by dots.

Server.database.owner.table

Using dots as part of the database name can really mess your query up.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
This is something I would avoid at all costs. It is always a bad idea to use reserved words and to have something that mimics the way SQL Server referes to the database structure itself is just plain silly. Unless you like getting errors that the server or database refered to does not exist or that you have too many dots in your reference. As there is no particular good reason to name tables or databases this way, it would be very bad to do so. Use Underscore or capitalization instead. Then you won't have query issues and you can still see the individual words. And from the sample I saw you give, you aren;t planing to have differnt database names depending on whethre is it dev or production are you? That would be an extremely bad idea, making migration of new code a nightmare.

"NOTHING is more important in a database than integrity." ESquared
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top