1. Single database is the better design, there are strategies to handle large volume. Extreme data (think Google, facebook, Amazon etc) requires a different strategy but it is probably too early to begin taking that into account.
2. Much more than a startup site can expect to see.
3. See 1 - same question
4. Don't create multiple databases - removes the question.
5. Performance like Amazon is above and beyond your short/medium term expectations, I imagine they have a large dedicated team simply looking after their database systems. Any of the hosting companies will be delighted to meet you short/medium term needs.
If your database is designed properly it will be scalable, I would suggest getting a professional to design your system. An excellent specification will facilitate the design.
Never underestimate the power of human stupidity
Hi can anyone help me I don't necessarily want a solution just an idea.
I have a table e.g
ID - Start Date - End Date - Difference(Duration) - SessTotal - SessID
Now the Id is per user. and the date difference is the time spent doing something. If the difference is greater than 30 minutes I need to increment the session ID by 1.
Second I need to create a running total for session total per session.
1 session ID must also not be able to have more than 1 UserID [ID] in it's row.
I absolutely have to display the date difference that is how the specification is made.
Let me try saying it this way:
I have to have a running total for the times until there is a 30 minute or larger gap or if a new user ID which is a different person is the next row of the dataset. then that is a session then I have to increment the session ID for each Session.
SET [Session ID] = [Session ID] + 1
WHERE [Date difference] < 30 Minutes
OR If dates run out for this person presenting a new person.
And for then the running total must start again. It is allot to ask I am sorry but any help would be greatly appreciated.
Thank you for the function, but it is not quite solving my problem. If you could maybe give me a guideline on how I can update using this row combined with the following row. and then also group by as to not overlap users? if not then thank you for your effort.
Thank you that helps. I do understand when you guys say calculated fields should not be stored but I have to store summary's of 80 million rows. and when they are stored they will not change but get added to. I could show you my query then you could tell me what to improve if you want. but thank you any way
Interesting I will go take a peek at OLAP, The only problem is I am moulding the data in parts updating parts after the initial insert. I just need to get a running total of the date difference (Which is used as time) and I need to restart the counting when the difference (not the total) is more than 30 minutes and then I need to assign that session an ID a session ID must not lap over different users. the part I am stuck with is 1. the running total of the time difference 2. assigning incremented ID's based on this logic
[Edit]: Your left join idea helped already thank you
Haha I realize that they are correct. and it is not going to store duplicate data it will always change. see this is to analyse user actions and time they spent lingering about on certain pages. and I know about Computed columns I am a bit more intermediate with sql but thanks any way
I want to know if there is a simple and efficient way to select a valuefrom a row that has a column with minimum creation time for the given parameters.
Let us take a sample table named Patient
PatientId Observation Time Value
1 Temp 2014-02-19 03:55:00351 Temp 2014-02-19 03:45:00371 Weight 2014-02-19 03:40:0060
If i am given the PatientId and Observation, I need to retrieve the value field with minimum creation time
For patient id 1 and observation Temp this would be Value 37
since it has 2014-02-19 03:45:00as minimum creation time
Top ensures that only one line is returned.
You can remove the top 1 - however if more than one line is returned you will have to make a choice at some point if the values are different.
Simply replace the top 1 with distinct if you know there will only be one value returned.
“That which can be asserted without evidence, can be dismissed without evidence.”
So...it seemed like a good idea at the time. I have a C# application that is distributed among multiple users (about a dozen). I set each user up with their own database (MS SQL 2005) so there is no interaction between users and it works great. Now, I am making a change to the program which requires a change to the database. In the past, with just a few users, I simply went into each database and altered the tables one at a time ... takes a few minutes for each one. But as the number of users grow and I keep adding features to the application more frequently ... well, you can see where this is going. My question is; what type of command can I use to alter the databases (a script of some kind?) to add or remove columns from tables, add tables, etc. to make it so that I can alter multiple identical database structures at the same time while maintaining the data in them. Although I have been making databases for my applications for about 15 years, this is an area that I have never had to deal with; something I would assume would normally be the job of a dedicated DBA. If applications end up being sold on a larger scale (and it is heading that way), then I would hire such a person immediately. I considered having everyone in a single large database at the start and simply use proper queries to pull the data, but I decided that the sheer size and loss of performance would not make it as nice as it is, especially if I were to end up with several hundred users. There are about 30 tables in the database. I never really understood the limits and capabilities of these databases; only to say I don't really trust them to do the job when they get too large(not very scientific; more of a gut feeling). Am I way underestimating the ability of the database? Until then, can you give me a lead in on how to do this? I love it here at Code Project and I Thank You for your time....Pat
Last Visit: 31-Dec-99 18:00 Last Update: 22-Sep-23 10:50