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 entity-relationship diagram for all of the entities

Note: The counties for the state capitals shown in the figure above are Travis and Williamson counties for Austin TX; Hartford county for Hartford CT; Clinton, Eaton, and Ingham counties for Lansing, MI; Davidson county for Nashville TN; Hughes co..

  Identify the type of dependency

Identify the cardinality between teams and players and between teams and city.

  Question 1explain ten desirable features which may be

question 1explain ten desirable features which may be included in the design of a warehouse. question 2how have to a

  Present an entity-relationship model?

The company has several branch offices. Each branch is identified by a branch_number. The name, address (street, city, ZIP), and revenue_target of each branch office are maintained.

  Triggers important in database systems

What are triggers used for, and why are they important in database systems? Provide an example of a situation where a trigger would be appropriate.

  Description of the relationship represented by scatterplot

Produce a scatterplot of Rent vs. Size (square meters of the apartment) for the rental data in rent.

  Evaluate a dbms in terms of lock granularity

Suppose you are asked to evaluate a DBMS in terms of lock granularity and the different locking levels. Create a simple database environment in which these features would be important.

  Advantages and disadvantages of using data analytics

Analyze the main advantages and disadvantages of using data analytics within the industry or company that you have chosen

  Draw dfd for placing order based on the e-r diagram

Draw a DFD (Context and Level 1) for placing an order based on the E-R diagram shown here.

  Define a structural model

Define a structural model. Why should a systems analyst create one? Give an example of class cohesion for a class named SUPPLIER for your example that supplies car parts. List some of its attributes and at least two OPERATIONS (methods) that would..

  Summarize the difference between on-line transaction

your database has been a hit. you have been called back to the customers headquarters and they want a detailed report

  Find the decryption function and decipher

Find '(2007), '(2008), and '(b), where b is the integer obtained from the last four digits of your student number.

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