I understand that you are asking about the basics of data base design, right ?
Well, this question can not be answered in one or two sentences, the required design of your data base fully depends on what information it will hold, and on what you want to do with this information.
If you wanted, for example, to create a data base with all the phone numbers and addresses of people in Greece, you would need two tables.
Table1 would hold the Name|Surname|StreetName|HouseNumber|PostCode|PhoneNumber ,
Table2 would hold PostCode|CityName
If you "connected" both tables using the PostCode field you could display all information from each record from table1 PLUS the CityName from table2.
If you add a field SHOW in table1, which can hold only YES or NO, you could design a statement that shows only the records marked SHOW = YES, or those marked NO. You would do this to avoid being presented with all addresses which you do not wish to see (because marked NO means "not my friend any more" for example).
As you see, this is a very complex issue.
Maybe you could specify your question to what exactly you want to achieve to bring in the most helpful answers .
you will probably need one single table only as the information stored in each record is specific.
You could, if you wanted to make this really complex, create a second table of all the cities in Greece (which would then be like in my first reply), and maybe another table with all the streets in each city in Greece.
Your names entry of "Miller , Joe, 1000, 9999, 0123-4567" would then link to the cities table and find
"1000 | ATHENS", and in the streets table it would link to " 1000 | 9999 |Main Street [in Athens]".
At least this is how it works.
But I believe that for your purposes a single table will do. You will not even have to install a relational data base system for that, programs like MS-EXCEL can handle this just fine.
As for hints to decent books on data base systems, just use an internet search agent to find you millions of good sources (I am using SQL on an IBM AS/400 system, thus NOT any MySQL or MS-SQLServer or things ...) .
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.