Relational databases are, well... a collection of data items that have relations between them. These relations are made by associating a one table's primary key with another table's foreign key. It is a great advancement from the old long table that was used to store data which was inefficient in terms of search, memory and space. And as for normalization; it means a process in which tables are structured to eliminate redundancy and repetition among data and the CRUD operations side-effects. And as a direct result we improve the performance of our queries. An example of a relational database would be two tables; one for student and the other for school. Both of these tables have a column for the school id, and so we make a connection between by assigning the first one as a primary key and the other as foreign key.
Stack is like a pile of books placed on top of each other. We can add new books to the top and can remove them from only the top because stacks are LIFO which means last-in, first-out. Queues on the other hand are the opposite, which is FIFO meaning first-in, first-out. So adding an element to the queue will be the same but removing will happen to the first element not the last one. An example of a queue would be the wait line in front of any kind of service we see around us like the bus station or the shops,....etc.
Comments
Post a Comment