Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Database Design
»
Design Ideas and Questions
»
Design Question - Company, Clients, Branches,...
Design Question - Company, Clients, Branches, Departments
Rate Topic
Display Mode
Topic Options
Author
Message
netpicker9
netpicker9
Posted Wednesday, December 08, 2010 7:37 PM
Grasshopper
Group: General Forum Members
Last Login: Tuesday, June 05, 2012 4:05 PM
Points: 13,
Visits: 43
Hi,
Can any one please let me know how design tables below,
1. Company
2. Client
3. Branch
4. Departments
Points:
a. Some companies do not have any branches and just departments
b. If company happen have any branch, do I need an entry in branch table for corporate office?
c. Is it better to use Branch, Departments tables for Company & Client tables?
I know this is basic but, I need your help!
Thanks
Post #1032258
bitbucket-25253
bitbucket-25253
Posted Wednesday, December 08, 2010 7:59 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 5:16 PM
Points: 5,101,
Visits: 20,201
What you need to do is to develope an overall requirements document specifying what you management expects to use the database for.
a. What data do people need/want to view
b. How is data collected.
and on and on
Once you have a requirements document finished and reviewed and approved by your managemnt, Then you can concern yourself about individual tables, how they are linked together using foreing keys, etc etc.
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #1032260
PaulB-TheOneAndOnly
PaulB-TheOneAndOnly
Posted Friday, December 10, 2010 8:43 AM
SSCrazy
Group: General Forum Members
Last Login: Today @ 3:30 PM
Points: 2,982,
Visits: 4,397
netpicker9 (12/8/2010)
Can any one please let me know how design tables below,
1. Company
2. Client
3. Branch
4. Departments
Points:
a. Some companies do not have any branches and just departments
b. If company happen have any branch, do I need an entry in branch table for corporate office?
c. Is it better to use Branch, Departments tables for Company & Client tables?
I know this is basic but, I need your help!
I assume this is not being developed for a specific company but it is intended to be used to serve multiple companies you don't even know yet - is that a correct assumption?
If that's the case I'll make an executive decision and say "all companies have at least one branch - which is the company's headquarter"
Then, for a three "branches" company your database will show four e.g. headquarter plus three non-headquarters branches.
Hope this helps.
_____________________________________
Pablo (Paul) Berzukov
Author of
Understanding Database Administration
available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Post #1033058
Toby Harman
Toby Harman
Posted Wednesday, December 29, 2010 5:01 PM
Old Hand
Group: General Forum Members
Last Login: Yesterday @ 9:39 PM
Points: 322,
Visits: 476
Collapse the structure to a single table and use a HIERARCHYID.
That way you can define a flexible heirarchy in this table and attach to specific points.
Post #1040641
harinerella
harinerella
Posted Thursday, December 30, 2010 12:16 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, January 20, 2011 2:18 PM
Points: 190,
Visits: 63
An ER diagram will help more to understand the relation ships
Post #1040731
harinerella
harinerella
Posted Thursday, December 30, 2010 12:20 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, January 20, 2011 2:18 PM
Points: 190,
Visits: 63
An ER diagram will help more to understand the relationships
Post #1040733
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.