Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DreamHome wants to add the capacity to store information about Auctions to its database. This will include functionality to store properties for sale ( as
DreamHome wants to add the capacity to store information about Auctions to its database. This will include functionality to store properties for sale as opposed to for rent store details about when an auction happens, and what houses were sold at that auction. A consultant has been commissioned to model these business requirements, and has produced the following RMap: Figure RMap: PropertyForSale propertyNo address, postcode, propertyType, rooms, listingPrice, ownerNo, staffNo, branchNo; Auction auctionNo date, auctionAddress, branchNo; AuctionedProperty auctionNo propertyo, finalBidAmount, soldFor; The consultant included some notes about constraints: Figure Constraints Constraints: listingPrice must be greater than $ auctionAddress can be NULL, this means it is at the property for sale address. soldFor is $ by default. finalBidAmount can be NULL, this means the soldFor price is the same as the finalBidAmount. In the 'PropertyForSale' table: ownerNo, staffNo and branchNo reference the attributes of the same name in the PropertyOwner, Staff and Branch table respectively. In the 'Auction' table: branchNo references the attribute of the same name in the Branch In the 'AuctionedProperty' table: auctionNo and propertyNo references the attributes of the same name in the Auction and PropertyForSale tables respectively. Some sample tables have been included to help determine datatypes Figure Data: PropertyForSale Figure Data: PropertyForSale Auction AuctionedProperties Your task is to create a SQL script DreamHomesAuctions.sql that will execute to create these tables in a MySQL database. Be sure to include: all tables and their attributes, primary keys, foreign keys, any constraints. Your script should be able to be executed in one run without errors.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started