0% found this document useful (0 votes)
22 views2 pages

Oracle SID and Table Creation Guide

Shhh fgf hcjvjjvvjvjvjvjvjjvjvvjvjvjjccjgfgfgdgvgfnxxukxj gd jfxkufxhfxulfslufxfxzufxufsfuxgidfixigxgixk

Uploaded by

samidaudzai786
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

Oracle SID and Table Creation Guide

Shhh fgf hcjvjjvvjvjvjvjvjjvjvvjvjvjjccjgfgfgdgvgfnxxukxj gd jfxkufxhfxulfslufxfxzufxufsfuxgidfixigxgixk

Uploaded by

samidaudzai786
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Oracle SID, Table Creation, and

Database Concepts
Oracle SID and Tables Creation
a. What is an Oracle SID and why is it important?

 An Oracle SID (System Identifier) uniquely identifies a specific Oracle database instance.
It's essential because it tells the Oracle client which database to connect to. Without
setting the correct SID, you might fail to establish a connection with the intended Oracle
database instance.

b. Write a basic command to set Oracle SID in Windows.

 set oracle_sid=XE
 Or if your SID is named differently, like DBAMF22: set oracle_sid=DBAMF22

c. What command is used to create a table in Oracle?

 The basic SQL command is:


CREATE TABLE table_name (
column1 datatype,
column2 datatype,
...
);

d. Create a simple table student with columns id, name, and age.

 CREATE TABLE student (


id NUMBER PRIMARY KEY,
name VARCHAR2(50),
age NUMBER
);

Business Rules and Entity Relationship


a. What is a business rule in the context of databases?

 A business rule is a formal statement that defines or constrains some aspect of business.
In database terms, it sets the guidelines and policies that determine the relationships,
attributes, and behaviors of data elements within a system.

b. Give one example of a business rule related to a university database.


 "Each student must be enrolled in at least one course, and each course can have many
enrolled students." This implies a many-to-many relationship between students and
courses.

c. Identify two entities from a university database and describe their relationship.

 Entities: Student and Department


Relationship: A student belongs to one department, but a department can have many
students. (This is a one-to-many relationship: one department → many students)

d. Why is it important to identify entities and relationships before creating a database?

 Identifying entities and relationships beforehand ensures proper database design, data
integrity, and efficient data retrieval. It helps prevent redundancy and supports clear
understanding of the data structure and how different data elements relate to each
other.

You might also like