This first article addresses the creation of a small Oracle database. It was used Oracle Express 10g, which can be freely downloaded from http://www.oracle.com/technetwork/database/express-edition/downloads/102xewinsoft-090667.html. There is a more recent version of Oracle Express, the 11g release 2, which may be downloaded from http://www.oracle.com/technetwork/database/express-edition/downloads/index.html and with which the example shall also execute correctly.
After installing Oracle, we may access the database administration tool by going to button Start --> All Programs --> Oracle Database 10g Express Edition --> Go to the Database Home Page or, in a browser, go to http://localhost:8080/apex.
Then, it shall appear a page for us to login in the administration tool:
After logging in the work space appears:
At this point, we must, in the first place, create a new user (Administration --> Database Users --> Create User). We have created user libraryuser, which will then be used to create the database tables, and also to access the database from the Java application. It is needed to grant the new user privileges for CREATE TABLE and CREATE SEQUENCE, and we may also grant him privileges to CREATE VIEW, CREATE PROCEDURE, and CREATE TRIGGER.
The user name of the user with which the database tables are created will then be set as a prefix to the database tables (schema) and, depending on the privileges granted to him, he/she may be restricted to his/her "own" tables.
The reference to a table column, in Oracle, has the following structure:
"schema"."table"."column"
The schema name may have 30 bytes, the table name another 30 bytes, and the column name still more 30 bytes.
The total length of a column identifier may, then, be up to 98 bytes (if we count the dots and commas).
We, then, shall not use the user SYSTEM to create user tables in the database, and even less to access the database from a software application.
Of course, in this toy application this isn't an important issue.
The next step is to logout from the SYSTEM account, in the administration tool, and login as the newly created user (libraryuser).
Now we can create the tables that we need for our application's database, which will be created within schema libraryuser, because that is the user that we'll be using in their creation.
We want to create tables according to the following model:
Now, let's create the tables.
Here is the process for creating the table AUTHOR:
Table Author has a Primary Key, which we want to be populated from a new sequence:
ORACLE will create the new sequence and a trigger for populating the primary key.
Table AUTHOR has no foreign keys, nor other check constraints.
But, note that, in our database schema, table BookAuthor must have two foreign keys (referencing Book and Author), and table BookCopy must have one foreign key referencing Book.
After all tables being created...
If you have any trouble, please put you questions as comments to this article.
Other related articles:
- Example of Java Swing Application with Oracle Database - 2
- Example of Java Swing Application with Oracle Database - 3
- Example of Java Swing Application with Oracle Database – 4
I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described.
ReplyDeleterpa training in bangalore
best rpa training in bangalore
RPA training in bangalore
RPA courses in bangalore
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.
ReplyDeleteI like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
Java training in Chennai
Java training in Bangalore
Java online training
Java training in Pune
Good Post, I am a big believer in posting comments on sites to let the blog writers know that they ve added something advantageous to the world wide web.
ReplyDeletepython training in chennai
python course in chennai
python training in bangalore
The site was so nice, I found out about a lot of great things. I like the way you make your blog posts. Keep up the good work and may you gain success in the long run.
ReplyDeleteData Science Training in Indira nagar
Data Science training in marathahalli
Data Science Interview questions and answers
Data Science training in btm layout
Data Science Training in BTM Layout
Data science training in kalyan nagar
Excellent blog, I wish to share your post with my folks circle. It’s really helped me a lot, so keep sharing post like this
ReplyDeleteAWS Training in Bangalore
it is very good information sharing about informatica .Thanks for sharing These type information. so much informative is here keep going..thanks lot!!
ReplyDeleteAndroid Training in Chennai
Android Online Training in Chennai
Android Training in Bangalore
Android Training in Hyderabad
Android Training in Coimbatore
Android Training
Android Online Training
cami avizesi
ReplyDeletecami avizeleri
avize cami
no deposit bonus forex 2021
takipçi satın al
takipçi satın al
takipçi satın al
takipcialdim.com/tiktok-takipci-satin-al/
instagram beğeni satın al
instagram beğeni satın al
btcturk
tiktok izlenme satın al
sms onay
youtube izlenme satın al
no deposit bonus forex 2021
tiktok jeton hilesi
tiktok beğeni satın al
binance
takipçi satın al
uc satın al
sms onay
sms onay
tiktok takipçi satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
instagram beğeni satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
takipcialdim.com/instagram-begeni-satin-al/
tiktok takipçi satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
instagram beğeni satın al
perde modelleri
instagram takipçi satın al
takipçi satın al
instagram takipçi satın al
betboo
This post is so interactive and informative.keep update more information...
ReplyDeleteJava Training in Tambaram
java course in tambaram
This post is so interactive and informative.keep update more information…
ReplyDeleteData Science Training in Anna Nagar
Data Science course in Chennai
Smm Panel
ReplyDeleteSMM PANEL
iş ilanları blog
İnstagram takipçi satın al
HIRDAVAT
beyazesyateknikservisi.com.tr
SERVİS
JETON HİLE
maltepe lg klima servisi
ReplyDeletekadıköy lg klima servisi
maltepe alarko carrier klima servisi
kadıköy alarko carrier klima servisi
maltepe daikin klima servisi
kadıköy daikin klima servisi
çekmeköy toshiba klima servisi
ataşehir toshiba klima servisi
çekmeköy beko klima servisi
nft nasıl alınır
ReplyDeleteuc satın al
lisans satın al
minecraft premium
en son çıkan perde modelleri
en son çıkan perde modelleri
özel ambulans
yurtdışı kargo