Techiio-author
Started by Jimmy LittleSep 25, 2021

Open
Designing an autocomplete form... Multiple choices from database or pre determined array of choices?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I am developing a web application with Express/MongoDB for the back-end. The user will be able to type a university name, and autocomplete will engage to suggest the possible university names allowed. Since the universities in my list are pre-determined and well-defined, should I simply implement an array of possibilities or should i make a collection of universities in MongoDB and then implement an index to search them?

My problem with going with the first option (implementing of an array of possibilities) is that I want the ability to have database field to be basically an enum with all the possibilites.

My university list has around 500 entries, is it too much to create such enum/validation on the database?

0 Replies

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance