Please enable JavaScript.
Coggle requires JavaScript to display documents.
Database Unit 18 (Report (A more presentable way to show specific, wanted…
Database Unit 18
Report
A more presentable way to show specific, wanted data and can be based off a query.
-
-
Table
To get information to form a table (essentially the data that will be in the table) you can import a spreadsheet as a text file.
In design view you can add validation rules so that data entry is limited and that mistakes are reduced.
You can edit the data type and make a drop down menu and limit the entries to the menu by using the lookup wizard in the design view section.
Setting a primary key
The primary key is a field that contains data that is unique for each record. A car dealership may use a car's registration or number plate as a primary field to set apart two cars of the same colour, make and model.
-
Data is validated or checked to see if it meets certain rules when entered into a field. It cannot be checked for accuracy. For example, a validation rule may only allow mobile phone numbers that are 11 digits long, but the mobile number itself could be wrong.
-
Range check – number entered must be within a certain range, eg between 1-100.
List check – only specific data can be entered, eg male or female.
-
Input mask – data must be entered in a specific way, eg including a space between the first and last part of a postcode.
data types inculde:
-
-
'currency' – euro, pound, dollar, etc
-
-
-
A relational database has more than one table and the tables are linked using key fields. For example, a library database could have three tables:
customer - when a customer joins the library a record is created. It stores their details such as their first name and surname and includes a unique Customer ID.
book - each book in the library has a record. It stores details about the book, such as the author and title and includes a unique book ID.
lending - when a customer borrows a book, the lending table stores the customer's unique ID and the book's unique ID in a record. The record could also include additional information such as when the book was borrowed and when it's due back.
query
-
-
AND - use to find all records where the make is a Ford AND the price is less than 8000. This would return the Fiesta but not the Mondeo.
OR - use to find all records where the make is a Ford OR Rover. This would only return the Ford Fiesta, the Ford Mondeo and the Rover 200.
NOT - use to find all records where the make is NOT Citroen. This would return all records except the Citroen C4.
In query language, the above examples would look similar to this:
-
-
-
-