The right combination

Okay, we're making much more progress.

Let's start with an object that you're actually going to put into the database. We'll call this a Person. Now, a Person has a bunch of members - things that are associated with this particular Person. Name, phone number, address, date of birth, etc.

Now, we have a whole bunch of Person objects, each with data in their members. How do we actually make something that we can query?

We create a container that will hold all of these objects. You can then search through this container and select all of the objects that match what you're looking for. This returns a bunch of Person objects, from which you can get the data that you want.

I suggest using a hash or tree as your container. You don't know Data Structures yet, but these are ways of making it so that you don't have to search through every Person in your container to find the one(s) you want.

Finally, how do we query this database?

Well, this is the hard part. If you want it to be available to people in your company, what you're going to do is set up a server that only people in your company can access. You will then create an application that accesses this server and submits a query. The server then queries the database by searching through the container, and then returns the Person(s) who match the query.

Making it accessible only to people in your company is left as an exercise for the reader. Good luck, it's an unsolved problem.

/r/learnprogramming Thread Parent