Wednesday, May 27, 2015

DATABASES - QUERY DATA

DATABASES - QUERY DATA

In today's lesson, we started looking up data by using Query Design. Query Data is useful because it sorts information, looks for patterns and lets you find information you are looking for. Attached below are images of what I did and how I did them.

In the first screenshot, I went on query design and put in <2000 (less than 2000) in the engine capacity field.


I then pressed run and all the data with <2000 engine capacity cars showed up like this:


In the third screenshot, again I went on query design and put in <=2000 (less than or equal to 2000) in the engine capacity field.



I then pressed run and all the data with <=2000 engine capacity cars showed up like this:


In query design I put in >2000 (greater than 2000) in the engine capacity field.


I ran the data and all the cars with >2000 engine capacity cars showed up like this:


In query design I put in >=2000 (greater than or equal to 2000) in the engine capacity field.


I ran the data and all the cars with engine capacity >=2000 showed up like this:


In query design I put in 'BETWEEN 1000 AND 3000' in the engine capacity field.


I ran the data and all the cars with engine capacity between 1000 and 3000 showed up like this:


In query design I put in 'audi OR BMW' in the manufacturer field.


I ran the data and all the audi or BMW cars showed up like this:


In query design I put in 'audi' in the manufacturer field and >3000 (greater than 3000) in the engine capacity field..


I ran the data and all the audi cars that have engine capacity greater than 3000 showed up like this:


In query design I put in 'not audi' in the manufacturer field.


I ran the data and all the cars except audi showed up like this:


In query design I put in this sign '*' in the manufacturer field as this searches all the cars in the database.


I ran the data and all the cars in the database showed up like this:


In query design I put in 'Is Null' in the manufacturer field as this searches for blank fields in the database.


I ran the data and all the blank fields in the database showed up like this:



'Is Null' is would be used and is useful because if the user has forgotten to fill in some records and they want to fill them in, they can use Is Null to get the blank record and continue to fill in the record.

The difference between Or and And is that Or is if you want to search any one of your chosen record/ data (at least one condition that you entered would show up). And is when you want to search for 2 conditions not only one of them (eg. Audi and <3000 would search all Audi cars that have an engine capacity less than 3000). You have to know the correct time to use OR and AND because they are very different and mean totally different things so you have to be careful and watch out otherwise your data won't come up as you wanted.

When you want to sort the fields, you write in your data and click on sort, use the drop down list and choose ascending or descending and that is how you sort the fields. This is useful because it lets you sort your fields and choose whether you want your data to loom up ascending or descending.

This was an interesting part to the lesson as we learned how to use databases and search for data that we specifically need.


Wednesday, May 6, 2015

DATABASES

DATABASES

In today's lesson, we started a new topic - Databases. We started using the Microsoft Access software. First, we started of by making a form. We then added the information in the correct data areas and then made it look nice by changing the background colours, the font and adding a picture. This is how my form looked:



The second part of the lesson was setting up the information type in design view. 
First we added information about cars and the picture below is the type of information we added. 


Then, we went to design view and added some information and set some things so the user can only put a certain amount of information at a time.
This is how the design view looks.



We  then set up the information. First we changed the field size of the model to 20 like this:


Now the user will not be able to type in more than 20 letters as I previously changed the field size to 20.


Then we changed the engine capacity information in the input mask section to only let someone to add 4 digits of information and no more. We called it CC.


Now the user will not be able to put in more than 4 numbers in the engine capacity section. This is how the engine capacity information looked in the actual view.


We then changed the transmission field to only let the user to select automatic or manual. To do this, we used Lookup Wizard. The picture below shows how we used Lookup Wizard.


Now the user will only be able to choose from automatic or manual.



The last step was changing the price currency to pounds by going on the format option at the bottom and changing the currency to whatever you want like shown in the image below:


Now when the user enters in a price, it will automatically change into dollars.



This was our task to do for 2-3 lessons. It was challenging and took a while to get the hang of it but I soon got used to it.