PL/SQL :: Design Tables Without Primary Key?

Aug 13, 2012

If you were asked to design a schema, would you create a table (however irrelevant) without a primary Key ? Say for example, a 'non-business' table like an Error logging table which logs exceptions thrown from stored procedures, would you create this table without a primary key ?

View 7 Replies


ADVERTISEMENT

SQL & PL/SQL :: How To Design Subprogram Which Can Generate Primary Key Value

Mar 22, 2012

how to design subprogram which can generate a primary key value whenever the table name and column name are passes as parameter.?

View 19 Replies View Related

SQL & PL/SQL :: Primary Key Values To Query More Than 25 Tables

Oct 6, 2011

I have two primary key values based on that I would need to query at least 25+ tables(each of these tables might have both primary key columns or either one to query) to extract data for my 150 columns and load it onto my target table.

View 2 Replies View Related

HR Schema And Jsf Web Design?

Jul 13, 2013

how can ı reach hr schema I watched alot of video and have read so much writing from oracle but my data base haven't HR schema table like
emlployees
countries
jobs

how can ı add these hr schema
2) how can ı create web page with adf web applicaiton jsf

1) adding a search button
2) search fieldand I need to list my search results

View 1 Replies View Related

SQL & PL/SQL :: How To Design Subprogram Which Can Generate Pk Value

Sep 15, 2011

i mean which can generate a primary key when the table name and column name are passed as parameters

View 7 Replies View Related

SQL & PL/SQL :: How To Design ERD For Rental Management

Dec 17, 2012

how to design the ERD for Rental Management like I want know how to design tables to check every month's rent. Is there any way to store month and year with out day in database?

View 2 Replies View Related

SQL & PL/SQL :: Doctors And Patients Design

Mar 9, 2013

Is this true for code

•Employees(employee_id PK)
•Patients(patient_id PK, full_name, age)
•Surgeries( doctorid FK, patient_id FK, surgerydate)

doctor_id number (2) references patients(patient_id),
patient_id number (6) references patients(patient_id),
surgery_date date not null

View 4 Replies View Related

PL/SQL :: Design Features For CSV Files

Dec 17, 2012

I got a couple of reports that are made as .CSV files from PL/SQL. However I am lacking some design features. Is it possible to define text + background color and height + width of fields? (I am using utl_file package.)

View 4 Replies View Related

Security :: Oracle Audit Design?

May 28, 2011

Let us say I want to audit data updates, deletes on existing table EMP_TAB that has a few hundred thousands of records.I created a shadow table Emp_tab_audit and added few audit columns

