Vin
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    3
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    1. Which is the main characteristic of the database approach? (A) Self-describing nature of a database system (B) Insulation between programs and data, and data abstraction. (C\) Support of multiple views of the data. (D) All of the above 2. Which is NOT an advantage of using the database approach? (A) Controlling redundancy. (B) Restricting unauthorized access (C\) Providing persistent storage. (D) Reduce complex relationships among data. 3. Which of the following statements about data models is NOT TRUE? (A) Conceptual data models provide concepts that are close to the way many users perceive data. (B) Physical data models provide concepts that describe details of how data is stored in the computer. These are usually specified in an ad hoc manner through DBMS design and administration manuals. (C\) Implementation data models provide concepts that fall between the conceptual and physical data models and are also called representational data models. (D) Self-describing data models combine the description of data with the data values. Examples include XML, Key-value stores, and relational data models. 4. Which of the following statements is NOT TRUE? (A) The three-schema architecture defines the following three levels: external level, transitional level, and internal level. (B) The three-schema architecture can be used to support logical data independence and physical data independence. (C\) A data model is a collection of concepts that can be used to describe the structure of a database. By the structure of a database, we mean the data types, relationships, and constraints that apply to the data. (D) Data independence means that when a schema at a lower level is changed, only the mappings between lower-level and higher-level schemas need to be changed, and the higher-level schemas remain unchanged. 5. Which of the following statements is NOT TRUE? (A) The delete operation can violate only referential integrity. (B) A relational database schema is a set of relation schemas and a set of integrity constraints. (C\) Implicit constraints include domain constraints, key constraints, constraints on NULLs, entity integrity constraints, and referential integrity constraints. (D) The referential integrity constraint states that a tuple in one relation that refers to another relation must refer to an existing tuple in that relation. 6. Which of the following statements regarding the relational model is NOT TRUE? (A) Tuples in a relation do not have any particular order. (B) The degree (or arity) of a relation is the number of attributes of the relation schema. (C\) The order of attributes and their values is not important even though the correspondence between attributes and values is maintained. (D) In general, a relation schema may have more than one key. In this case, each of the keys is called a candidate key. 7. A referential integrity constraint policy that ensures the records with a foreign key are updated when the primary key of the referring record in the reference relation is updated is called a (A) incremental update. (B) incremental delete. (C\) cascading update. (D) cascading delete. 8. Which is NOT a meaning for NULL values? (A) Attribute does not apply to this tuple. (B) The value is beyond the domain range. (C\) Attribute value is unknown. (D) Values exist but are not available. 9. Which of the following statements is NOT TRUE? (A) A 'minimal' superkey is a key. (B) Any key is a superkey but not vice versa. (C\) If a relation has several candidate keys, one is chosen arbitrarily to be the primary key. (D) A foreign key must always reference the primary key of a relation. 10. Which of the following statements is NOT TRUE? (A) A subclass is called a category or union type if the subclass has a single superclass/subclass relationship with more than one superclass. (B) In a specification lattice, a subclass can be a subclass of more than one superclass. (C\) A specification hierarchy has a constraint that every subclass has more than one superclass. (D) A subclass with more than one superclass is called a shared subclass. A: DDDAC BCBDC 5. Consider the following relations form part of a database for a hotel-reservation application: ``` HOTEL(hotelNo, hotelName, City) ROOM(roomNo, hotelNo, type, price) BOOKING(hotelNo, guestNo, dateFrom, dateTo, roomNo) GUEST(guestNo, guestName, guestAddress) ``` Specify the following operation/queries in SQL. (a) List the price and type of all rooms at Howard Hotel. (b) List the details of all rooms at the Howard Hotel, including the name of the guest staying in the room if the room is occupied. (c\) List all single rooms with a price velow $300 per night. (d) List all huests currently staying at the Howard Hotel. (e) Create the table for the realtion ROOM. Assume that the data types of attribute arre as follows: roomNo is 5 charaters (e.g. '10001', '02020'), hotelNo is 5 characters (e.g., 'TW001','US002'), type is 10 characters with variable length (e.g. 'single', 'double', 'family'), and prive is integer. Please specify the corresponding constraints, such as key and referential integrity constraints.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully