Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Help with phoneBook db design
Hi All!!

I need to build small phone book db.


There are  phone numbers and name (to whom phone belong)
There are distribution lists that holds phone numbers and also can hold
another lists.
There are Users to whom distribution lists and or phones belong.


Any ideas ?????

TNX

--
Imagination is more important then knowledge. (A.Einshtein)

Message posted via http://www.webservertalk.com

Report this thread to moderator Post Follow-up to this message
Old Post
E B via webservertalk.com
12-12-05 12:23 PM


Re: Help with phoneBook db design
How far have you got so far? Can you post your table designs.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


"E B via webservertalk.com" <u6539@uwe> wrote in message
 news:58b7defdfb401@u
we...
> Hi All!!
>
> I need to build small phone book db.
>
>
> There are  phone numbers and name (to whom phone belong)
> There are distribution lists that holds phone numbers and also can hold
> another lists.
> There are Users to whom distribution lists and or phones belong.
>
>
> Any ideas ?????
>
> TNX
>
> --
> Imagination is more important then knowledge. (A.Einshtein)
>
> Message posted via http://www.webservertalk.com



Report this thread to moderator Post Follow-up to this message
Old Post
Tony Rogerson
12-12-05 12:23 PM


Re: Help with phoneBook db design
so this is my question, i need some advice for implementation.



Tony Rogerson  wrote:[color=darkred
]
>How far have you got so far? Can you post your table designs.
> 
>[quoted text clipped - 8 lines] 

--
Imagination is more important then knowledge. (A.Einshtein)

Message posted via http://www.webservertalk.com

Report this thread to moderator Post Follow-up to this message
Old Post
E B via webservertalk.com
12-12-05 12:23 PM


Re: Help with phoneBook db design
E B via webservertalk.com  wrote:
> so this is my question, i need some advice for implementation.
>
>
>
> Tony Rogerson wrote: 
>
> --
> Imagination is more important then knowledge. (A.Einshtein)
>
> Message posted via http://www.webservertalk.com

Designing a logical data model requires much more thorough analysis of
your requirements than we are likely to achieve through an online
discussion. You could take a look at the following link for some
inspiration. However, if you lack data modelling skills then I suggest
you study some fundamentals before you set to work. Designing a data
model is a science as well as an art. If you aren't familiar with the
principles then example solutions aren't going to be much help.

http://www.databaseanswers.org/data_models

--
David Portas
SQL Server MVP
--


Report this thread to moderator Post Follow-up to this message
Old Post
David Portas
12-12-05 12:23 PM


Re: Help with phoneBook db design
I'd certainly break the name up into first and last names, probably
nvarchar(50), also, you'll need other information to uniquely identify this
individual.

Phone number can be broken up into country code, area code and number as
well.

Do you need to think about extension number too?

I'd make the phone number (country code, area code, number) a primary key,
but use a surrogate key to foreign key between the individual and the phone
number.

So you will have 3 tables...

individual
other identifying cols...
first_name
last_name
id    int not null identity constraint sk_individual unique nonclustered

phone_number
country_code
area_code
local_number
id    int not null identity constraint sk_phone_number unique
nonclustered

 individual_phone_num
ber
individual_id int not null references individual( id ),
phone_number_id int not null references phone_number( id )

Tony.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


"E B via webservertalk.com" <u6539@uwe> wrote in message
 news:58b8a9c7d1765@u
we...
> so this is my question, i need some advice for implementation.
>
>
>
> Tony Rogerson wrote: 
>
> --
> Imagination is more important then knowledge. (A.Einshtein)
>
> Message posted via http://www.webservertalk.com



Report this thread to moderator Post Follow-up to this message
Old Post
Tony Rogerson
12-12-05 12:23 PM


Re: Help with phoneBook db design
tnx, however i need to implement a distribution lists, e.g

idividual can have  3 phon numbers and 2 lists (inside this list there are
phone numbers and also possible inside this list there are another list)

TNX

Tony Rogerson  wrote:[color=darkred
]
>I'd certainly break the name up into first and last names, probably
>nvarchar(50), also, you'll need other information to uniquely identify this
>individual.
>
>Phone number can be broken up into country code, area code and number as
>well.
>
>Do you need to think about extension number too?
>
>I'd make the phone number (country code, area code, number) a primary key,
>but use a surrogate key to foreign key between the individual and the phone
>number.
>
>So you will have 3 tables...
>
>individual
>    other identifying cols...
>    first_name
>    last_name
>    id    int not null identity constraint sk_individual unique nonclustere
d
>
>phone_number
>    country_code
>    area_code
>    local_number
>    id    int not null identity constraint sk_phone_number unique
>nonclustered
>
> individual_phone_num
ber
>    individual_id int not null references individual( id ),
>    phone_number_id int not null references phone_number( id )
>
>Tony.
> 
>[quoted text clipped - 5 lines] 

--
Imagination is more important then knowledge. (A.Einshtein)

Message posted via http://www.webservertalk.com

Report this thread to moderator Post Follow-up to this message
Old Post
E B via webservertalk.com
12-12-05 12:23 PM


Re: Help with phoneBook db design
thanks David , i famaliar with this site, however  The Tony post is pretty
good however i need also implemets lists (distribution lists)  they can hold
phone numbers and also other lists and so on.


TNX

David Portas  wrote: 
>[quoted text clipped - 8 lines] 
>
>Designing a logical data model requires much more thorough analysis of
>your requirements than we are likely to achieve through an online
>discussion. You could take a look at the following link for some
>inspiration. However, if you lack data modelling skills then I suggest
>you study some fundamentals before you set to work. Designing a data
>model is a science as well as an art. If you aren't familiar with the
>principles then example solutions aren't going to be much help.
>
>http://www.databaseanswers.org/data_models
>

--
Imagination is more important then knowledge. (A.Einshtein)

Message posted via http://www.webservertalk.com

Report this thread to moderator Post Follow-up to this message
Old Post
E B via webservertalk.com
12-12-05 12:23 PM


Re: Help with phoneBook db design
you have people. first name, last name, address, and identity, i'll
call "peopleid."
you have a "phone number.". the actual number, and something i'll call
"phoneid."

you have a cross reference table of "assignedphone."  in that table
will be AssignedID, peopleid, phoneid, adn perhaps startdates,
enddates, etc.

You will have a different cross reference table of "distribution."
DistributionID, and another peopleID for the "owner of the distribution
list." Here it gets a little interesting. If your distribution list is
a list of phone numbers, then include PhoneID's. If your distribution
list is a list of people, then include teh peopleID's.  For the latter
case, use the assignedphone to go get the assigned phones, then off to
the phonenumbers to get the actual numbers.

Start there. When you have mastered the logic, then grow the app to
include the second order distribution lists. this is enough to get you
started though.


Report this thread to moderator Post Follow-up to this message
Old Post
Doug
12-14-05 06:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:17 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006