Emp_tab (
Empno NUMBER NOT NULL,
Ename VARCHAR2(10),
Job VARCHAR2(9),

[code]...

I am mostly interested in UPDATES and DELETES but I decided to add INSERTS to have full history for each eomplyee in one table (audit schema) instead of querying two tables all the time (production table and audit table) to see the changes.

I created this AFTER INSERT, UPDATE, DELETE trigger.decided to copy the :NEW values for INSERT and UPDATE and :OLD values for DELETE. attached.

so when insert happens, the first audit row is created in EMP_TAB_AUDIT. update happens, the 2nd new row is created in EMP_TAB_AUDIT.

The problem I am facing is the old records that curently exist. If someone updates an old row I am copying the :NEW values so I won't have a copy of the :OLD values unless I create 2 ROWS (one for the old and one for the new).

Do you think I should copy all the hundreds of thousands of records to the AUDIT tables for this to work.

*******************************************************************
CREATE OR REPLACE TRIGGER TRG_EMP_AUDIT
AFTER INSERT OR DELETE OR UPDATE ON EMP_TAB
FOR EACH ROW DECLARE
v_operation VARCHAR2(10) := NULL;

[code]...

View 22 Replies View Related

What Will Be Database Design Of Any Food Shop

Mar 21, 2009

i am a beginner in database design.i want to know what will be the database design of any food shop like pizza hut..i have created some tables...i am confuse with design of order table..

employee_details
-ID primary key
-name
-address
-date_of _joining
-salary

product_details
- category_name ,foriegn key
- product_name,primary key
- category
- unit price
-discount

categories
-category_name , primary key

View 3 Replies View Related

Forms :: How To Design A Simple Graph

May 23, 2011

How to design a Simple Graph?

View 1 Replies View Related

Database Design - Multiple Irrelevant Fields

May 15, 2009

I am designing a database as a practice exercise, but have come across a problem.

Here is my design:

Branch Manager Employee
------- ---------- ----------
BranchID ---- ManagerID |---- EmpoyeeID
... | EmployeeID ---- ...
Manager ---- EmployeeIDOfManager
...
Branch

Note: The ... in the tables are just placements symbolizing that there are multiple irrelevant (to this thread) fields.

The problem is with the field highlighted in italics whilst the primary keys are in bold. I need to somehow retrieve that ID, but I can't create a many-to-many relationship.

View 14 Replies View Related

Functional Design Document For Existing Package

Feb 25, 2013

I would like to design a functional design document for existing package. Let me know is there any tool which will build the design document?

View 8 Replies View Related

Forms :: Design Mode - Horizontal And Vertical Scroll Bar

Oct 25, 2010

How to create horizontal and vertical scrollbar at a time while design mode??

View 2 Replies View Related

Forms :: Design A Form With Header And Line Level?

May 23, 2011

How can we design a form with header level and line level. here i need to place a button in header section.when we press that button, line level values should be populate.

View 1 Replies View Related

PL/SQL :: Master Detail Form And Required Table Design

Feb 28, 2013

I have a contact table that will be used for more than one entity (Customers, Sites, Suppliers, etc.) Using APEX, when we define the master-detail, we need to add a FK to the Detail table -- otherwise the Master-Detail Forms can not be implemented.

I am looking for a way to defined/implemented tables so that I can utilize the same table (Contacts) for more than one Master-details relationship.

View 3 Replies View Related

Database Design For Storing Client Address Information For All Its Branches?

Jul 27, 2012

I have to design a database so that the performance is optimum and joins are optimum between tables.

Requirement - I have several banks as clients globally, like HSBC, RBS, AMEX etc. Each bank operate globally, and are divided like the geographies, regions etc. For eg. HSBC is operating from US, UK, ASIA, AUSTRALIA. Each geoagraphy is further divided/childs, like, in ASIA has INDIA, PAKISTAN, SRI LANKA, CHINA. Further, it is divided, like in India, it has cities like DELHI, BOMBAY, CHENNAI etc., then further it has within Delhi - Lajpat Nagar, Rohini, Pashim Vihar etc.

As per the above scenario, I need to store addresses, phone numbers, of all the branches of all clients. Also, there is one more condition like in the above defined hierarchy, later on, a new hierarchy can be added, like In INDIA, it can further divided in States and then its local cities.

View 3 Replies View Related

Forms :: Design Time Insert And Update Allowed For Block

Jan 10, 2011

I create databalock - LC_REQ_PO_ITM_DTLS...In design time Insert and update allowed for that block - YES. While i execute query, i write procedure like this

GO_BLOCK('LC_REQ_PO_ITM_DTLS');
EXECUTE_QUERY;
SET_ITEM_PROPERTY('pb_item_cd', enabled, property_false);
SET_BLOCK_PROPERTY('LC_REQ_PO_ITM_DTLS',INSERT_ALLOWED, PROPERTY_FALSE);
SET_BLOCK_PROPERTY('LC_REQ_PO_ITM_DTLS',UPDATE_ALLOWED, PROPERTY_FALSE);

but when i press execute button , then data comes properly on that bloack..but i click on that block, error comes like this - 'You can not create record here '.and data disappearing..

View 3 Replies View Related

Forms :: How To Design Hierarchical Tree Menu For Calling Reports

Mar 17, 2013

How to design Hierarchical Tree Menu for calling forms & Reports.

View 2 Replies View Related

JDeveloper, Java & XML :: Design Dynamic Table And Insert In A View

Feb 25, 2011

I'm in a situation where i have to design dynamical XML table that gonna get inserted in a view:

late'si consider the following table:

CREATE TABLE FB_XML
(
ID NUMBER(10) NOT NULL,
FB_ID NUMBER(10),
XMLCONTENT CLOB
)

the XML content field have content like the following:

XMLROOT(XMLELEMENT (
"Form",
XMLELEMENT ("elements",
(SELECT XMLAGG (
[code].......

so late consider for the first row i insert for the

* id:1
* fb_id : 25
* xmlcontent:
XMLROOT(XMLELEMENT (
"Form",
[code]........

the code works "fine" here but the xml in the fb_xml table is not EXECUTED it simply escaped by oracle , i know i should add something so that the XML have to execute and generate.

View 3 Replies View Related

Mobile Server :: Deploy Existing Apps Design For Win Mob 6 On Windows 8 Phone

Mar 9, 2013

It looks that windows mobile is gone and windows 8 is available.. Can a vb .net application developed to run on win mobile 6 with oracle lite be deployed on windows 8 phone.

View 3 Replies View Related

During Primary (old Standby) To Standby (old Primary) Switchover Hang?

Apr 4, 2013

I am using RAC to RAC data guard environment. Os hp-unix. during primary(old standby) to standby(old primary) switchover I am ussing:

SQL>ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;

I have 11.2.0.1 environment with standby and when performing switch over - it was hanging for more than 2 hours and i had to cancel it. This is what all i see in the database alert.log:

Errors in file /u02/app/oracle/diag/rdbms/drpdb/drpdb1/trace/drpdb1_m000_15160.trc:
ORA-01155: the database is being opened, closed, mounted or dismounted
Thu Apr 04 17:44:03 2013
Errors in file /u02/app/oracle/diag/rdbms/drpdb/drpdb1/trace/drpdb1_m000_15780.trc:
ORA-01155: the database is being opened, closed, mounted or dismounted
Thu Apr 04 17:59:03 2013
Errors in file /u02/app/oracle/diag/rdbms/drpdb/drpdb1/trace/drpdb1_m001_16373.trc:

[code]....

ORA-01155: the database is being opened, closed, mounted or dismounted.

View 1 Replies View Related

Forms :: Image Path Save In Database And Image Name As Design Number?

Jun 3, 2009

I create a simple table for image

CREATE TABLE image_table (
Design_no varchar2(10),
filename VARCHAR2(255) PRIMARY KEY,
image LONG RAW);

Then i create simple block of image_table

its show me in this website [URL] My question is i don't want to give my form path always.i want to save my picture path in my database and the name of my picture always same as my design_no column.

For example i want to save a picture in my database i will copy my picture in d:shahzaib1234.jpg now i want the path d:shahzaib save in database and when i copy my picture which path= d:shahzaib and file name = Design no its will automatically save in database.

View 4 Replies View Related

Server Utilities :: Append Tables Content To Existing Tables?

Nov 9, 2010

problem on oracle 11gR2 where i have to import data from a source database to an existing table without truncate or drop the target table in the target database.

we have found something called table_exist_action=append in impdp.

View 2 Replies View Related

Maintain Large Tables / Cleanup Data From Our Tables

May 18, 2011

I have to cleanup data from our tables (Production Environment) that contain millions of rows. The question is apart from the solution of the partitioned tables what alternative recommended solution suggests Oracle?

To delete these tables by using a cursor PL/SQL block or to import all the database and in the tables that we want to remove the old rows to use the QUERY option of the data pump utility.

I have used both ways and i have to admit that datapump solution is much much faster than the deletion that suffers from I/O disk.The question again is which method from these two is more reliable and less risky for the health of the database.

View 5 Replies View Related

Implementation Where Data From DB2 Tables Are Moved To Oracle Tables

Sep 3, 2012

I came across an implementation where data from DB2 tables are moved to Oracle tables, for BI solutioning, using some oracle procedures called from MS SQL DTS packages which are scheduled jobs.Just being curious, can this be done using OWB or ODI rather than the above detour. I suppose there are some changes being done in those procedures before the data is being loaded into Oracle tables, can't this be done using OWB/ODI? Can it be scheduled too as jobs using OWB/ODI?

View 1 Replies View Related

SQL & PL/SQL :: Audit Tables For Most Of Production Tables

May 29, 2013

In our schema we have corresponding audit tables for most of the production tables

Ex Table name Audit Table
EMP EMP_AU
DEPT DEPT_AU

Audit tables will have all the columns of production table along with audit columns AUDIT_DATE , AUDIT_OPERATION There are few production tables which are not having audit tables.I need to write a script to identify

1) Production tables where corresponding audit table is missing

2) Where there is column difference (In case any column missing in audit table) between Production table and Audit table

View 11 Replies View Related

SQL & PL/SQL :: Primary Key On A View

Dec 20, 2011

While making a view.

1. Is it advisable to have primary key in a view.

2. Why can't we have a primary key in a view, what are its advantages. I mean one cannot search a view by index.

3. Is it because of hibernate, but again i have used distinct keyword in a view declaration which means i cannot insert via view.

Here is my code for view to make a primary key in a view.

CREATE OR REPLACE FORCE VIEW VU_NAME
PRIMARY_KEY, NAME_ID, ADDRESS_ID
)

[Code]....

alter view VU_NAME add constraint vemp_pk primary key (PRIMARY_KEY) disable

View 3 Replies View Related

PL/SQL :: Primary Key Value Updation

Jul 13, 2012

I have a table called Order_Mstr

order_id order_Desc
-------- ----------
1 Order1
2 Order2
3 Order3
4 Order4

Child tables referring Order_id are:

Order_child1
Order_child2
Order_child3
Order_child4
Order_child5
Order_child6
.
.
.
Order_child50

I have to update Order_id with some 8 digit number generated by some algorithm. And i have to update that value in child tables as well. In how many ways i can do this task. for example..

1) Disabling the constraint and updating Master value and child value.

View 5 Replies View Related

PL/SQL :: How To Create Primary Key Like W1

Jul 10, 2012

primary key should be

W1
W2
W3 like this.

1,2,3 are sequence numbers.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved