Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed


follow us on Twitter





Brocade Doubles Down on 16 Gbps Fibre Channel

Microsoft Wants iOS Apps to Run on WP7

Avaya Debuts New Virtual Services Switch
Database Journal |DBA Support |SQLCourse |SQLCourse2







Technical Specialist – Pre-sales (MA)
Next Step Systems
US-MA-Littleton

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

SQL etc

August 16, 1998

Introduction to Databases for the Web: Pt. 1 - Page 9

By Selena Sol

Logging on to the Database

It is important to note that for most databases, you will actually need to log on. That is, most databases implement a security system that gives various users different privileges to do different things such as READ ONLY or READ/WRITE.

Most likely, your database administrator will have provided you with a login name and a password. She will also have either provided you with the net address of the database so you can log in remotely, or has given you a direct command line shell.

Once you are logged in to a database, you can begin to populate the database with data or extract already existing data. Let's look first at populating the database.

A Sample Database

Okay, let's define a simple relational database that we can use to practice with...

We will define a database called "MY_COMPANY" with four tables, "CLIENTS", "EMPLOYEES", "PRODUCTS", and "SALES". These tables will look something like the following:

EMPLOYEES Table
EMP_NUM EMP_NAME EMP_COMMISSION EMP_SALARY
001 Lim Li Chuen 10% 90,000 USD
002 Lim Sing Yuen 20% 40,000 USD
003 Loo Soon Keat 20% 50,000 USD

 

CLIENTS Table
C_NUM C_NAME C_ADDR C_CITY C_STATE C_ZIP C_PHONE
001 Jason Lim 100 W 10th St LA CA 90027 456-7890
002 Rick Tan 21 Jack St LA CA 90031 649-2038
003 Stephen Petersen 1029#A Kent Ave. LA CA 90102 167-3333

 

PRODUCTS Table
P_NUM P_QUANTITY P_PRICE
001 104 99.99
002 12 865.99
003 2000 50.00

 

SALES Table
S_NUM P_NUM S_QUANITY S_AMOUNT E_NUM C_NUM
001 001 1 99.99 101 102
002 001 2 199.98 102 101
003 002 1 865.99 101 103

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

SQL etc Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 



Latest Forum Threads
SQL etc Forum
Topic By Replies Updated
get records within same group and with condition jutiyi 3 January 12th, 03:07 PM
Database SQL help needed to check date range clashes! deadlydragon121 7 January 9th, 02:47 PM
Remove Alpha from data in Column disk244 0 November 19th, 11:13 AM
sql query releatıon record show and sub total and grand total thank you for your howerlover 0 November 18th, 01:55 AM