A COMPARISON BETWEEN LAYERS OF PERSISTENCE USING GOLANG
native driver and GORM
DOI:
https://doi.org/10.31510/infa.v22i1.2233Keywords:
Golang, Native Driver, GORM, Performance, Better PerformanceAbstract
Golang offers two main approaches to data persistence: native driver and GORM. The native driver uses the database/sql package, providing greater control over queries and connections, and ensuring high performance by avoiding additional abstractions. However, it requires more code for transaction management and type conversion. GORM, an ORM for Golang, simplifies database access by allowing operations using Go structures, reducing the need to write SQL manually. It offers ease of use, automatic table mapping, and simplified connection management, but may sacrifice performance for complex queries. In short, the native driver is ideal for applications that require maximum performance and flexibility, while GORM makes code development and maintenance easier. The choice between them depends on the necessary balance between performance, control, and productivity in the project.
Downloads
References
ALURA. GORM ORM: Mapeamento de Objeto Relacional em GO. Disponível em: https://www.alura.com.br/artigos/GORM-orm-mapeamento-objeto-relacional-go?srsltid=AfmBOooNyPnD3Kj1e5jZR0tiuTGPbCTMHvZ0wzAAdbZNIAiMF_SSBGCq. Acesso em 30 mar. 2025.
BERKELEY, c. C. Chapter 5: Sequences and Coroutines. 2015. Disponível em:
http://wla.berkeley.edu/~cs61a/fa11/lectures/streams.html#coroutines.Acesso em 29 mar. 2025
BINET, S. Go-HEP: writing concurrent software with ease and go. Journal of Physics:
Conference Series, IOP Publishing, v. 1085, p. 052012, sep 2018. Disponível em: DOI: https://doi.org/10.1088/1742-6596/1085/5/052012
https://doi.org/10.1088%2F1742-6596%2F1085%2F5%2F052012. Acesso em 29 mar. 2025
CLEMENTE, P. Go (Golang): a linguagem criada pela Google. Disponível em: https://www.rocketseat.com.br/blog/artigos/post/go-a-linguagem-criado-pelo-google. Acesso em 01 abr. 2025
COUNCIL, I. Internet of Things. 2015. Disponível em:http://www.theinternetofthings.eu. Acesso em 01 abr. 2025
GOLANG. Goroutines. 2015. Disponível em: https://Golang.org/doc/effective_go.html/
goroutines. Acesso em 01 abr. 2025
MEIJER, P. D. E. Static Typing Where Possible, Dynamic Typing When Needed: The End of the Cold War Between Programming Languages. 2015. Disponível em: https://www.ics.uci.edu/~lopes/teaching/inf212W12/readings/rdl04meijer.pdf. Acesso em 30 mar. 2025
MICROSYSTEMS, S. Memory Management in the Java HotSpotTM Virtual Machine.
[S.l.], 2006. Disponível em: <http://www.oracle.com/technetwork/java/javase/
memorymanagement-whitepaper-150215.pdf. Acesso em 30 mar. 2025
ORACLE. Java Interfaces. 2015. Disponível em: <https://docs.oracle.com/javase/tutorial/
java/concepts/interface.html. Acesso em 30 mar. 2025
SOARES, J.L.S. Um estudo sobre os mecanismos de concorrência da linguagem GO. Disponível em: https://pantheon.ufrj.br/handle/11422/11452?locale=pt_BR. Acesso em 29 mar. 2025
YAVATKAR, R. Interprocess communication. In: . [s.n.], 2015. cap. 1.3 Message Passing.
Disponível em: http://www.cs.unc.edu/~dewan/242/s04/notes/ipc.PDF. Acesso em 29 mar. 2025
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Revista Interface Tecnológica

This work is licensed under a Creative Commons Attribution 4.0 International License.
Os direitos autorais dos artigos publicados pertencem à revista Interface Tecnológica e seguem o padrão Creative Commons (CC BY 4.0), que permite o remixe, adaptação e criação de obras derivadas do original, mesmo para fins comerciais. As novas obras devem conter menção ao(s) autor(es) nos créditos.


.jpg)


1.png)
1.png)