Skip to main content

Databases and ORMs

ORM or Object-relational mapping is a method to access and manipulate objects without having to consider how such objects relate to their data sources. With ORMs the code needed to manipulate our data is encapsulated and hidden in a way that we don't need to work with SQL directly; we just interact with the object in the same language we're using.

Image result for ORM

ORMs provide the user with many advantages such as: It saves a lot of time thanks to writing DRY code and MVC code and you're not supposed to write poor SQL statements. And it's more flexible. As for the weak points, they're not lightweight tools and we need to learn them. Also SQL does better in big projects than them.

Examples:
1- Javascript: Sequilize, Bookshelf.js and Mongoose
2- Java: Hibernate.
3- C#: Entity Framework

And to conclude this blog I'm going to say that we shouldn't always go for ORMs but instead try working with SQL implementations like MySQL and others. It all depends on the specific needs of the application underdevelopment.

Comments

Popular posts from this blog

Deployment In Simple Words

Deployment is the hardest part in the lives of computer coders, it's harder than making apps and games. Any game that you have ever used for example on your computer had to go through many operations to be in the final form it is when you first bought it. The last operation is deployment as you might have guessed. It's about getting your video game ready to use and play on any computer out there. Many issues could happen while deploying the game since we have many environments to deal with these days.

Relational Databases

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.

Full Stacks From My Point of View

For the past couple of years I have been learning how to work with front-end languages and technologies like HTML, CSS and a little bit of  Javascript. However,  I have never really touched upon the backend until this month. It was challenging at first and we spent most of our time getting ourselves familiar with the new syntax and the many many many frameworks and libraries that are usually used together in combo when working on this side. Fullstack web development means creating an application and taking care of everything concerning it's functionality and UI.  We've been learning the basics of Javascript for the past couple of months and a little bit of CSS, HTML and jQuery.Now in the immersive we learned more front-end frameworks like backbone/react and angular. And for the backend we learned the basics of nodejs and express. For persistence of data we learned how to use sqlite3, mysql, knex, bookshelfjs and mongodb which I really liked. Putting a...