A database is structured by specific rules collection of data.
Below graph is an example of unstructured data contains names and age of some group of people.
As we can see in the graph we do not know what is the age of sepecific person because years and names are not assigned to each other and data are not divade into separately data types(age is in the same group of data as names).
Let we take the same data and organize them. As we have 2 groups of data (names and age) we can separate them from each other in order to have in the each group only one typ of data(in the first group only names and in the second group only age values). Also, we have to assign names to age values. Because all of following people are our friends, we know that:
- Olivia is 31 years old
- Jack is 40 years old
- Spohia is 20 years old
- first James is 38 years old
- second James is 29 years old
Let’s show this situation in the table which is a good example of the database.
Structured group of dataThe data in the above database have been sorted out in two ways:
- vertically, which means that each column in the table contain only one, defined for this column typ of data.
Data divided into 2 groupsIn the above example we want that one column should contain only data about people’s names and different column only about their age. Names are the first typ of data in the table, no other value can be inserted in this column. Age is second type of data in our database and this column must contain only age values.
- horizontally, which means that all data from one, the same table row are assignd to each other.
Data assigned to each otherIn the above table data from column FULL_NAME are assigned to data from column AGE so for example we can easy find age value for specific person.
Let’s check age value for person called Sophis Smith. We have to find Sophia Smith in the FULL_NAME column. In the same row where we found mentioned name and surname we can check her age value in the AGE column. As we can see age assigned to Sophia Smith is 20.
Selected one rowUsing the above database we can check what is the age of specific person which means that data are structured.
In case when we would like to expand our database for example of data about city where our firnd currently live we can easy add one more column, give this column specific name(for example CITY) and there insert this type of data.
Selected one rowNow, if we want to check all data about Spohie we should find her name in the FULL_NAME column and then, in the same row take values from AGE and CITY columns. As we can see both values assigned to Sophie are 20 (from AGE column) and New York (from CITY column), so it means that she is 20 years old and currently lives in New York.
Copyright © 2015-2016 • All Rights Reserved • database-definition.com