Creating Database 2010
Upcoming SlideShare
Loading in...5
×
 

Creating Database 2010

on

  • 501 views

Starting a database

Starting a database

Statistics

Views

Total Views
501
Views on SlideShare
497
Embed Views
4

Actions

Likes
0
Downloads
7
Comments
0

2 Embeds 4

http://www.linkedin.com 3
http://www.lmodules.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Creating Database 2010 Creating Database 2010 Presentation Transcript

  • Database
  • Stages in Creating a Database
    • Define Business Requirements
    • Choosing a Database Platform
    • Creating the Database (SQL)
  • I. Define Business Requirements
    • Types of Databases
    • Desktop Databases- oriented toward single-user applications and reside on standard personal computers (Ex. Microsoft Access, FoxPro, FileMaker Pro, Paradox and Lotus Approach)
    • Server Databases - geared toward multi-user applications. These databases are designed to run on high-performance servers and carry a correspondingly higher price tag. (Ex. Microsoft SQL Server, Oracle and IBM DB2)
    • Types of Databases
    • (continuation)
    • Web-enabled Databases - Nowadays, almost every database application calls for some kind of web interaction. Many people assume that if you're looking to publish your database on the Internet, you need to use a server database. That's not necessarily true -- a desktop database could (inexpensively!) meet your needs
  • II. Choosing a Database Platform
    • Who will be the users of the database and what tasks will they perform?
    • How often will the data be modified? Who will make these modifications?
    • Who will be providing IT support for the database?
  • II. Choosing a Database Platform
    • (continuation)
    • What hardware is available? Is there a budget for purchasing additional hardware?
    • Who will be responsible for maintaining the data?
    • Will data access be offered over the Internet? If so, what level of access should be supported
  • III. Creating the Database (SQL)
    • Syntax or command in SQL:
    • To create a database:
    • CREATE DATABASE personnel
    • To be sure that we are in the correct database by issuing a USE command:
    • USE personnel;
    • To create table:
    • CREATE TABLE employees ….
  • III. Creating the Database (SQL)
    • (continuation)
    • We can use the ALTER TABLE command to add this attribute to our existing database. We want to store the salary as an integer value. The syntax is quite similar to that of the CREATE TABLE command, here it is:
    • ALTER TABLE employees
    • ADD salary INTEGER NULL;
    • Similarly, the command below would be used to remove the entire employees database:
    • DROP DATABASE employees
    • to add records to an existing table. INSERT INTO personal_info values('bart','simpson',12345,$45000)
  • III. Creating the Database (SQL)
    • (continuation)
    • To retrieve the specific information they desire from an operational database. Note that the asterisk is used as a wildcard in SQL. This literally means "Select everything from the personal_info table." SELECT * FROM personal_info
    • Finally, the WHERE clause can be used to limit the records that are retrieved to those that meet specified criteria. The CEO might be interested in reviewing the personnel records of all highly paid employees. The following command retrieves all of the data contained within personal_info for records that have a salary value greater than $50,000: SELECT * FROM personal_info WHERE salary > $50000
    • SELECT select_list FROM source WHERE condition(s) GROUP BY expression HAVING condition ORDER BY expression
  • III. Creating the Database (SQL)
    • (continuation)
    • The UPDATE command can be used to modify information contained within a table, either in bulk or individually. Each year, our company gives all employees a 3% cost-of-living increase in their salary. The following SQL command could be used to quickly apply this to all of the employees stored in the database: UPDATE personal_info SET salary = salary * 1.03 On the other hand, our new employee Bart Simpson has demonstrated performance above and beyond the call of duty. Management wishes to recognize his stellar accomplishments with a $5,000 raise. The WHERE clause could be used to single out Bart for this raise: UPDATE personal_info SET salary = salary + $5000 WHERE employee_id = 12345
  • III. Creating the Database (SQL)
    • (continuation)
    • The DELETE command with a WHERE clause can be used to remove his record from the personal_info table: DELETE FROM personal_info WHERE employee_id = 12345
    • Joining tables
    • Example of 2 tables (personal_info, disciplinary_action) joined together and are joined together by employee ID and whose salaries were greater than 40000
    • SELECT personal_info.first_name, personal_info.last_name, disciplinary_action.comments FROM personal_info, disciplinary_action WHERE personal_info.employee_id = disciplinary_action.employee_id AND personal_info.salary > 40000
  • Comments
    • This is a brief introduction in creating a database. There’s a lot of things to take in consideration in creating a database depending on a case by case basis. Numerous variables, data gathering, finding what kind of resources are available to you and so on. Creating a database needs a lot of planning to make it a success the first time you launch it. It’s better to create this slowly and in the process you keep on reevaluating everything that are involve in the project. Numerous revisions and planning are required. This requires patience and diligence in making a good database.
    • Some could create this very fast at the expense of numerous debugging later on or changing the formats, changing the queries and the reports. I don’t recommend this. I prefer to do in slow but sure. Repairing something is more tiring and time consuming than creating it the first time around. In creating something, you have full focus, there’s excitement and there’s enthusiasm involved but not in repairing something.
    • This is just the start, to know more check the Internet or read books or go to school. Happy creating your database!
  • Source
    • http://databases.about.com/od/sql/a/tables.htm
    • Thank you for watching!
    • ****The End***