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

  Return a result table sorted by patient name

Return a result table that could be used to produce a report, sorted by patient name or date, for a particular week or after a particular date, or a listing of patient visits for patients assigned to a specific social worker

  Analyze the business activity

Data Files needed for this Case Problem: OBrien.accdb (cont. from Tutorial 3) and Tests.bmp O'Brien Educational ServicesKaren O'Brien is using the OBrien database to track and analyze the business activity of her educational consulting company. T..

  What were the consequences to adding 17 thamendment

what were the consequences (both positive and negative) to adding the 17th amendment to the Constitution? Argue whether or not the changes presented by this amendment were consistent with the intent of the Founding Fathers when they wrote the Cons..

  Create a table for patients with information

Create a table (by your own imagination) which comprises the least 25 patients with next information (columns): Calculate average of Value1 for each Gender.

  Advantages and disadvantages of downloading software

Write a 700- to 1,050-word paper describing the steps involved in downloading files and programs from the Internet.

  What the join method is and how it works

What the join method is and how it works. Given the mantra, "Fewer page reads means better performance," describe how an index can improve performance. Refer to one or more figures in the textbook if that helps your description

  Normalize the following relations to 3nf

Do you always have to use the third normal form? Why or why not? What can happen if you do not use the third normal form? Normalize the following relations to 3NF, using the set of functional dependencies listed:

  What dbms component is responsible for concurrency control

Describe the three most common problems with concurrent transaction execution. Explain how concurrency control can be used to avoid those problems. What DBMS component is responsible for concurrency control? How is this feature used to resolve conf..

  Write and execute a variety of queries

Write and execute a variety of queries, based on the introduction to SQL in this to test the functionality of the database. Provide a document listing the SQL query statement and a screenshot of the results. Submit a minimum of 8 queries and the r..

  Design a database to track the company products

Design a database to track the company's products and orders. Choose either an open-source product or a proprietary product to use, and explain your reasons for choosing it. Identify some of the characteristics of database configuration used in yo..

  Explain database models-hierarchical and relational

Explain each of three database models, hierarchical, relational, and object-oriented, and provide specific referenced example of each of these model types implemented in a functioning database

  Explain components represented in cell using mccumber model

Suppose that the security model is required for protection of information in class. Using NSTISSC model, analyze each of cells (i.e. 27 cells related with McCumber model).

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