2
votes
1answer
136 views

When deciding a Primary Key, can I use Date part of a DateTime field

I'm designing a payroll system I have designed a database with several tables and this question is related to following tables EMPLOYEE (Employee_ID [pk], Name,... etc) LOCATION (Location_ID [pk], ...
1
vote
1answer
48 views

storing map template in database

I am working on an application that displays choropleth maps. These maps are of all different types, some display state by county, country by state/province, or world by country. How should I ...
1
vote
1answer
73 views

Design: Mixed XML / Relational or Pure Relational?

Is it acceptable to model a very complex object graph using XML in the database, but leave the rest of a system in relational tables? I'd like to gauge opinion on this as I've hit a bit of a ...
-4
votes
2answers
1k views

Best way to keep large amounts of data (no relational database needed)

I would like to know what should be the best way to keep data on a server related to the following points: Chat logs Heavy text content User references like amounts of ids (1,4,14,524,23220,...) ...
7
votes
4answers
482 views

What exactly does it mean that storing “large blobs in the database reduces performance”?

To someone who knows database internals this may be an easy question, but can someone explain in a clear way why storing large blobs (say 400 MB movies) in the database is supposed to decrease ...
5
votes
2answers
96 views

Tracking changes to posts

I'm currently in the process of writing a support ticket system... Let's say it's a small forum application, or something like Uservoice. Now I want my users to be able to edit their tickets, but ...
1
vote
4answers
1k views

Storing application users in SQL: create a new “Users” table or use built-in database user management?

I am specifically interested in SQL Server, but the same question applies in general. When creating a new application, the way I see it, there are two options: Create a table called "Users" and ...
0
votes
2answers
160 views

Full Text Search Strategy For My Website

I have a website that allows users to search for items in various categories. Each category is a separate area (page) of my website. For example, some categories might be cars, bikes, books etc. At ...
3
votes
1answer
144 views

Database Design - Optimise Relationships

I am about to embark on a redesign of an application, one where querying the database is particularly annoying. I intend to redesign the database as much as possible but the data shape cannot change ...
2
votes
3answers
163 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
209 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
295 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 ...
5
votes
4answers
5k 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 ...
1
vote
3answers
3k 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
949 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
609 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
241 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
382 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
223 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 ...