primary-key-design

Key DataType for a high volume SQL Server 2008?

I in the process of designing a database for high volume data and I was wondering what datatype to use for the primary keys? There will be table partitioning and the database will ultimatley be clustered and will be hot failover to alternative datacentres. EDIT Tables - think chat system for multiple time periods and multiple things...

Database Design and the use of non-numeric Primary Keys

Hello, I'm currently in the process of designing the database tables for a customer & website management application. My question is in regards to the use of primary keys as functional parts of a table (and not assigning "ID" numbers to every table just because). For example, here are four related tables from the database so far, one ...

Best way to create unique identities for distributed data that will be merged?

I have a centrally hosted database (MS SQL Server) and distributed clients save data to it over the Internet. When the Internet connection goes down the client starts storing new data locally into a SQLite instance. When the Internet connection comes back online the accumulated local data is moved to the central db (inserted). What's th...

MySQL - using String as Primary Key

I saw a similar post on Stack Overflow already, but wasn't quite satisfied. Let's say I offer a Web service. http://foo.com/SERVICEID SERVICEID is a unique String ID used to reference the service (base 64, lower/uppercase + numbers), similar to how URL shortener services generate ID's for a URL. I understand that there are inherent pe...

Adding a new primary key to existing table

I have table with following details Table name EMPLOYEE and columns EMPID (PK smallint not null) EMPNAME (varchar 256 not null) ORG (FK smallint not null) FUNCTION (FK smallint not null) EFF_DATE (datetime null) AUDIT_ID (varchar null) Now I have to add an extra coulmn to this table ADD_UID and make it also primary key I am using th...