Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Table Design and Primary Key

$
0
0
First time poster here, so please forgive me (and correct me) if I am not following the appropriate protocol.

I work in accounting and have built quite a few databases in the past, although I dont feel that I've designed them very effeciently. I am starting a new one soon, and I had some questions regarding design, primarily concerning table design and primary keys. Typically I import actuals from the general ledger into my databases (copy and paste from excel actually), and I am specifically questioning the design of the table that holds the actuals. Currently the columns are Year, Month, Cost Center, Account, Expense. Hopefully this makes sense to everyone, but if I need to attach anything to provide better understanding please let me know. I would call this a "vertical" design since the months run vertically. Most databases I've seen have the months running horizontally as columns (i.e. column for Jan, Feb, Mar, etc...). So my two questions are:

1. Is there any reason to build my table with a horizontal design versus a veritcal design?

2. I currently do not have a primary key in this table. Do I need one? If so, why and what should I use? Concatenation of cost center and account?

I guess that was slightly more than 2 questions. Thanks in advance for the help and please let me know if I need to provide further clarification.

Matt

Viewing all articles
Browse latest Browse all 13329

Trending Articles