Tagged Questions
2
votes
3answers
104 views
Referencing countries via Foreign Key Constraint
To make things simple to explain: I've got two tables: Table1 and Countries.
The Countries table contains a nice flag and some information, such as DisplayName, the ISO3166 ALPHA3 code and the phone ...
0
votes
3answers
99 views
SQL Server + database design and non mandatory fields
I am developing an app which allows a user to upload a maximum of 20 photos, the straight forward way is of course adding 20 columns to my database table but if the user only uploads 1 image, the ...
1
vote
1answer
127 views
Table scaling with partitions or with separate databases?
Let's say I have a table (let's call it BigTable) which could experience 5,000,000 INSERTS per day (with possibly just as many SELECTs). Each row inserted is about 50kb.
These daily INSERTs are ...
3
votes
4answers
562 views
Better way of storing key-value pairs in the database?
I have a C#/SQL Server program that sometimes needs to store data. The data could be a response from a web service, a result of a database query, or any number of other things. There's no way of ...
2
votes
3answers
713 views
Storing Attendance Data in database
So i have to store daily attendance of employees of my organisation from my application . The part where I need some help is, the efficient way to store attendance data. After some research and brain ...
1
vote
4answers
391 views
At least one database view per database table-Is this good or bad design and why?
We are building a Windows Mobile based application to interface with a customer's existing web application. We are reading and writing data to the customer's SQL server 2008 database.
The customer ...
2
votes
3answers
337 views
Designing a large database with multiple sources
I have been tasked with redesigning, or at worst optimising the structure of a database for a data warehouse.
Currently, the database has 4 other source databases (which is due to expand to X ...
5
votes
4answers
198 views
Putting audit functionality into the database
Our database does not have any audit functionality.
It does not records who inserts the record or who who changes it
It does not keep a history of the changes made
Nothing can be restored if ...
6
votes
5answers
305 views
Anti Identity Column
I recently came across some code which generates an identity value for a key:
DECLARE @ID INT;
SELECT @ID = MAX(ID) + 1 FROM Person;
INSERT INTO [Person]
([ID], [FirstName], [LastName])
VALUES
...
3
votes
3answers
173 views
How to query a very long list of properties fast
I have a structure for storing item properties on SQL Server:
ItemId PropertyId Value
1 1 a
1 2 b
2 1 a
2 2 5
Currently there are over 130000 ...