Showing posts with label company. Show all posts
Showing posts with label company. Show all posts

Saturday, February 25, 2012

Aspx fashion tip... ;)

Hi!

Im building a site for internal use for a company i work at.
And im having hard to decide what to do. The alternatives are

comma separated lists vs separate tables.

For example.. I will use a number of different type of objekt that all will hold 1 or more document links, phone numbers, emails etc

As far as i can i i have 2 possibilitys. One is to add textfields for each of these subojects in each objects tables. Then i add all info as commaseparrated lists in 2-3 layers wich i then save in the respecive objects fields.
(Look like something below for example )
,comment'emailadress,comment'emailadress,

Or i add 1 table for each subobject type wich manage the subobjects or link between different objects
for example:
table layout for email:
id | parent_type | parent_id | comment | email

Or for example contacts a mediator table:
id | parent_type | parent_id | contact_id

Hope you understand what i mean, would really appriechiate suggestions, comments regarding what can be considered as "best practise" in these cases. Putting it in separate tables should make searches easier, and coding easier in my book. But again im thinking if perhaps commalists is a faster and more recource conservative way of doing it + to me it feels like (perhaps i have no reason to think this?) making tables for items like feels like a timebomb if you exhaust your idfields identity count. Though this app will be used by perhaps 100ppl at most so perhaps not an extremely utilized webapp.

Anyway glad if you could give me some input!

I prefer seperate tables, as this gives clearer description of data structure/relationship, and it is much easier to manipulate the data in seperate tables.|||

Yeah well separate tables sure is the easiest way to get around it considering searches, changes when built etc.

Practically for me it will mean perhaps 3-5 querys in one page instead 1-2. So that is the main drawback i guess wich perhaps wont inflict to much.

Anyway my main concern was if there was anything that motivated commalists or its just a small gain for quite a bit more work in creating/changing.

|||

"if you exhaust your idfields identity count"? If you were inserting a new record once every second non-stop, it'd take over 68 years to exceed the limits of an int. And when you get there, consider upgrading to SQL Server 2050 which solves that problem automatically for you. But if you think there is the possability that your app will need to run for 68+ years without a change, or if your think you'll need to insert more than 86,000 rows per day, then you might consider a bigint.

|||

Yeah did som calculations and came to the same conclusion ;)

Anyway think i will go for tables, for convineance sake.

Friday, February 24, 2012

ASPNETDB

In response to a problem I have, my web hosting company asked me to rename aspnetdb.mdf. When I ask why, I was given this response

...it is because SQLexpless is developed for single database. If there is a same db name in the server, it cannot attach to the server. In order to prevent conflict, so that you need to change the SQLexpress's dbname into others to prevent conflict with others db name...

Does this make sense?

I think there is some confusion here in terminology.

You should store data for your application database, with a name for you, you should not store your tables, views, sp etc in the aspnetdb database, I believe that Db is reserved for use by ASP.Net itself, hence there is only one per server. SQL Express can host ltos of DBs but only one of each name.

ASPNET security on my sql server

Dear all

I had a problem connecting to my website (through lan) from other machines in the company here.

I googled some and figured out that I have to change the security settings of aspnet in my sql server express 2005.

I did as suggested and now its working

My question is - what should be the real security settings for aspnet on my sql server ?

Should I really add it to the sysadmin ? (what solved the problem...)

Guy

Security settings depend on your environment. They should by design be the least permissions that allow access, but in your case it would mean configuring a new account just for this purpose and you'd likely not add any additional security in an intranet environment.

Jeff

|||

Hi

Thanks for the reply

I am talking about the real world not the lan

I had the problem on lan and that led me to the question :)

Please tell me what should I do on an Internet case

Guy

|||It still depends on what the website needs to do with SQL Server. What was the problem with the SQL Server connection before you add IIS account (or other account?) to sysadmin role of SQL Server?