Preview

It203 Homework 5

Satisfactory Essays
Open Document
Open Document
319 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
It203 Homework 5
Ernest Arnesto
IT203-E4
Homework #5
2/5/2012

Review Questions 6, 8, and 9
6. How is a primary key specified?
A primary key is specified by the selecting the column, right-clicking, then selecting Set Primary Key.

8. How is a relationship created in SQL server?
In the table design view, right click the column name of the entity you want to create a relationship with and then select "Relationships" which opens the Properties window with the Relationships tab selected. Click on "New" and then verify the "Primary key table" and "Foreign key table". Select the primary key from the grid below the "Primary key table" name (left side of grid) and then select the column name you right-clicked on earlier from the grid below the " Foreign key table" name (right side of grid). Selecting each one in turn sets the two into the desired relationship.

9. How is a concatenated primary key created?
In the table design view of SQL Server, select all the columns that make up the primary key and then select Set as Primary Key.

Discussion Questions 4 and 5
4. Explain how referential integrity is set up in SQL Server.
When you have your Foreign Keys set up correctly, and have Cascade Update & Cascade Deletes set as needed, that's just about all you really need to do. It is used to make sure that data doesn't get orphaned.

5. What restrictions does referential integrity place on the way data is entered into tables?
Once the tables are created and the relationship is established, the data can be entered. In general, data can be placed in tables containing foreign keys only after the data is entered into the tables that they reference. This restriction means that data must be inserted first into the MEMBER table. If not, the data for the VISIT table will be rejected for the referential integrity

You May Also Find These Documents Helpful

  • Satisfactory Essays

    PT2520 Unit7Labs Tramil

    • 330 Words
    • 1 Page

    2. What is a primary key? Each table usually has one column designated as a primary key . This key uniquely identifies each row in the table.…

    • 330 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    No Ans: CREATE TABLE dept (deptno NUMBER(2) NOT NULL, dname VARCHAR2(30) NOT NULL, loc VARCHAR2(20) CONSTRAINT deptno_pk PRIMARY KEY (deptno)); b. Table name: EMP i. Column datatype Mandatory? PK? FK?…

    • 1169 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    # Select a primary key for each table as indicated in the provided ERD diagram.…

    • 694 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Referential Integrity exists when every foreign key relates to an existing primary key. There are no orphan records in child tables that have no reference in a parent table.…

    • 327 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    7) In a one-to-many relationship, each row on in the primary key table can be related to any number of rows in the foreign key or child table.…

    • 613 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    a guide to mysql ch 7

    • 1287 Words
    • 9 Pages

    During the CREATE TABLE command, but can be modified using the ADD PRIMARY KEY command…

    • 1287 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    List the relational operators and logical operators that can be used to form a validation rule.…

    • 636 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Drm Exma Ii

    • 10378 Words
    • 42 Pages

    The _____ is the structure that contains descriptions of objects such as tables and views created by users.…

    • 10378 Words
    • 42 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Mappy EDR

    • 256 Words
    • 2 Pages

    1. Convert the ER Diagram below to a list of tables. Be sure to identify primary keys and foreign keys.…

    • 256 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Sap Bods-Hana

    • 5196 Words
    • 21 Pages

    2. Enter a table name and create as many columns as you wish by defining the names, data types and other…

    • 5196 Words
    • 21 Pages
    Powerful Essays
  • Powerful Essays

    Google

    • 2503 Words
    • 11 Pages

    • • • • CREATE DATABASE CREATE TABLE DROP TABLE ALTER TABLE Create a new database Create a new table in a database Remove a table from a database Change the specifications of a table…

    • 2503 Words
    • 11 Pages
    Powerful Essays
  • Powerful Essays

    dbms

    • 19259 Words
    • 78 Pages

    The language that requires a user to specify the data to be retrieved without specifying…

    • 19259 Words
    • 78 Pages
    Powerful Essays
  • Powerful Essays

    Answer the MCQs in the attached Answer sheet provided at the end of the exam paper. 1. Which of the following is NOT a level at which data can be described in the database? A. External B. Schematic C. Conceptual D. Internal E. None of the above 2. Which of the following should always be TRUE for a primary key in a relational model? A. The primary key of a table serves to uniquely identify individual rows of the table. B. The primary key of a table is allowed to be null. C. Non-key columns are not dependent on the primary key. D. A primary key may not consist of more than one column. E. It is a key that is used as a reference to relate one entity to another entity. 3. __________ is the software that manages and controls access to the database. A. Database B. Database Application C. Database System D. DBMS E. None of the above 4. DDL allows A. Users to define a database B. Users to delete data C. Users to insert data in a database D. Users to update data from a database E. None of the above 5. Dependency based on only part of a composite primary key is called A. B. C. D. E. Functional dependency.…

    • 2464 Words
    • 10 Pages
    Powerful Essays
  • Good Essays

    Database Normalization

    • 344 Words
    • 2 Pages

    In addition, the normalization process ensures that rows are not identical, despite their order, and they have precise data about an entity. All existing columns are unique and they can be in any other. Each column has entities of the same type and their attributes. Moreover, the tables clearly state what kind of information is required and their cells only have a single value.…

    • 344 Words
    • 2 Pages
    Good Essays
  • Good Essays

    6. Type Lastname and press Tab or Enter to move to Data Type. Click on the right mouse button to display a list of option. Choose Primary key ( Notice the key symbol at the space before the Lastname will disappear).…

    • 1586 Words
    • 11 Pages
    Good Essays

Related Topics