Apply the validation rules in table design properties

Assignment Help Database Management System
Reference no: EM131000342

Table

Start by making a table with the usual Names and addresses. Make sure you use the appropriate field types and sizes. There is no need for input masks or primary keys. Here are the fields to include:

Last
First
Street
City
State
Zip
Date of Birth
Check- In Date
Check-Out Date
E-mail
Comments
Photo

Make sure to set the date fields to use Date Picker. Comments field should be Memo/Long Text Type and Photo should be Attachment Type.

Add a Validation Rule for Date of Birth so no one under the age of 18 can be added to the table. Hint: subtract the DOB from today's date and divide by 365.25 (watch the parentheses and pay attention to the arithmetic "order of operations" ) Do NOT use any functions here or in the queries that we did not discuss. (More below on using "today's date" function)

Make a Validation Rule to ensure that the Check Out Date is later than the Check In Date.

Queries:

Make a select query with a calculated field for age, to list only guests between 20 and 40 years of age! Make sure to enter a range of ages in your table so you have something to display.

Make a Parameter query that allows the user to choose which birth month to display. So when the user is prompted for a birth month, they might type in 3, for March, and only the records which have a Date of Birth in March, will display.

Make an Update Query that will add the phrase "Free Champagne for this Preferred Guest" to the Comments field, but only if the guest stays for 8 days or more.

Make a form similar to this one:

Make a Report

How it's done:

Some simple computer arithmetic that you need to calculate age:

As in Excel, the function NOW() indicates the current day and time as supplied by the internal computer clock. This is very handy for date arithmetic that needs to be constantly updated. NOW() if often used in calculations to to add days to an order date, or a subtraction with a birth date to calculate age.

If you were doing this in a query (making a calculated field for Age (you are asked to do this above) you could right-click the column, choose Properties and set the format to Fixed, and Decimals to 0, to avoid long decimals after the number. Just a thought.

Record Level Validation

Validation rules in the table design properties are known as column level as you can only reference one field, such as Amount > 100. (you did this with the Units Field - remember?).

To set a Record Level validation, it's a bit different. First a record level validation is when you need to compare two fields in the same table, such as, Amount Paid must be less than or equal to Amount Owed, or some such thing.

Since Amount Paid and Amount Owed are both fields in the same table, the validation rule comparing them has to be written differently than usual. In a different place.

In Table design view, you must right-click the table (anywhere is fine) and select properties. In the properties panel on the right, enter the validation rule in the Validation Rule slot you see there.

Reference no: EM131000342

Questions Cloud

Differences between neoclassical-institutional explanations : What are the primary differences between the Neoclassical and Institutional explanations of the factors related to income distribution?
Find the electric field on the y axis : Two large parallel copper plates are 15.00 cm apart and have a uniform electric field between them. An electron is released from the negative plate at the same time that a proton is released from the positive plate. Neglect the force of the partic..
Diamonds are forever : One popular advertisement for engagement rings sponsored by the De Beers Diamond company poses the following question to men planning proposal. "Is two months' salary too much to spend?" As the fact pattern points out, the “two-months” rule is not a ..
Calculate the inventory value at the end of 2012 : The retail price index at the end of 2012 was 1.06. Calculate the inventory value at the end of 2012 using the dollar-value LIFO retail method.
Apply the validation rules in table design properties : Validation rules in the table design properties are known as column level as you can only reference one field, such as Amount > 100. (you did this with the Units Field - remember?).
Prepare new contribution format income statement under each : Prepare a new contribution format income statement under each of the following conditions (consider each case independently)
Information entails two unit-of measurement problems : A liter of gasoline in Canada costs about 1.03 Canadian dollars. Explain how this information entails two unit-of measurement problems for a typical U.S. citizen stopping to buy gas in Canada who wants to know how much the gas “really” costs.
Describe the steps hopyard should take to report : Describe the steps Hopyard should take to report this change. What is the effect of the change on 2011 cost of goods sold?
Estimates of the market price of option a : a. What are the prices of option A and D according to the Black-Scholes-Merton model? b. If the stock price changes to $64.5, while other variables stay the same, what would be your estimates of the market price of Option A?

Reviews

Write a Review

Database Management System Questions & Answers

  Draw the er diagram for the company database

Using ER Assist Tool to draw the ER Diagram for the Company Database. The Requirements were discussed in the class.

  Construct a query that can be used on a report

Construct a query that can be used on a report for determining how many days the customer's invoice will require payment if total amount due is within 45 days. Provide a copy of your working code as part of the paper.

  Describe the benefits and current trends of data

write a six to eight 6-8 page paper in which youquestion 1. provide an executive overview that addresses the

  Create a database.

Create a database.

  Create script file to list file in directory in sorted order

Create a script file to list the files in a directory in sorted order, showingonlythe file name, file size, and modification date.Each file's attributes must be on one line per file, in any order.

  What is system r and what are its two major subsystems

What is System R? What are its two major subsystems? How is the data structure of System R different from the relational structure? What is Data Independence?

  Databases can grow in data structure and data capacity

Databases can grow in data structure and data capacity throughout time. At certain times, it is necessary to perform optimization techniques in order to ensure optimal performance of the database.

  Discussed and implemented the mvc design pattern

Find another design pattern which could be used for web based development and write a synopsis on it, pointing out whether it would be applicable for use within your project or not. Comment as applicable on design patterns that other class members..

  Create a schema that supports the company business

Create a schema that supports the company's business and processes. Explain and support the database schema with relevant arguments that support the rationale for the structure

  Data protection and security

Discuss ways that the IT organization can counter the negative impacts of social networking. Explain how the IT organization can maintain an ethical posture while managing organizational behavior related to social networking.

  Modify the clsdatalayer to use a two-step process

Modify the SavePersonnel() function so that instead of just doing a single SQL INSERT operation with all the personnel data, it does an INSERT with only the FirstName and LastName, followed by an UPDATE to save the PayRate, StartDate, and EndDate ..

  Use data mining technique

The software MUST use DATA MINING TECHNIQUES (at least one like classification or association rule mining etc). The work involves analysing loads of the Hospitals data to search for the desired patterns.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd