DATABASES
7.2 RELATIONAL DATABASES |
|
DATABASES
7.2 RELATIONAL DATABASES |
|
A single flat-file database can get messy when it contains various entities of different kinds. In the example in this video from LucidChart a database with the entities 'Customers', 'Products' and 'Orders' are split from a flat-file database to a relational database because of redundant data, duplicate data, a lack of a unique way to identify each attribute and lacks ensuing data integrity.
|
|
When tables are joined together we need to assign a join type. The join will determine the amount of records that are linked from each table, the amount can either be Zero, One or Many. For example if you are setting up a school database you might want to set up so one class can have many students(one-to-many), and each student can have many classes(many-to-many), but each class can only have one teacher (one-to-one).
This video by 'Prescott Computer Guy' talks about setting up these join types. |
|
Whilst you can simple use the words to describe the join types such as one-to-one or one-to-many for example you should be familiar with the popular 'Crows Foot' notation of these join types. This type of join notation is frequently used in relationship diagrams.
Some databases such as MS Access will as standard will generally create a one-to-one join type when you set up the relationship, which you can at any point change as you please, others with need to be done manually. The join type if frequently known as the cardinality. |
It is always very temping to dive right into your chosen database software and start building, however one thing with databases is that once it is set up it can be very difficult and time consuming to go back and make changes to the structure of the database. Spending time to plan the database will nearly always save time in the long run and give you a better change of producing a suitable end product.
|
|
SUGGESTIONS
We would love to hear from you |
SUBSCRIBE
To enjoy more benefits |