Preview

Assignment 1

Good Essays
Open Document
Open Document
1280 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Assignment 1
Prof. Li-Yan Yuan

CMPUT 391: Database Management Systems

Solutions to Assignment 1
Due: 18:00, Feb. 10, 2014, at the 391 Drop Box

1. Present a real-life example (Not using ABCD, etc) to show differences between BCNF and 4NF.
Solution: Consider the following table real_estate(realtor_id,listing_property,customer_name) used to store the information for a real estate company with one MVD constraint

realtor id → listing property | customer name.
It is not difficult to see that real estate is in BCNF but not in 4NF.
2. Consider a database consisting of the following tables with obvious meanings: employee( employee_name, street, city ) works( employee_name, company_name, salary ) company( company_name, city )
Write triggers, according to Oracle style, to enforce the constraint that no employee is allowed to work for a company NOT located in the city where the employee lives. One needs to (1) give a list of events that must be monitored for imposing the constraint, and (2) present one trigger for any event in (1). [20]
Solution:
[1] The following events must be monitored for imposing the constraint:
INSERT OR UPDATE on all three tables.
[2] A trigger for monitoring the INSERT or UPDATE on employee is given below. create trigger employee_location before insert or update on employee for each row declare dummy integer; begin select count(*) into dummy from works, company where works.company_name = company.company_name and
:new.employee_name = works.employee_name and
:new.city company.city; if ( dummy > 0 ) then raise_application_error(-20502, ’no employee shall live in the same city as the location of the company ’); end if; end; 1

3. Consider a relation schema R = ABCDE, functional dependencies
A→ C
B→ C
C→ D
DE → A and a decomposition D = {AC, AD, BE, AB} of R.
Prove or disprove that D is a join lossless decomposition of R with respect the given set of FDs.
A proof can be done by finding an appropriate decomposition

You May Also Find These Documents Helpful

  • Powerful Essays

    a) You are to show each step in your solution: UNF, 1NF, 2NF, 3NF .…

    • 1494 Words
    • 19 Pages
    Powerful Essays
  • Good Essays

    Assignment 1

    • 872 Words
    • 4 Pages

    The IP addresses defined in a DHCP scope must be contiguous and are associated with a subnet mask. If the addresses you want to assign are not contiguous, you must create a scope encompassing all the addresses you want to assign and then exclude specific addresses or address ranges from the scope. So just be sure to check how you have your DHCP…

    • 872 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    Assignment 1

    • 1774 Words
    • 19 Pages

    5. Use easily understandable language to demonstrate an understanding of the materials. Apply the knowledge developed to a similar context [(f) Communicate and Apply Unit 5]…

    • 1774 Words
    • 19 Pages
    Powerful Essays
  • Satisfactory Essays

    Assignment 1

    • 330 Words
    • 2 Pages

    Since the consumption of these more excellent goods is an evidence of wealth, it becomes honorific; and conversely, the failure to consume in due quantity and quality becomes a mark of inferiority and demerit (p3).…

    • 330 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    must be set forth in a written employment contract with the employee, signed by [___position…

    • 881 Words
    • 4 Pages
    Good Essays
  • Better Essays

    Assignment 1

    • 6548 Words
    • 27 Pages

    You will notice that you need to look in different course books for some of the information and not all unit evidence correspond to the matching unit number…

    • 6548 Words
    • 27 Pages
    Better Essays
  • Satisfactory Essays

    Assignment 1

    • 464 Words
    • 2 Pages

    In 300-500 words, write a summary of your job exploration and respond to the following:…

    • 464 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Assignment 1

    • 883 Words
    • 4 Pages

    Up to the age of 3 months a baby will only be able to lie on its back. At around 3 months baby will start lifting their head and kicking their legs vigorously, they will also recognise the face of their main carer as well as bright lights and loud noises. As time passes they will be able to hold objects and transfer them from hand to hand, they will also attempt to put things in their mouth. Mobility usually sets in around 9-12 months. They will be able to sit unaided and will get around by either rolling, crawling, shuffling or possibly walking unaided. They will also have learnt how to throw objects. At 1 year although mobile they will still find balancing difficult but most children of this age will be able to kneel without support and climb stairs with supervision. At 2 years children will be able to walk, run and kick and throw a ball although they may not be confident at catching.…

    • 883 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    assignment 1

    • 1442 Words
    • 6 Pages

    1. Describe two examples of important things that financial planning skills can help you do, and explain why these things are important to you personally. (4-6 sentences. 2.0 points)…

    • 1442 Words
    • 6 Pages
    Powerful Essays
  • Better Essays

    Assignment 1

    • 1535 Words
    • 7 Pages

    Despite the fact that United States is the most affluent country in the world, a significant portion of its citizens have inadequate access to medical care. The barriers to obtaining health care are numerous; perhaps the most difficult hurdle to overcome is the lack of financial resources to pay for it. But the problem of lack of access to health cares for large segments of the population. The largest barrier to obtaining needed care is the lack of financial means to obtain it. The uninsured the underinsured cannot be stereotyped for they include many people who are employed, the elderly, children, minorities, person with handicaps, pregnant women, and other vulnerable populations. A lack of insurance does not translate in some cases to a lack of access to medical care, but it does have a clear impact upon access of health care.…

    • 1535 Words
    • 7 Pages
    Better Essays
  • Satisfactory Essays

    lab prac

    • 648 Words
    • 4 Pages

    Create a project in ACL. Import your data files as tables. Other data import scenarios.…

    • 648 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Dec 10 09:35:12 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> select * from emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM…

    • 731 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Assignment 1

    • 339 Words
    • 2 Pages

    The way people greet each other when they meet for the first time varies from culture to culture. In some cultures, people bow, and in others, they shake hands. How one shakes hands sends an important message about one’s character. In English-speaking countries, shaking hands is the custom. If done properly, a handshake gives the impression of strength and honesty, and if done improperly, it conveys weakness and dishonesty. A proper handshake has four ingredients: pressure, pumps, eye contact, and verbal message.…

    • 339 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Entity

    • 267 Words
    • 2 Pages

    Execute script company_sqlserver.sql that you could download from module web site that will create EMP and DEPT tables. These tables we will use to implement CRUD operations using Entity Framework.…

    • 267 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Visual Basic Tutorial

    • 1968 Words
    • 8 Pages

    The first thing you'll need is a database. Use Access to create this database; it consists of a few simple fields in the tbl_master table:…

    • 1968 Words
    • 8 Pages
    Satisfactory Essays