Click here to Skip to main content
15,899,314 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL server in to XML Pin
N a v a n e e t h13-Feb-07 21:42
N a v a n e e t h13-Feb-07 21:42 
GeneralRe: SQL server in to XML Pin
indian14322-Feb-07 21:01
indian14322-Feb-07 21:01 
Questionrelatioships & datasets? [sqlservr 2005 , C# 05] Pin
giddy_guitarist13-Feb-07 19:32
giddy_guitarist13-Feb-07 19:32 
AnswerRe: relatioships & datasets? [sqlservr 2005 , C# 05] Pin
Colin Angus Mackay13-Feb-07 19:38
Colin Angus Mackay13-Feb-07 19:38 
GeneralRe: relatioships & datasets? [sqlservr 2005 , C# 05] Pin
giddy_guitarist13-Feb-07 20:03
giddy_guitarist13-Feb-07 20:03 
GeneralRe: relatioships & datasets? [sqlservr 2005 , C# 05] Pin
Colin Angus Mackay13-Feb-07 21:55
Colin Angus Mackay13-Feb-07 21:55 
Generalsome newbie questions:[sqlservr 2005 , C# 05] Pin
giddy_guitarist16-Feb-07 4:32
giddy_guitarist16-Feb-07 4:32 
GeneralRe: some newbie questions:[sqlservr 2005 , C# 05] Pin
Colin Angus Mackay16-Feb-07 6:47
Colin Angus Mackay16-Feb-07 6:47 
giddy_guitarist wrote:
1. Theres a good load because sometimes i need data often and this queries the DB and causes some slightly noticeable lag. Thats why i had the Dataset in mind. 50% of the time , i dont need *live* data. I realized i cant have a method that returns an SqlDataReader without a global open connection.So how do i cache raw?


I'd recommend creating a business layer that has your business objects in it. This separates the database from the user interface (which is regarded as best practice). However, that is quite a complex thing to explain in a forum post. You might want to do a search of "Design Patterns" to get an idea of some of the things you can do. Martin Fowler has a good reference guide on Enterprise Design Patterns and there are also the foundation patterns published by Grady Booch et al. The best introduction to the area is "Head First Design Patterns". It gives some great and easy to understand explanations, but the examples are in Java. If you can live with that I would recommend that book as a good starting point before delving in to the more academic books by Booch et al.

That aside, you can use a SqlDataAdapter to populate a DataSet. I don't tend to use them myself, so you might like to look them up in MSDN.

giddy_guitarist wrote:
2.I have a PersID column in the persons table.Should i let it be an autonumber or Generate some hash because customers once removed are stored in an archive table.New and archived customers should'nt have same IDs , i noticed that even if a delete a customer with ID=2 , the next customer has an ID:3 . But i'm curious about where this is stored? what if i wanted to purge the DB of all customers so ID will start from 1 again?


I'd stick with using an integer and having an IDENTITY set on the column. The smaller the key the more efficient it is. Using a GUID takes 4 times the space of an integer.

If you delete all rows from the table then the next row that is inserted will continue id sequence from where it left off. You can reseed the identity if you want, but I wouldn't bother. The most common reason I've wanted to do this was for testing. And if I'm testing I usually ensure that my whole test environment is reset - that means ditching the database and rebuilding it from a script.


giddy_guitarist wrote:
3. This is slightly embarrasing but , the thing i have to install on my clients pc is the file on this page thats 53 mb right?


Yes. SQL Server 2005 Express edition is quite large - but then again, it is increadibly powerful for how much you paid for it. (i.e. you get a lot of power for nothing).

Remember that a SQL Server is installed on one central machine (a server) and used by many clients. So, it doesn't need to be installed on every machine.

giddy_guitarist wrote:
I know i need this to automate the intall correct?:


Unfortunately, I can't see what that is as MSDN isn't working for me at the moment.


GeneralRe: some newbie questions:[sqlservr 2005 , C# 05] Pin
giddy_guitarist18-Feb-07 0:31
giddy_guitarist18-Feb-07 0:31 
GeneralRe: some newbie questions:[sqlservr 2005 , C# 05] Pin
Colin Angus Mackay18-Feb-07 1:12
Colin Angus Mackay18-Feb-07 1:12 
GeneralRe: some newbie questions:[sqlservr 2005 , C# 05] Pin
giddy_guitarist18-Feb-07 2:37
giddy_guitarist18-Feb-07 2:37 
Questionsql triggers Pin
kalyan_241613-Feb-07 17:21
kalyan_241613-Feb-07 17:21 
QuestionJob Name Pin
Member 382635313-Feb-07 11:59
Member 382635313-Feb-07 11:59 
AnswerRe: Job Name Pin
Ennis Ray Lynch, Jr.13-Feb-07 12:13
Ennis Ray Lynch, Jr.13-Feb-07 12:13 
AnswerRe: Job Name Pin
Harini N K21-Feb-07 22:35
Harini N K21-Feb-07 22:35 
QuestionOrder of operations and Short circuit Pin
Keith Andersch13-Feb-07 9:51
Keith Andersch13-Feb-07 9:51 
AnswerRe: Order of operations and Short circuit Pin
Pete O'Hanlon13-Feb-07 10:13
mvePete O'Hanlon13-Feb-07 10:13 
GeneralRe: Order of operations and Short circuit Pin
Keith Andersch13-Feb-07 10:33
Keith Andersch13-Feb-07 10:33 
GeneralRe: Order of operations and Short circuit Pin
M A A Mehedi Hasan13-Feb-07 23:25
M A A Mehedi Hasan13-Feb-07 23:25 
GeneralRe: Order of operations and Short circuit Pin
Pete O'Hanlon13-Feb-07 23:45
mvePete O'Hanlon13-Feb-07 23:45 
QuestionProgram can't connect with the server ,, vb.net 2005 Pin
kindman_nb13-Feb-07 8:49
kindman_nb13-Feb-07 8:49 
AnswerRe: Program can't connect with the server ,, vb.net 2005 Pin
Pete O'Hanlon13-Feb-07 9:24
mvePete O'Hanlon13-Feb-07 9:24 
GeneralRe: Program can't connect with the server ,, vb.net 2005 Pin
kindman_nb13-Feb-07 9:30
kindman_nb13-Feb-07 9:30 
GeneralRe: Program can't connect with the server ,, vb.net 2005 Pin
Pete O'Hanlon13-Feb-07 9:40
mvePete O'Hanlon13-Feb-07 9:40 
GeneralRe: Program can't connect with the server ,, vb.net 2005 Pin
kindman_nb13-Feb-07 9:54
kindman_nb13-Feb-07 9:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.