0
votes
0answers
6 views

Users Characteristics

I'm really battling an issue where I have a Users table that has a growing number of user characteristics (regligion, smoking preferences, etc). The strategy I've used thus far has been to add a ...
0
votes
0answers
13 views

Users_With_Messages Table normal form

I have the following tables in my database: Above these tables (not pictured) is a Users table where the SendingUserId and ReceivingUserId are keyed onto (they are foreign keys). Are these tables ...
1
vote
1answer
113 views

Should I extract / normalize the mailing address despite requirements limiting number / type of addresses?

I currently am working on a contacts application (similar to Outlook contacts combined with eVites and LinkedIn). The requirements for the application are to limit the addresses (and phone / email ...
2
votes
3answers
198 views

Database design for conditional detail table

I have an expense management system for monthly expenses. Expenses are of two types: one-time monthly expenses, and daily expenses for each day of month. I have created the following tables: ...
7
votes
3answers
3k views

How to have a one-to-many relationship with a privileged child?

I want to have a one-to-many relationship in which for each parent, one or zero of the children is marked as a “favorite.” However, not every parent will have a child. (Think of the parents as ...
3
votes
1answer
683 views

Normalized Table Structure for Logging

How can I normalize a table that has four columns for logging the latest activity for a single record: Created On Created By Modified On Modified By We have dozens of tables, all with these 4 ...
1
vote
1answer
278 views

Are these database tables normalized?

I am developing a webapp for an institute and I designed these tables: Are these tables normalized?
5
votes
3answers
1k views

Separate archive tables or soft delete for inventory database

I'm building an inventory database that tracks computer equipment and other hardware devices. At some point in any device's life it is retired and gets archived. After it becomes archived it needs to ...
3
votes
3answers
2k views

SQL table design for primary keys (best practice)

I have a User table that contains the following fields ID (Auto-generated GUID) UserName Password FirstName LastName Email AddressID (GUID) This is linked to the table Address (1-1 relation) which ...
2
votes
2answers
438 views

What are the pros and cons of using my customer codes as a primary key?

I am designing a database for one of my sales teams. Right now, the goal is to get a master list of customers and their mailing addresses, but the DB will eventually expand to track some other ...
4
votes
3answers
2k views

Query to normalize table/combine row text

I have a table (call it oldTable) with columns like so: ID (int),Rank (int),TextLineNumber (int),SomeText (varchar) The primarykey is multi-part: ID+Rank+TextLineNumber. I'm trying to ...