473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.sqlmonster.com
Dec 12 '05 #1
7 2626
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 SQLMonster.com" <u6539@uwe> wrote in message
news:58b7defdfb401@uwe...
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.sqlmonster.com

Dec 12 '05 #2
so this is my question, i need some advice for implementation.

Tony Rogerson wrote:
How far have you got so far? Can you post your table designs.
Hi All!!

[quoted text clipped - 8 lines]

TNX


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

Message posted via http://www.sqlmonster.com
Dec 12 '05 #3
E B via SQLMonster.com wrote:
so this is my question, i need some advice for implementation.

Tony Rogerson wrote:
How far have you got so far? Can you post your table designs.
Hi All!!

[quoted text clipped - 8 lines]

TNX


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

Message posted via http://www.sqlmonster.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
--

Dec 12 '05 #4
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_number
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 SQLMonster.com" <u6539@uwe> wrote in message
news:58b8a9c7d1765@uwe...
so this is my question, i need some advice for implementation.

Tony Rogerson wrote:
How far have you got so far? Can you post your table designs.
Hi All!!

[quoted text clipped - 8 lines]

TNX


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

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

Dec 12 '05 #5
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:
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_number
individual_id int not null references individual( id ),
phone_number_id int not null references phone_number( id )

Tony.
so this is my question, i need some advice for implementation.

[quoted text clipped - 5 lines]

TNX


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

Message posted via http://www.sqlmonster.com
Dec 12 '05 #6
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:
so this is my question, i need some advice for implementation.

[quoted text clipped - 8 lines]
--
Imagination is more important then knowledge. (A.Einshtein)


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.sqlmonster.com
Dec 12 '05 #7
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.

Dec 14 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: rorley | last post by:
I'm new to Python and I'm struggling. I have a text file (*.txt) with a couple thousand entries, each on their own line (similar to a phone book). How do I make a script to create something like...
4
by: Abdessamad Belangour | last post by:
Hi all, I have an ArrayList ( phoneBook ) of structures (PhoneEntry's) holding the name and the owned phone numbers of a person as in below :...
2
by: Steve K | last post by:
I got a bit of a problem I like some help on. I'm designing an online training module for people that work in food processing plants. This is my target audience. These workers have little or no...
10
by: csshine | last post by:
I composed below code but can not pass compiling. Could some one help this? ------------------------------ #include <stdlib.h> #include <stdio.h> #include <string.h> using namespace std; ...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
0
by: pariya karimi | last post by:
would you post me a code for phonebook in vb.net *** Sent via Developersdex http://www.developersdex.com ***
4
by: DDCane | last post by:
i need to make a dictionary that works as a telephone book. this is what needs to happen when i type in the following: add name number – it adds the name and number to the phonebook lookup name...
1
by: jerry | last post by:
i have written a simple phonebook program,i'll show you some of the codes,the program's head file is member.h . i suppose the head file works well.so i don't post it. here's the clips of main...
8
by: royalaid | last post by:
Hey guys, first time posting here so don't flame me for being new, I was just wondering if anyone could explain why my Arraylists are overwriting themselves. public static void...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.