ideas about Database structure

  • (2 Pages)
  • +
  • 1
  • 2

26 Replies - 1320 Views - Last Post: 06 September 2016 - 03:16 PM

#1 pharaon  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 164
  • Joined: 18-October 07

ideas about Database structure

Posted 02 September 2016 - 09:42 AM

im working on application in vb.net that can store, search and modify family's member data

so what i need is to store information for parents name,address,work,age,phone
also for their kids name, address, work, phone, qualification

to be able to search by any of the above fields also to modify it

so i tried to make tow tables one for parents and other for kids which share same family ID but that was were not handy in adding and searching process

hope any one have better idea for database structure

This post has been edited by astonecipher: 02 September 2016 - 09:54 AM
Reason for edit:: removed obnoxious sizing


Is This A Good Question/Topic? 0
  • +

Replies To: ideas about Database structure

#2 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2343
  • View blog
  • Posts: 9,400
  • Joined: 03-December 12

Re: ideas about Database structure

Posted 02 September 2016 - 09:55 AM

Single table that uses it's primary key as a foreign key for the names.

Separate tables for phone numbers and addresses.

Don't know why you have qualification. I didn't know you needed to be qualified in anything to be family, if I did, I could cut some of mine out.
Was This Post Helpful? 0
  • +
  • -

#3 pharaon  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 164
  • Joined: 18-October 07

Re: ideas about Database structure

Posted 02 September 2016 - 02:24 PM

explain in more details please

i need each member qualification if student or graduated

This post has been edited by andrewsw: 02 September 2016 - 02:38 PM
Reason for edit:: Removed previous quote, just press REPLY

Was This Post Helpful? 0
  • +
  • -

#4 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2343
  • View blog
  • Posts: 9,400
  • Joined: 03-December 12

Re: ideas about Database structure

Posted 02 September 2016 - 03:05 PM

Make an attempt.

Write down the tables you think you need and what you think each of those tables needs to store, and post it.
Was This Post Helpful? 0
  • +
  • -

#5 pharaon  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 164
  • Joined: 18-October 07

Re: ideas about Database structure

Posted 03 September 2016 - 04:20 PM

those are the tables i got so far

family[id , address,financial, area]
members[id, pname, birthdate, Qualification, job, Health, tel]
parents[father,mother,fathernum,mothernum]

any suggestion about that
Was This Post Helpful? 0
  • +
  • -

#6 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2343
  • View blog
  • Posts: 9,400
  • Joined: 03-December 12

Re: ideas about Database structure

Posted 03 September 2016 - 04:43 PM

Members and parents can be combined. A parent, is-a, member. But you must want a maternal and paternal id
Was This Post Helpful? 0
  • +
  • -

#7 pharaon  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 164
  • Joined: 18-October 07

Re: ideas about Database structure

Posted 04 September 2016 - 10:59 AM

View Postastonecipher, on 03 September 2016 - 11:43 PM, said:

Members and parents can be combined. A parent, is-a, member. But you must want a maternal and paternal id


if i complained then at the application interface how can i define if the details go to parents or kids since im trying to making as simple interface as possible wont to fill it with textboxes..also one other problem if i want to look for parent only that have similar name then i could retrieve some kids as well that could have the same name
what if i search by the job or parents i could get some one else kids in other family with the same job or parents that have certain birthday could get some one else kids as well in the search results
Was This Post Helpful? 0
  • +
  • -

#8 andrewsw  Icon User is offline

  • say what now
  • member icon

Reputation: 6410
  • View blog
  • Posts: 25,908
  • Joined: 12-December 12

Re: ideas about Database structure

Posted 04 September 2016 - 11:16 AM

If you want "as simple interface as possible" then you'll have to keep the database as simple as possible as well. A few families with a few children per family. If you start to consider all the possible variations of relationships (and broken relationships!), and changes of address, and adoptions, and divorce, etc., etc., then you'll quickly lose control of your "simple" database.

If you are trying to do this for real, rather than as an exercise, then you could search "database structure genealogy", "database family trees", or similar. You'll see that such databases aren't straightforward.

I will also mention that you seem unduly concerned about search possibilities. If the structure is sound (or sound enough for a simple demonstration) then you'll be able to get whatever information you need from the database. Structure is the priority, obtaining useful data follows from this.
Was This Post Helpful? 0
  • +
  • -

#9 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2343
  • View blog
  • Posts: 9,400
  • Joined: 03-December 12

Re: ideas about Database structure

Posted 04 September 2016 - 01:22 PM

The database has nothing to do with the front end.

All of the issues you mention are worked out using the queries used to pull information.
Was This Post Helpful? 0
  • +
  • -

#10 pharaon  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 164
  • Joined: 18-October 07

Re: ideas about Database structure

Posted 04 September 2016 - 02:40 PM

View Postastonecipher, on 04 September 2016 - 08:22 PM, said:

The database has nothing to do with the front end.

All of the issues you mention are worked out using the queries used to pull information.

how would be a earch issue like i mention are worked out using the queries used to pull information
Was This Post Helpful? 0
  • +
  • -

#11 pharaon  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 164
  • Joined: 18-October 07

Re: ideas about Database structure

Posted 06 September 2016 - 09:35 AM

ok i find out what i need
i'll make two tables
table 1 is families it contain the family number which contain the family number and it's address
table 2 contain the member's of each family it goes like this family number and person number in this family like 1 for husband,2 for wife, 3 for kids like this

1 1 name, phone, age, job
1 2 name, phone , age, job
1 3 name, phone, age , job
1 3 name, phone , age, job
1 3 name, phone , age, job

so what i need now is the better idea for an interface to add such data .... because i want to use to click on add new family so the application will get the last family number from the family number table and allow it to add the new family's member data

so should i use data grid view? or what would be the best way to add such data in two tables from one forum
Was This Post Helpful? 0
  • +
  • -

#12 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2343
  • View blog
  • Posts: 9,400
  • Joined: 03-December 12

Re: ideas about Database structure

Posted 06 September 2016 - 09:40 AM

ummkay,


Quote

or what would be the best way to add such data in two tables from one forum


A transaction.



If you are happy with your structure, who am I to say anything.
Was This Post Helpful? 0
  • +
  • -

#13 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13566
  • View blog
  • Posts: 54,125
  • Joined: 12-June 08

Re: ideas about Database structure

Posted 06 September 2016 - 09:44 AM

I'll say something - that's a bad table structure.

One table for list of rolls.
One table for people's names and a column for 'rolls'.
One table for family name/address

One table that has the relation of family name keys to people keys.
Was This Post Helpful? 0
  • +
  • -

#14 pharaon  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 164
  • Joined: 18-October 07

Re: ideas about Database structure

Posted 06 September 2016 - 10:23 AM

Quote

One table for list of rolls


what do you mean with list of rolls? sorry I'm not so good in English

Quote

One table for people's names and a column for 'rolls'

do you mean family number? or what would be family name?

Quote

One table for family name/address

this table contain two columns family number, family address? or do you mean something else

Quote

One table that has the relation of family name keys to people keys

can you give me an example for such table
Was This Post Helpful? 0
  • +
  • -

#15 andrewsw  Icon User is offline

  • say what now
  • member icon

Reputation: 6410
  • View blog
  • Posts: 25,908
  • Joined: 12-December 12

Re: ideas about Database structure

Posted 06 September 2016 - 10:45 AM

This may give you some inspiration:

Attached Image

(Found using the search terms I mentioned earlier.)

It is a good thing to continue to wrestle with this yourself, but you seem to have stalled. (A while back.) So, as I say, this may give you a push.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2