Jump to content
  • Advertisement
Sign in to follow this  

Unity Deciding on a Database Setup...need suggestions.

This topic is 4351 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am writing a program, where I would like the user to be able to use any of the fields I provide to search for records that correspond, either using only one field, or a any combination of the fields available. I am struggling to figure out how to setup the Access DB for my program to use. Do I need to set each field to a Primary Key? or can I still do Select * searches on any of the fields whether or not it uses the primary key field or not? To be more specific, I am new to the whole C++ language and attempting to write a program I am excited about that will help me solidify some of the things I have been learning about C++. However, I am not trying to learn every knuck and cranny of Microsoft Access. I have used it in the past to make very simple DB's, but thought I would turn to the community about how i should approach my above situation. The fields I have available on the GUI that I would like the user to be able to use either individually or together are: Title Description Language Type of Code Application Name Any help is greatly appreciated.

Share this post

Link to post
Share on other sites
In SQL, you can select on any combination of fields, no matter whether they are primary key or not. You can also create additional indices to speed up certain queries, if you need to; these additional indicies do not need to be unique (but can be, for constraint enforcement).

If you have this table:

Bob 18 35000
Robert 35 44000
Bobby 17 99000
Roberta 29 69666
Robbie 40 23450

And say 'NAME' is the primary key, you can still do things like:

select * from EMPLOYEES where AGE < 30 and SALARY > 40000;

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!