Click here to Skip to main content
15,886,362 members
Home / Discussions / Database
   

Database

 
GeneralRe: Remote DML/DDL from different Nodes to MS SQL Server 2005 Pin
nt_virus29-Aug-09 22:14
nt_virus29-Aug-09 22:14 
GeneralRe: Remote DML/DDL from different Nodes to MS SQL Server 2005 Pin
Mycroft Holmes29-Aug-09 23:35
professionalMycroft Holmes29-Aug-09 23:35 
GeneralRe: Remote DML/DDL from different Nodes to MS SQL Server 2005 Pin
nt_virus30-Aug-09 2:02
nt_virus30-Aug-09 2:02 
GeneralRe: Remote DML/DDL from different Nodes to MS SQL Server 2005 Pin
Jerry Hammond30-Aug-09 2:33
Jerry Hammond30-Aug-09 2:33 
GeneralRe: Remote DML/DDL from different Nodes to MS SQL Server 2005 Pin
nt_virus30-Aug-09 3:03
nt_virus30-Aug-09 3:03 
GeneralRe: Remote DML/DDL from different Nodes to MS SQL Server 2005 Pin
Jerry Hammond30-Aug-09 3:56
Jerry Hammond30-Aug-09 3:56 
GeneralRe: Remote DML/DDL from different Nodes to MS SQL Server 2005 Pin
Mycroft Holmes30-Aug-09 3:03
professionalMycroft Holmes30-Aug-09 3:03 
QuestionDesktop Database App Pin
pstsp91129-Aug-09 6:26
pstsp91129-Aug-09 6:26 
Hello, I am creating a desktop database application with C# and MS SQL SERVER 2008 EXPRESS,
and I have a few Q's about it.

Let's suppose we have the table customers, with structure like this:


Customers:


|ID|Nmae |SecondName | Adres |ShipID|Promoted |
------------------------------------------------------
|1 |John |axxx | ytutyt | 5 | false |
|2 |Adam |bxxx | qwefsd 18 | 23 | false |
|3 |Eddie |cxxx | fsdfssf 7 | 28 | true |
|4 |Eddie |dxxx | fsadsdf 42| 14 | true |
|5 |Mark |exxx | hdgdssf 2 | 33 | true |
|6 |Mathew|fxxx | xcvxzx 75 | 45 | false |



I am new in the Database programming, but knowing the goal of my application,
I suppose in the future I will experience at least 2 kinds of problems:

1) I guess every month I will have even 100 000 new records but there are necessary
only for two months. After that time I would like to move the unncessessarty records
somewhere else than in the customers table in order to avoid performance loss, but
I'd like to have access to them on demand.
Whats the best way to do it? To create other table with schema like Customers,
and every two months move data from Customers to that new table,
so that customers will always contain data maximally 2 months old?

2) I would like a new logical table PromotedCustomers containing
every record from Customers that has "Promoted" value set to true. What is essential here,
is that I would like searching in this new table faster than searching in Cusotmers table.

For example, supposing I have Customers table like above:

SELECT Name FROM Customers WHERE Promoted = true AND Name = Eddie

returns 2 records, but has to search 6 rewcords (whole Customers table)


If I had PromotedCustomers table the way I want, I could write:

SELECT Name FROM PromotedCustomers WHERE Name = Eddie

It also returns 2 records, query is a little bit shorter, but whats most important for me:
ONLY 3 RECORDS HAS TO BE SEARCHED, and performance is important in my app.

Is it possible to create such a table?


Thanx for any help Smile | :)
AnswerRe: Desktop Database App Pin
Mycroft Holmes29-Aug-09 14:56
professionalMycroft Holmes29-Aug-09 14:56 
QuestionSQL: Table, where "partnerships" are stored Pin
softwarejaeger28-Aug-09 23:07
softwarejaeger28-Aug-09 23:07 
AnswerRe: SQL: Table, where "partnerships" are stored Pin
Mycroft Holmes29-Aug-09 15:03
professionalMycroft Holmes29-Aug-09 15:03 
QuestionUnable to Restore MDF file in Vista Pin
sumit703428-Aug-09 17:45
sumit703428-Aug-09 17:45 
AnswerRe: Unable to Restore MDF file in Vista Pin
Jerry Hammond29-Aug-09 11:59
Jerry Hammond29-Aug-09 11:59 
GeneralRe: Unable to Restore MDF file in Vista Pin
sumit703430-Aug-09 18:53
sumit703430-Aug-09 18:53 
GeneralRe: Unable to Restore MDF file in Vista Pin
Jerry Hammond31-Aug-09 6:13
Jerry Hammond31-Aug-09 6:13 
AnswerRe: Unable to Restore MDF file in Vista Pin
Eddy Vluggen31-Aug-09 5:18
professionalEddy Vluggen31-Aug-09 5:18 
Questioner diagram for hospital managment system Pin
noo.dyab28-Aug-09 3:44
noo.dyab28-Aug-09 3:44 
AnswerRe: er diagram for hospital managment system Pin
Ashfield28-Aug-09 4:51
Ashfield28-Aug-09 4:51 
AnswerRe: er diagram for hospital managment system Pin
DoctorMick28-Aug-09 5:43
DoctorMick28-Aug-09 5:43 
AnswerRe: er diagram for hospital managment system Pin
Jerry Hammond29-Aug-09 12:01
Jerry Hammond29-Aug-09 12:01 
AnswerRe: er diagram for hospital managment system Pin
Eddy Vluggen31-Aug-09 5:20
professionalEddy Vluggen31-Aug-09 5:20 
QuestionLogging Pin
cdpace28-Aug-09 3:03
cdpace28-Aug-09 3:03 
AnswerRe: Logging Pin
Ashfield28-Aug-09 4:52
Ashfield28-Aug-09 4:52 
GeneralRe: Logging Pin
cdpace28-Aug-09 4:59
cdpace28-Aug-09 4:59 
GeneralRe: Logging Pin
Blue_Boy28-Aug-09 5:04
Blue_Boy28-Aug-09 5:04 

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.