Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Excel a potent relational data source for manual entry?

I am using Excel to store data kind of as a relational database for data that will be entered manually (see my other question here : https://stackoverflow.com/questions/9416263/possible-solutions-for-simple-data-persistence-and-manual-entry)

However my biggest problem so far is making the RELATIONSHIPS easier (in a manual entry perspective). As of now, I reference other tables by using the incremental ID, but when you look at such a foreign key, the user has no idea what the Object #42 is, the user has to go and seek the #42 in the other table in order to know what it is.

Let me give an example, let's say we only have two tables and 1 one-to-many relationship between Cities and Countries. This is the way I enter data

The problem is I do the relationships using the articial ID key, but it has no meaning and when adding cities, I have to check the ID for the referenced country in the other tab.

Is there any way I could select the country using dynamic combo-boxes that uses the data from the other table? If so, can it show the country name, but enter the ID (because that's how the relations are made).

Do I HAVE to change the primary keys to be the country name and get rid of the ID fields where necessary? Because some tables are the result of many-to-many relationships and are defined by multiple foreign keys, so they have no unique value except the combined foreign keys OR an artificial ID.

I hope I was clear enough, and I must admit that I am an Excel newbie.

like image 891
dominicbri7 Avatar asked Oct 09 '22 14:10

dominicbri7


2 Answers

As some comments pointed it out, I am trying to use the wrong tools for my needs. I should be using Access instead of Excel, especially since I have resolved my ODBC drivers problem

like image 178
dominicbri7 Avatar answered Oct 12 '22 11:10

dominicbri7


You can use data validation to force possible values for a field. See this article from MS support.

Following your example, I succeed in linking the Country_City field with the Name_Country field. Though the data validation does not let you bind a multicolumn list (such as a list of (key,value).

like image 26
Alberto De Caro Avatar answered Oct 12 '22 11:10

Alberto De Caro