ERDs
I remember when I worked at ADP, I would use Access a lot to pull information from our databases. Today I learned how to set up those databases and pulling information is a lot easier than creating them... ERD are known as entity relationship diagrams. I learned about the 3 relationships:
- One-to-one
- One-to-many
- Many-to-many
- Each column have can only have 1 value (think address street, city, state, zipcode being broken up into separate columns)
- If not foreign or primary key, cannot repeat values. This prevents repetition of data.
- Non-key columns cannot be dependent on non-key columns. Meaning, that if you have a column in a table that affects other columns, (like zip codes determining state and city), then you must create another table for that column and have a foreign ID put into the original table.
Then, after learning just these 6 things, they start asking questions on the assignments that slowly didn't make sense. I don't know why it took me so long to understand these concepts. The only cure was to keep practicing and answering a variety of questions. But the one question that will stick to my mind is: can A have multiple B? Can B have multiple A? To determine what relationships the two objects have with each other.
The assignments weren't too difficult and didn't take a long time although the instructions could be clearer. All in all, the more assignments I finished, the more I understood the subject although now my issue is that I can't fully explain my decision about creating relationships between tables. I can't believe that most DBs can have 50+ different tables when I'm struggling with just 5!
No comments:
Post a Comment