Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

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.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91709164
  • Price:- $70

Guranteed 36 Hours Delivery, In Price:- $70

Have any Question?


Related Questions in DBMS

Solve the following questions using oracle you are not

Solve the following questions using Oracle. You are not allowed to use the syntax of any DBMS other than Oracle. Make sure to upload an electronic copy of your solution to your CSC335 TRACE folder. Name the file hw4.sql. ...

Assignment -scenario setup a mock phase 3 clinical trial

Assignment - Scenario: Setup a Mock Phase 3 Clinical Trial for evaluating the efficacy of a Blood Pressure/Weight Loss/ or Muscle Strength Enhancement supplement. Assume that the testing takes place at a physician's offi ...

Answer the following question explain the difference

Answer the following Question : Explain the difference between a database management system (DBMS) and a database. Are Microsoft Access, SQL Server, and Oracle examples of databases or database management systems (DBMS)?

Assignmenta restaurant is designing a database to keep

Assignment A restaurant is designing a database to keep track of customer services. A customer is defined as a customer ID, name, address and a telephone number. Customers are served by employees. Each employee is define ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

Question 1 unified communications system eg email

Question: 1. Unified Communications System (e.g., email, conferencing, and messaging) - The local area network is slower than needed, especially for newer, cloud-based applications. The email system needs refurbishment a ...

Backgrounda new training organization called abc

Background A new training organization called ABC TechTraining is opening soon and they have approached you to help design their new database. They have just completed the refurbishment of the premises and are now lookin ...

Database and information retrieval assignment - data

Database and Information Retrieval Assignment - Data Privacy Essay Task - Write an essay (aim for 750 words) that addresses issues associated with data proivacy. Use the Australian Privacy Principles - discussed in class ...

Question create an erd for the following scenario once you

Question: Create an ERD for the following scenario. Once you submit you will get access to the correct way to create the ERD. Please watch the video and correct any errors in your submission and resubmit. A small company ...

Assignment question - write and run sql statements to

Assignment Question - Write and run SQL statements to complete the following tasks Part A - DML 1. Locate the record in the vendor table that does not have a value for the attribute V_STATE 2. Find the customers whose ba ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As