Question

In: Computer Science

OWNER (ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME, COMPANY_NAME, EMAIL_ADDRESS, PHONE_NUMBER,TYPE_OF_BUSINESS) PROPERTY (ID, STREET_NUMBER, STREET_NAME, CITY, PROVINCE, ZIP, TYPE,...

OWNER (ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME, COMPANY_NAME, EMAIL_ADDRESS, PHONE_NUMBER,TYPE_OF_BUSINESS)
PROPERTY (ID, STREET_NUMBER, STREET_NAME, CITY, PROVINCE, ZIP, TYPE, EMPLOYEE_ID, OWNER_ID)
EMPLOYEE (ID, NAME, ADDRESS, PHONE, EMAIL, GENDER, POSITION, SALARY, MANAGER_ID, BRANCH_ID)
BRANCH (ID, ADDRESS, PHONE)
RENTOR (ID, NAME, ADDRESS, PHONE, EMAIL)
RENTAL (ID, PROPERTY_ID, RENTER_ID, DATE_SIGNED, START_DATE, END_DATE)
VIEWING (ID, PROPERTY_ID, RENTOR_ID, DATE)
ADVERTISING (ID, NEWSPAPER_NAME, PROPERTY_ID, DATE_OF_AD)

For the above use case for each entity identify their data types and if the fields are required (NOT NULL). Create the ERD document using Word, Excel, PowerPoint documents (or equivalent software) of your choice. Be sure to include Primary/Foreign Key relationship lines between the fields (not the entities) to show the relationship.

This is a database question

Identifies the proper data types of the attributes and include a required indicator

Proper implementation of Primary Key / Foreign Key Relationship LINES

Solutions

Expert Solution

Identifying data types

NOT NULL constraint will specify that NULL is not allowed for that column.

Int NOT NULL is used for ID attribute of each entity as ID is a mandatory column .

Char is used for those attributes which contain strings only e.g. FIRST_NAME, GENDER

Varcahr is used for those attributes which contain a combination is letters and numbers like Email, Address

Float is used for decimal numbers e.g. salary

OWNER (ID int NOT NULL , FIRST_NAME  char(20) NOT NULL, MIDDLE_NAME char(20), LAST_NAME char(20), COMPANY_NAME char(20), EMAIL_ADDRESS varchar(20), PHONE_NUMBER int ,TYPE_OF_BUSINESS  char(50))

PROPERTY (ID int NOT NULL, STREET_NUMBER int , STREET_NAME varchar(20), CITY char(20), PROVINCE char(20), ZIP int, TYPE varchar(20), EMPLOYEE_ID int, OWNER_ID int )

EMPLOYEE (ID int NOT NULL, NAME char(20), ADDRESS varchar(50), PHONE int, EMAIL varchar(20), GENDER char(10), POSITION  varchar(20), SALARY float, MANAGER_ID int NOT NULL, BRANCH_ID int )

BRANCH (ID int NOT NULL, ADDRESS  varchar(50), PHONE int)

RENTOR (ID int NOT NULL, NAME char(20), ADDRESS varchar(50), PHONE int, EMAIL  varchar(50))

RENTAL (ID int NOT NULL, PROPERTY_ID int , RENTER_ID int NOT NULL, DATE_SIGNED  varchar(20), START_DATE varchar(20), END_DATE varchar(20))

VIEWING (ID int NOT NULL, PROPERTY_ID int , RENTOR_ID int , DATE varchar(20))

ADVERTISING (ID int NOT NULL, NEWSPAPER_NAME char(20), PROPERTY_ID int , DATE_OF_AD varchar(20))

Primary key will uniquely identify the records from tables whereas Foreign key is a field in a table that uniquely identifies a row in another table or same table.

Primary key is marked as PK

Foreign key is marked as FK

If this answer is helpful Please give it a thumbs up .Thank You


Related Solutions

Create the table users with four columns: user_id, email_address, first_name, and last_name. Make user_id as the...
Create the table users with four columns: user_id, email_address, first_name, and last_name. Make user_id as the primary key. For each column, use the data type specified in the schema.
Listed below is the relational database schema for an online store(SQL/Java): MEMBER(last_name, first_name, email, password, user,street,...
Listed below is the relational database schema for an online store(SQL/Java): MEMBER(last_name, first_name, email, password, user,street, city, state, zip, card_type, card_no, expiration, name_on_card) book_SALE(listing_no, seller, isbn, condition, price) ORDERS(order_no, buyer, order_date, tot) ITEM(order_no, listing_no) BOOK(isbn, title, author, edition, publisher, keywords) The bold attribute(s) in a relation is the primary key of that relation. The italized attributes in some relations denote foreign keys. The seller attribute in the book_SALE relation is a foreign key to the user attribute in the MEMBER...
Listed below is the relational database schema for an online store(SQL/Java): MEMBER(last_name, first_name, email, password, user,street,...
Listed below is the relational database schema for an online store(SQL/Java): MEMBER(last_name, first_name, email, password, user,street, city, state, zip, card_type, card_no, expiration, name_on_card) book_SALE(listing_no, seller, isbn, condition, price) ORDERS(order_no, buyer, order_date, tot) ITEMS(order_no, listing_no) BOOK(isbn, title, author, edition, publisher, keywords) The bold attribute(s) in a relation is the primary key of that relation. The italized attributes in some relations denote foreign keys. Create/Define the table.
Employee_id First_name Last_name Salary Joining_date Department 1 John Abraham 1000000 01-JAN-13 12.00.00 AM Banking 2 Michael...
Employee_id First_name Last_name Salary Joining_date Department 1 John Abraham 1000000 01-JAN-13 12.00.00 AM Banking 2 Michael Clarke 800000 01-JAN-13 12.00.00 AM Insurance 3 Roy Thomas 700000 01-FEB-13 12.00.00 AM Banking 4 Tom Jose 600000 01-FEB-13 12.00.00 AM Insurance 5 Jerry Pinto 650000 01-FEB-13 12.00.00 AM Insurance 6 Philip Mathew 750000 01-JAN-13 12.00.00 AM Services 7 TestName1 123 650000 01-JAN-13 12.00.00 AM Services 8 TestName2 Lname% 600000 01-FEB-13 12.00.00 AM Insurance And Table Name : Incentives Employee_ref_id Incentive_date Incentive_amount 1 01-FEB-13...
Employee_id First_name Last_name Salary Joining_date Department 1 John Abraham 1000000 01-JAN-13 12.00.00 AM Banking 2 Michael...
Employee_id First_name Last_name Salary Joining_date Department 1 John Abraham 1000000 01-JAN-13 12.00.00 AM Banking 2 Michael Clarke 800000 01-JAN-13 12.00.00 AM Insurance 3 Roy Thomas 700000 01-FEB-13 12.00.00 AM Banking 4 Tom Jose 600000 01-FEB-13 12.00.00 AM Insurance 5 Jerry Pinto 650000 01-FEB-13 12.00.00 AM Insurance 6 Philip Mathew 750000 01-JAN-13 12.00.00 AM Services 7 TestName1 123 650000 01-JAN-13 12.00.00 AM Services 8 TestName2 Lname% 600000 01-FEB-13 12.00.00 AM Insurance Write the following queries: 1. Get all employee details from...
A property owner who owes 6 mils in school taxes, 12 mils in city taxes, and...
A property owner who owes 6 mils in school taxes, 12 mils in city taxes, and 8 mils in county taxes and who qualifies for a $10,000 homestead exemption would owe how much in property tax on a property assessed at $56,000?
Product(p-id, p-name, weight) Retailer(r-id, r-name, city) Sells(r-id, p-id, price)
  Product(p-id, p-name, weight)Retailer(r-id, r-name, city)Sells(r-id, p-id, price) r-id is a foreign key referencing Retailerp-id is a foreign key referencing Product Give a Relational Algebra expression : (IT IS NOT SQL) (a) Find the names of the retailers who are selling the products that have a weight greater than 10 kg.(b) Find the names of the retailers who have never sold a product that has a weight greater than 10 kg.(c) Get the price of the products that have a...
Typhoid Mary’s Pandemic The City of Covid, located in Corona County, in the province of Ontario,...
Typhoid Mary’s Pandemic The City of Covid, located in Corona County, in the province of Ontario, was having a contagion outbreak. A novel disease had been spreading around the world. Although the death rate was very low and was restricted to the elderly, this disease was very contagious and spread through aerosol contact. Which meant that the moisture that people exhale could carry this virus to anyone. The virus had been found to be potentially deadly to the elderly and...
The following table shows information on some poverty-related variables for 5 provinces. Province ID Income per...
The following table shows information on some poverty-related variables for 5 provinces. Province ID Income per capita (in thousands of CA$) Share of welfare recipients Average life expectancy A 45 0.05 75 B 22 0.10 66 C 32 0.08 70 D 56 0.01 80 E 70 0.01 85 Rank the provinces from poorest to richest after computing a basic (standardized) poverty index in which income per capita is weighted ½, share of welfare recipients ¼ , average life expectancy ¼....
Discuss the “Comparison” or “Comparable” type of approach to value property and what type of property?
Discuss the “Comparison” or “Comparable” type of approach to value property and what type of property?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT