Premium Essay

Databases

In:

Submitted By princescent
Words 978
Pages 4
Examples of database and table creation
The following examples use the create keyword to create the sample staff database and define the tables.
These example OQL statements illustrate the use of the column constraints and the default keyword.
Example 1 create database staff; // creates the staff database
The following insert defines the managers table. create table staff.managers
(
EmployeeID int NOT NULL PRIMARY KEY, Name text NOT NULL, Department text default "Sales", Gender text, Age int, unique ( EmployeeID ) // indicates that the data in the // EmployeeID column must be unique.
);
For the managers table:
• The EmployeeID and Name columns cannot be NULL.
• The EmployeeID column is the primary key and must be unique.
• If no value is inserted into the Department column for a given record it takes the value "Sales".
Example 2
The following insert creates the staff.employees table. create table staff.employees
(
EmployeeID int NOT NULL PRIMARY KEY, Name text NOT NULL, Skills list type text, Gender text, Age int // There is no comma here because this // is the last entry.
);
For the staff.employees table:
• The EmployeeID and Name columns cannot be NULL.
• The Skills column is a list of text strings.
Example 3
The following insert creates the staff.contractors table. create table staff.contractors
(
EmployeeID int NOT NULL PRIMARY KEY, Name text NOT NULL,

Similar Documents

Premium Essay

Database

...needed to build a database for the scheduling process. * Describe the advantages and disadvantages of moving the schedule to a database. * Create a graphical representation of your proposed database environment. * Explain how referential integrity can prevent mistakes in a database. Do the advantages outweigh the difficulty of setting it up? * Impress your boss by creating a database in Microsoft Access that will match trainers with courses and meet the following requirements: * Two (2) tables, one (1) containing trainer information and the other containing course information. Create data for five (5) instructors and five (5) courses. The trainer data should include: employee ID number, last name, first name, department, and email address. The course data should include: course number, course name, trainer employee ID number, and training location. * A relationship should exist between the tables. * Use referential integrity to make sure that each course has a valid trainer assigned to it. Week 7 Assignment 4 * Discuss the requirements needed to build a database for the scheduling process. The first step in creating a database is creating a plan that serves both as a guide to be used when implementing the database and as a functional specification after it has been implemented. The complexity and detail of a design is dictated by the complexity and size of the database application as well as the user population. A database can be relatively...

Words: 681 - Pages: 3

Premium Essay

Databases

...University of Phoenix Material Determining Databases and Data Communications Read Scenario 1 and Scenario 2 below. Write a paper of no more than 1,500 words in which you respond to the questions designated for both scenarios. Scenario 1: You are a marketing assistant for a consumer electronics company and are in charge of setting up your company’s booth at trade shows. Weeks before a show, you meet with the marketing managers and determine what displays and equipment they want to display. Then, you identify each of the components that need to be shipped and schedule a shipper to deliver them to the trade show site. You then supervise trade show personnel as they set up the booths and equipment. After the show, you supervise packing the booth and all the equipment as well as schedule its shipment back to your home office. When the equipment arrives, you check it into your warehouse to ensure that all pieces of the booth and all the equipment are returned. If there are any problems due to shipping damage or loss, you handle those problems. Your job is important; at a typical show you are responsible for more than a quarter-million dollars of equipment. • In Scenario 1: o You need to track data about booth components, equipment, shippers, and shipment. List typical fields for each type of data. Provide an example of two relationships that you need to track. o Do you need a database system? If not, can Excel® handle the data and the output? What...

Words: 436 - Pages: 2

Premium Essay

Database

...or the programs in such a way that they become in machine readable form. Once the system is done with the coding stage it tests the systems and sees to it that it is working as per the expectations or not. System implantation is one of the most vital phases as in this phase the analyst actually gives the system to the customer and expects for a positive feedback. Finally, the system maintenance is that the analyst needs to maintain the system and see to it that it working within the standards set. He needs to maintain the system by removing the defects of flaws occurred. I think this relates to database development because in 1960 the developers, Elliott and Strachan and Radford developed large scale functional business systems in an age of large scale business conglomerates. Information systems activities revolved around heavy data processing and number crunching routines. The database is also a design lie...

Words: 368 - Pages: 2

Premium Essay

Database

...DATABASE ASSIGNEMENT ONLINE STORE DATABSE TABLE NAME * STUDENT/CUSTOMER * ENROLLMENT * COURSES * CATEGORY * ORDERS * ORDER DETAILS * PAYMENT * PRODUCT * SHIPPERS * SUPPLIER/COMPANY TABLES ATTRIBUTES STUDENT/CUSTOMER STUDENT table contain attribute such as: * STUDENT ID-PRIMARY KEY * FIRST NAME * LAST NAME * ADDRESS * POSTAL CODE * CITY * STATE * COUNTRY * PHONE * EMAIL * PASSWORD * CREDIT CARD * CREDIT CARD TYPE ID * BILLING ADDRESS * SHIP ADDRESS * DATE ENTERED ENROLLMENT ENROLLMENT table contain attribute such as: * STU ID-PRIMARY KEY * COURSE ID-PRIMARY KEY * SEMESTER-PRIMARY KEY * INTAKE COURSES COURSE table contain attribute such as: * COURSE ID-PRIMARY KEY * COURSE NAME * FACULTY CATEGORY CATEGORY table contain attribute such as: * CATEGORY ID-PRIMARY KEY * CATEGORY NAME * DESCRIPTION * PICTURE * ACTIVE ORDERS ORDERS table contain attribute such as: * ORDER ID * STUDENT ID * PAYMENT ID * SHIPPER ID * ORDER NUMBER * ORDER DATE * SHIPDATE * REQUIRED DATE * SALE TAX * TIME STAMP * TRANSACTION STATUS * FULFILED * DELETED * PAID * PAYMENT DATE ORDER DETAILS ORDERDATAILS table contain attribute such as: * ORDER IDs-PRIMARY KEY * PRODUCT IDs * ORDER NUMBER * PRICE * QUANTITY * DISCOUNT * TOTAL * IDSKU *...

Words: 289 - Pages: 2

Premium Essay

Database

...meet the problems or opportunities of the business. 1) ___A. database analysis____ A) Database analysts B) Users C) Systems analysts D) Programmers TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 2) Database development projects are never done in a bottom-up fashion. 2) __False_ 3) A well-structured database establishes the entities between relationships in order to derive the desired information. 3) _False_ ESSAY. Write your answer in the space provided or on a separate sheet of paper. 4) Provide a brief overview of the various components of the database environment. TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 5) Database processing programs are coded and tested during the design stage of the systems development life cycle. 5) __F__ MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 6) Organizing the database in computer disk storage is done in the ________ phase. 6) _Design__ A) analysis B) design C) implementation D) maintenance 7) A workgroup database is stored on a central device called a(n): 7) __c. server_____ A) client. B) network. C) server. D) remote PC. TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 8) Many of the disadvantages of file processing systems can also be limitations of databases. 8) ___T____ MULTIPLE CHOICE. Choose the one alternative that...

Words: 336 - Pages: 2

Premium Essay

Database

...Software Requirements Specification October 28, 2013 Window App for Sending SMS to mobiles via internet from your computer Submitted by: Muhammad Gulfam Submitted to: Engr. Natasha Nigar Software Engineering Table of Contents Table of contents……………………………………………………………………. List of figures……………………………………………………………………….. 1. Introduction………………………………………………………………….3 1. Purpose……………………………………………………………...3 2. Scope of project……………………………………………………...3 3. Glossary……………………………………………………………...3 4. Overview of document……………………………………………….4 2. Overall Description……..…………………………………………………......5 2.1. System Environment...……………………………………………….5 2.2. Functional Requirement Specification ……………...……………….6 2.2.1. User use cases………………………………………………...6 2.3. User characteristics …………………………………………………….11 2.4. Non Functional Requirements ……………………………….…………11 3. Requirement Specification …………………………………………………..12 3.1 Functional Requirements ……………………………………………12 List of diagrams Fig.1 System Environment ………………………………………………………….3 1.0. Introduction 1.1. Purpose The purpose of this document is to present a detailed description of the Window App for Sending SMS to mobiles via internet from your computer. It will explain the purpose and features of the system, the interfaces of the system, what the system will do, the constraints under which it must...

Words: 2905 - Pages: 12

Premium Essay

Database

...Jackie Tau PT2520/Database March 23, 2013 Lab 1.2 –Define Major Topics for a Database Nouns | Major Topic | Hospitals | Conducting a double blind test of a new depression drug | Doctors | Need to be able to see their own patient’s information and be able to enter blood pressures, blood results, depressions indicators, notes, etc. | Patients | Should be able to see their own medical profile, doctor notes | Drugs | A new drug will be dispersed in generic bottles, given to half of the patients for depression & to test the side effects. | Lab1.3- Create a Statement of Work Grandfield College: There is a law that requires businesses’ including schools, track their software. It is important to know what software the school owns, the versions, & license agreement. They’re a several licensing schemes. The least restrictive is a site that allows am institution to have a copy of the software in any machine in the school property. It is also important for the school to know which software is installed on the machine, location & which users have access. The school just wants to track the faculty & staff computers & software. For students it will be separate & treated as a second project later. Lab 1.4 –Challenge Activity 1. Describe a situation in which the database might become inconsistent. * Transaction failure, database system failure, 2. How could a relational database ensure data consistency? * Data integrity 3. What...

Words: 262 - Pages: 2

Free Essay

Database

...SOURCES FOR INDUSTRIES AND COMPANIES 1. Plunkett Research Online http://cufts2.lib.sfu.ca/CRDB4/BVAS/resource/10747 This is actually a collection of "industry almanac" ebooks from one publisher, rather than a normal article or report database.  Each title will have a general overview of the industry, followed by a long directory of key companies, all in a downloadable ebook format. 2. IBISWorld http://cufts2.lib.sfu.ca/CRDB4/BVAS/resource/10535 IBISWorld includes Canadian, US, China, and Global report modules.  It provides industry reports that touch on things like barriers to entry and concentration, and it includes a list of a few top companies in each industry.  3. MarketLine There are hundreds of MarketLine industry reports in both our ORBIS and Business Source Complete databases. We could also use the same database to extract company reports on major firms in that field. http://cufts2.lib.sfu.ca/CRDB4/BVAS/resource/6022   4. Factiva and LexisNexis are some of the best places to start if you want to start understanding who the key publishers (government agencies, industry associations, etc.) are in a given field.  You may get lots of press releases on strategic alliances, M&As, joint ventures, etc. 5. International Market Research http://www.lib.sfu.ca/help/subject-guides/business/international-market  6. Industry Surveys http://www.lib.sfu.ca/help/subject-guides/business/industry-surveys 7. Passport GMID http://cufts2...

Words: 402 - Pages: 2

Premium Essay

Database

...Database: Database is a group or collection of information which are assembled in such a way that a computer program can easily access the stored information and select required pieces of data. Databases are characterized in such a way that that it helps to store, retrieve, modify and delete data which is linked with various data processing operations. Advantages of Databases: • It helps to control data redundancy by centralizing databases although it is not necessary to eliminate all redundancy because sometimes it is used to store multiple copies of data due to business and technical reasons. • It helps to enforce integrity by enforcing specific integrity constraints which increases data integrity and independence of application programs. • It improves data security by restricting unauthorized access. • It helps to create an environment in which end users have easy access to data which helps them to respond quickly to changes in their environment. • It provides a backup for recovering from hardware or software failures. Disadvantages of Databases: • Database systems come at high cost which includes specific and sophisticated hardware, software and personnel for operating and maintaining this database system. • The complexity and breadth of functionality makes this system an extremely large piece of software which occupies large amount of disk space and requiring substantial amounts of memory to run efficiently. • There is a higher impact of failure due to the centralization...

Words: 252 - Pages: 2

Premium Essay

Database

...IST 792 paper 2 Database security is a growing concern evidenced by an increase in the number of reported incidencets of loss of unauthorized exposure to sensitive data. As the amount of data collected, retained, and shared electronically expands, so does the need to understand database security. (Murray, 2010) Database security concerns the use of a broad range of information security controls to protect databases (potentially including the data, the database applications or stored functions, the database systems, the database servers and the associated network links) against compromises of their confidentiality, integrity and availability. It involves various types or categories of controls, such as technical, procedural/administrative and physical. Database security is a specialist topic within the broader realms of computer security,information security and risk management. Security risks to database systems include, for example: * Unauthorized or unintended activity or misuse by authorized database users, database administrators, or network/systems managers, or by unauthorized users or hackers (e.g. inappropriate access to sensitive data, metadata or functions within databases, or inappropriate changes to the database programs, structures or security configurations); * Malware infections causing incidents such as unauthorized access, leakage or disclosure of personal or proprietary data, deletion of or damage to the data or programs, interruption or denial of...

Words: 524 - Pages: 3

Premium Essay

Database

...Introduction $  $  • Purpose of Database Systems • Data Definition Language • Data Manipulation Language • Transaction Management & ' & • Storage Management • Database Administrator • Database Users • Overall System Structure 1.1 Silberschatz, Korth and Sudarshan c 1997 Database Systems Concepts Database Management System (DBMS) • Collection of interrelated data • Set of programs to access the data • DBMS contains information about a particular enterprise • DBMS provides an environment that it both convenient and efficient to use Database Systems Concepts 1.2 Silberschatz, Korth and Sudarshan c 1997 ' & ' & Purpose of Database Systems $  $  Database management systems were developed to handle the following difficulties of typical file-processing systems supported by conventional operating systems. • Data redundancy and inconsistency • Difficulty in accessing data • Data isolation – multiple files and formats • Integrity problems • Atomicity of updates • Concurrent access by multiple users • Security problems Database Systems Concepts 1.3 Silberschatz, Korth and Sudarshan c 1997 View of Data An architecture for a database system view level view 1 view 2 … view n logical level physical level Database Systems Concepts 1.4 Silberschatz, Korth and Sudarshan c 1997 ' & ' & Levels of Abstraction $  $  • Physical level: describes how a record (e.g., customer) is stored. • Logical level: describes data stored in database, and the relationships among the...

Words: 1023 - Pages: 5

Premium Essay

Database Environment

...The Getty Provenance Institute’s database (The Gettys research institute, 2012) contains 1.1 million records. All of these records can be used for a wide variety of research. According to the institute the database can be used for assistance in finding information for Projects, and for the Study of Collecting. According to the Database, “The J. Paul Getty Museum acquired The Entombment (ca. 1612) by Peter Paul Rubens in a Christie's sale in 1992. At that time, the provenance of the painting could only be traced as far back as the mid-19th century. The number 146, located on the face of the painting, appeared to be an inventory number (the Getty Research Institute, 2012). A search in the Provenance Index's Archival Inventories database retrieved a single record in which the artist name (Rubens) and item number (146) matched. The search lead to a 1651 inventory preserved in the Archivo de la Casa de Alba, Palacio de Liria in Madrid, which lists this Rubens painting. Possibly its first owner was Gaspar de Haro y Guzmán Carpio (1629–1687)”. Other Institutions are not as lucky some. Some Museums are not so fortunate to find the item number associated with the picture. When it is time to introduce the collections into a database, curators of small museums find themselves in a little bit of trouble. The features and capabilities offered by the newer commercial and professional collection systems are more than they will ever need, more than they can support and more than they...

Words: 1164 - Pages: 5

Premium Essay

Database Program

...New Database Program for ACCC Michele Ritchie SCI110 – Introduction to Physical Science Instructor Casey Bethel February 17, 2016 The Scientific Method The scientific method is a way to ask and answer scientific questions by making observations and doing experiments. The steps of the scientific method are to ask a question, do background research, construct a hypothesis, test your hypothesis by doing an experiment, analyze your data and draw a conclusion, and communicate your results. Problem Statement At American Classic Carpet Care, a nationwide commercial and retail carpet cleaner, we have several different databases that we use for our client base. Each database contains a certain type of business contact. For example, one database is for hotels only, another is for restaurants only. Then, we also have separate databases for local work and out of state work. As you can see, one restaurant or hotel could potentially be put in more than one database. Currently, we use the Pro 2011 version of ACT!. This version is not set up to transfer information from one database to the other automatically. Manually transferring information one client at a time is very time consuming. Overview of Alternatives Alternative #1- Upgrade to ACT! Premium: This application allows you to transfer data from one database to the other, along with many other updated features of the ACT! Program. For example, optimized template storage makes it easy to quickly navigate and locate all...

Words: 647 - Pages: 3

Free Essay

No Sql Databases

...INSY 5337 Data Warehousing – Term Paper NoSQL Databases: An Introduction and Comparison between Dynamo, MongoDB and Cassandra Authored ByNitin Shewale Aditya Kashyap Akshay Vadnere Vivek Adithya Aditya Trilok Abstract Data volumes have been growing exponentially in recent years, this increase in data across all the business domains have played a significant part in the analysis and structuring of data. NoSQL databases are becoming popular as more organizations consider it as a feasible option because of its schema-less structure along with its capability of handling BIG Data. In this paper, we talk about various types of NoSQL databases based on implementation perspective like key store, columnar and document oriented. This research paper covers the consolidated applied interpretation of NoSQL system, depending on the various database features like security, concurrency control, partitioning, replication, Read/Write implementation. We also would draw out comparisons among the popular products and recommend a particular NoSQL solution on the above mentioned factors. 1. Introduction Until recently, Relational database systems have been on the forefront of data storage and management operations. The advent of mobile applications that requires real time analysis like GPS based services, banking and social media has led to huge unstructured data being produced every second. Traditional RDBMS systems have found it difficult to cater to these huge chunks of unstructured...

Words: 4246 - Pages: 17

Free Essay

Database

...1.1 Define the following terms: data, database, DBMS, database system, database catalog, program-data independence, user view, DBA, end user, canned transaction, deductive database system, persistent object, meta-data, and transaction-processing application. • Data merupakan satu satuan informasi yang akan diolah dimana sebelum diolah dikumpulkan di dalam suatu file database. Pengumpulan data dilakukan secara sistematis menurut struktur file database. • Database merupakan kumpulan data yang terkait satu sama lain. Atau sekumpulan data yang terintegrasi yang diorganisasi untuk memenuhi kebutuhan pemakai untuk keperluan organisasi. • Dalam database pastinya mengenal istilah DBMS (Databse Management System) yang mana merupakan suatu koleksi dari program yang mana pengguna bisa mengcreate dan memaintain suatu database. Dalam DBMS terdiri atas proses-proses yang harus dilakuka nyaitu defining, constructing, manipulating dan sharing. Komponen-komponen DBMS yaitu terdiri atas hardware, software, data, prosedur, people. Fungsi dari defining yaitu DBMS harus dapat mengolah pendefinisian data. Fungsi dari manipulating DBMS harus dapat menangani permintaan-permintaan dari pemakai untuk mengakses data. Fungsi dari constructing yaitu DBMS harus mengontrol proses pengiriman data ke penyimpanan medium. Fungsi dari sharing yaitu database memperbolehkan banyak orang dan program untuk mengakses database. • Meta data: informasi terstruktur yang bertujuan untuk mendeskripsikan, menjelaskan...

Words: 1618 - Pages: 7