H White

Greenhorn
+ Follow
since Dec 05, 2016
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by H White

This is it:

Normalise (to third normal form) the Course-Details form and the Customer Booking form separately. Show all the steps clearly. Now consolidate the entities by eliminating redundancies and then produce a final list of entities. Already Done

Implement and submit adequate documentation for the following:
Create and populate just those database tables which correspond to the normalised entities found in part (2). Submit Oracle scripts for each table, showing its description and its contents. Already done

Implement the following functionalities: (Now Stuck)
F1 - create a new customer and enrol him on a course
F2 - create a family of four and enrol them all on the same course
F3 - ability to change course information
F4 - ability to remove retiring staff from the system

Heres the link to the form https://www.dropbox.com/s/552tjhiu0fbkz2k/Scenario.pdf?dl=0
Shall I PM you so you could understand?
I have been tasked with a scenario and part of this is to develop a database.

One of the task is to add functionality to the database such as F1, F2, F3, F4. Never done this before. How could this be done?

I need to add a group of people under one record. How is this possible with a function key?
Error starting at line : 18 in command -
CREATE TABLE EMPLOYEES (
EMPLOYEE_ID VARCHAR2(20),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50),
STREET_ADDRESS VARCHAR2(50),
CITY VARCHAR2(50),
POST_CODE VARCHAR2(50),
PHONE_NUMBER VARCHAR2(50),
WORK_NUMBER VARCHAR2(50),
NI_NUMBER VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT EMPLOYEES_PRIMARY_KEY PRIMARY KEY (EMPLOYEE_ID)))
Error report -
SQL Error: ORA-00922: missing or invalid option
00922. 00000 -  "missing or invalid option"
*Cause:    
*Action:
Error starting at line : 1 in command -
CREATE TABLE DEPARTMENT (
DEPARTMENT_ID VARCHAR2(20),
STAFF_CATEGORY VARCHAR2(50),
SUPPLIER_ID VARCHAR2(20),
CONSTRAINT DEPARTMENT_PRIMARY_KEY PRIMARY KEY (DEPARTMENT_ID),
CONSTRAINT DEPARTMENT_FOREIGN_KEY FOREIGN KEY(SUPPLIER_ID) REFERENCES SUPPLIER(SUPPLIER_ID))
Error report -
SQL Error: ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"
*Cause:    
*Action:

Error starting at line : 8 in command -
CREATE TABLE SUPPLIER (
SUPPLIER_ID VARCHAR2(20),
NAME VARCHAR2(50),
ADDRESS VARCHAR2(50),
CITY VARCHAR2(50),
POST_CODE VARCHAR2(50),
PHONE VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT SUPPLIER_PRIMARY_KEY PRIMARY KEY (SUPPLIER_ID)))
Error report -
SQL Error: ORA-00922: missing or invalid option
00922. 00000 -  "missing or invalid option"
*Cause:    
*Action:

Error starting at line : 18 in command -
CREATE TABLE EMPLOYEES (
EMPLOYEE_ID VARCHAR2(20),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50),
STREET_ADDRESS VARCHAR2(50),
CITY VARCHAR2(50),
POST_CODE VARCHAR2(50),
PHONE_NUMBER VARCHAR2(50),
WORK_NUMBER VARCHAR2(50),
NI_NUMBER VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT EMPLOYEES_PRIMARY_KEY PRIMARY KEY (EMPLOYEE_ID)))
Error report -
SQL Error: ORA-00922: missing or invalid option
00922. 00000 -  "missing or invalid option"
*Cause:    
*Action:

Error starting at line : 31 in command -
CREATE TABLE PAYROLL (
PAYROLL_ID VARCHAR2(20),
EMPLOYEE_ID VARCHAR2(20),
PAY_SCALE VARCHAR2(20),
CONSTRAINT PAYROLL_PRIMARY_KEY PRIMARY KEY (PAYROLL_ID),
CONSTRAINT PAYROLL_FOREIGN_KEY FOREIGN KEY(EMPLOYEE_ID) REFERENCES EMPLOYEES(EMOLOYEE_ID))
Error report -
SQL Error: ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"
*Cause:    
*Action:

Error starting at line : 38 in command -
CREATE TABLE ACCOMMODATION (
ACCOMMODATION_ID VARCHAR2(20),
COURSE_ID VARCHAR2(20),
VARCHAR2(50),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50),
TYPE VARCHAR2(50),
ADDRESS VARCHAR2(50),
CITY VARCHAR2(50),
COUNTRY VARCHAR2(50),
POST_CODE VARCHAR2(50),
PHONE_NUMBER VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT ACCOMMODATION_PRIMARY_KEY PRIMARY KEY (DEPARTMENT_ID),
CONSTRAINT ACCOMMODATION_FOREIGN_KEY FOREIGN KEY(COURSE_ID) REFERENCES COURSE (COURSE_ID))
Error report -
SQL Error: ORA-00904: : invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:

Error starting at line : 54 in command -
CREATE TABLE INVOICE (
INVOICE_ID VARCHAR2(20),
EMPLOYEE_ ID VARCHAR2(20),
INVOICE_DATE DATE CONSTRAINT INVOICE_DATE_NOT_NULL NOT NULL,
INVOICE_TOTAL VARCHAR2(20),
CONSTRAINT INVOICE_PRIMARY_KEY PRIMARY KEY (INVOICE_ID),
CONSTRAINT INVOICE_FOREIGN_KEY FOREIGN KEY(EMPLOYEE_ID) REFERENCES EMPLOYEE (EMPLOYEE_ID))
Error report -
SQL Error: ORA-00907: missing right parenthesis
00907. 00000 -  "missing right parenthesis"
*Cause:    
*Action:

Error starting at line : 62 in command -
CREATE TABLE ORDERS (
ORDER_ID VARCHAR2(20),
CUSTOMER_ID VARCHAR2(20),
ITEM_NAME VARCHAR2(20),
ITEM_PRICE VARCHAR2(20),
CONSTRAINT ORDERS_PRIMARY_KEY PRIMARY KEY (ORDER_ID),
CONSTRAINT ORDERS_FOREIGN_KEY FOREIGN KEY(CUSTOMER_ID) REFERENCES CUSTOMER(CUSTOMER_ID))
Error report -
SQL Error: ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"
*Cause:    
*Action:

Error starting at line : 70 in command -
CREATE TABLE BOOKING (
BOOKING_ID VARCHAR2(20),
CUSTOMER_ID CONSTRAINT FOR_KEY_CUSTOMER_IDVARCHAR2(20),
ACCOMMODATION_ID CONSTRAINT FOR_KEY_ACCOMMODATION_IDVARCHAR2(20),
CONSTRAINT BOOKING_PK PRIMARY KEY (BOOKING_ID)))
Error report -
SQL Error: ORA-02253: constraint specification not allowed here
02253. 00000 -  "constraint specification not allowed here"
*Cause:    Constraint specification is not allowed here in the statement.
*Action:   Remove the constraint specification from the statement.

Error starting at line : 76 in command -
CREATE TABLE COURSE (
COURSE_ID VARCHAR2(20),
ORDER_ID VARCHAR2(20),
COURSE_TYPE VARCHAR2(20),
ADVENTURE_TYPE VARCHAR2(20),
START_DATE VARCHAR2(20),
END_DATE VARCHAR2(20),
CONSTRAINT COURSE_PRIMARY_KEY PRIMARY KEY (COURSE_ID),
CONSTRAINT COURSE_FOREIGN_KEY FOREIGN KEY(ORDER_ID) REFERENCES ORDERS(ORDER_ID))
Error report -
SQL Error: ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"
*Cause:    
*Action:

Error starting at line : 86 in command -
CREATE TABLE CUSTOMER (
CUSTOMER_ID VARCHAR2(20),
ORDER_ID CONSTRAINT FOR_KEY_ORDER_IDVARCHAR2(20),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50),
STREET_NAME VARCHAR2(50),
CITY VARCHAR2(50),
COUNTRY VARCHAR2(50),
POST_CODE VARCHAR2(50),
DAY_PHONE VARCHAR2(50),
NIGHT_PHONE VARCHAR2(50),
DOB VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT CUSTOMER_PRIMARY_KEY PRIMARY KEY (CUSTOMER_ID),
CONSTRAINT CUSTOMER_FOREIGN_KEY FOREIGN KEY(ORDER_ID) REFERENCES ORDERS(ORDER_ID))
Error report -
SQL Error: ORA-02253: constraint specification not allowed here
02253. 00000 -  "constraint specification not allowed here"
*Cause:    Constraint specification is not allowed here in the statement.
*Action:   Remove the constraint specification from the statement.
I am having Issues with my SQL coding. Can someone have a look and let me know where Ive gone wrong

CREATE TABLE DEPARTMENT (
DEPARTMENT_ID VARCHAR2(20),
STAFF_CATEGORY VARCHAR2(50),
SUPPLIER_ID VARCHAR2(20),
CONSTRAINT DEPARTMENT_PRIMARY_KEY PRIMARY KEY (DEPARTMENT_ID),
CONSTRAINT DEPARTMENT_FOREIGN_KEY FOREIGN KEY(SUPPLIER_ID) REFERENCES SUPPLIER(SUPPLIER_ID));

CREATE TABLE SUPPLIER (
SUPPLIER_ID VARCHAR2(20),
NAME VARCHAR2(50),
ADDRESS VARCHAR2(50),
CITY VARCHAR2(50),
POST_CODE VARCHAR2(50),
PHONE VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT SUPPLIER_PRIMARY_KEY PRIMARY KEY (SUPPLIER_ID)));

CREATE TABLE EMPLOYEES (
EMPLOYEE_ID VARCHAR2(20),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50),
STREET_ADDRESS VARCHAR2(50),
CITY VARCHAR2(50),
POST_CODE VARCHAR2(50),
PHONE_NUMBER VARCHAR2(50),
WORK_NUMBER VARCHAR2(50),
NI_NUMBER VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT EMPLOYEES_PRIMARY_KEY PRIMARY KEY (EMPLOYEE_ID)));

CREATE TABLE PAYROLL (
PAYROLL_ID VARCHAR2(20),
EMPLOYEE_ID VARCHAR2(20),
PAY_SCALE VARCHAR2(20),
CONSTRAINT PAYROLL_PRIMARY_KEY PRIMARY KEY (PAYROLL_ID),
CONSTRAINT PAYROLL_FOREIGN_KEY FOREIGN KEY(EMPLOYEE_ID) REFERENCES EMPLOYEES(EMOLOYEE_ID));

CREATE TABLE ACCOMMODATION (
ACCOMMODATION_ID VARCHAR2(20),
COURSE_ID VARCHAR2(20),
VARCHAR2(50),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50),
TYPE VARCHAR2(50),
ADDRESS VARCHAR2(50),
CITY VARCHAR2(50),
COUNTRY VARCHAR2(50),
POST_CODE VARCHAR2(50),
PHONE_NUMBER VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT ACCOMMODATION_PRIMARY_KEY PRIMARY KEY (DEPARTMENT_ID),
CONSTRAINT ACCOMMODATION_FOREIGN_KEY FOREIGN KEY(COURSE_ID) REFERENCES COURSE (COURSE_ID));

CREATE TABLE INVOICE (
INVOICE_ID VARCHAR2(20),
EMPLOYEE_ ID VARCHAR2(20),
INVOICE_DATE DATE CONSTRAINT INVOICE_DATE_NOT_NULL NOT NULL,
INVOICE_TOTAL VARCHAR2(20),
CONSTRAINT INVOICE_PRIMARY_KEY PRIMARY KEY (INVOICE_ID),
CONSTRAINT INVOICE_FOREIGN_KEY FOREIGN KEY(EMPLOYEE_ID) REFERENCES EMPLOYEE (EMPLOYEE_ID));

CREATE TABLE ORDERS (
ORDER_ID VARCHAR2(20),
CUSTOMER_ID VARCHAR2(20),
ITEM_NAME VARCHAR2(20),
ITEM_PRICE VARCHAR2(20),
CONSTRAINT ORDERS_PRIMARY_KEY PRIMARY KEY (ORDER_ID),
CONSTRAINT ORDERS_FOREIGN_KEY FOREIGN KEY(CUSTOMER_ID) REFERENCES CUSTOMER(CUSTOMER_ID));

CREATE TABLE BOOKING (
BOOKING_ID VARCHAR2(20),
CUSTOMER_ID CONSTRAINT FOR_KEY_CUSTOMER_IDVARCHAR2(20),
ACCOMMODATION_ID CONSTRAINT FOR_KEY_ACCOMMODATION_IDVARCHAR2(20),
CONSTRAINT BOOKING_PK PRIMARY KEY (BOOKING_ID)));

CREATE TABLE COURSE (
COURSE_ID VARCHAR2(20),
ORDER_ID VARCHAR2(20),
COURSE_TYPE VARCHAR2(20),
ADVENTURE_TYPE VARCHAR2(20),
START_DATE VARCHAR2(20),
END_DATE VARCHAR2(20),
CONSTRAINT COURSE_PRIMARY_KEY PRIMARY KEY (COURSE_ID),
CONSTRAINT COURSE_FOREIGN_KEY FOREIGN KEY(ORDER_ID) REFERENCES ORDERS(ORDER_ID));

CREATE TABLE CUSTOMER (
CUSTOMER_ID VARCHAR2(20),
ORDER_ID CONSTRAINT FOR_KEY_ORDER_IDVARCHAR2(20),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50),
STREET_NAME VARCHAR2(50),
CITY VARCHAR2(50),
COUNTRY VARCHAR2(50),
POST_CODE VARCHAR2(50),
DAY_PHONE VARCHAR2(50),
NIGHT_PHONE VARCHAR2(50),
DOB VARCHAR2(50),
EMAIL VARCHAR2(50),
CONSTRAINT CUSTOMER_PRIMARY_KEY PRIMARY KEY (CUSTOMER_ID),
CONSTRAINT CUSTOMER_FOREIGN_KEY FOREIGN KEY(ORDER_ID) REFERENCES ORDERS(ORDER_ID));
4 years ago
Thanks very much

Thanks a million

4 years ago
12-04 06:14:08.946 8186-8186/com.example.howar.calc D/AndroidRuntime: Shutting down VM
12-04 06:14:08.946 8186-8186/com.example.howar.calc E/AndroidRuntime: FATAL EXCEPTION: main
                                                                     Process: com.example.howar.calc, PID: 8186
                                                                     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.howar.calc/com.example.howar.calc.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
                                                                         at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                         at android.os.Looper.loop(Looper.java:154)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
                                                                      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
                                                                         at com.example.howar.calc.MainActivity.onCreate(MainActivity.java:193)
                                                                         at android.app.Activity.performCreate(Activity.java:6662)
                                                                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) 
                                                                         at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
                                                                         at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                         at android.os.Looper.loop(Looper.java:154) 
                                                                         at android.app.ActivityThread.main(ActivityThread.java:6077) 
                                                                         at java.lang.reflect.Method.invoke(Native Method) 
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) 
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 
4 years ago
No errors now...But when I try to run it on the android physical device... it says unfortunately, calc has stopped
4 years ago
After putting semi-colon at the end. I'm still getting Error:(201, 1) error: class, interface, or enum expected
4 years ago
I've corrected it with the parentheses - I am now having this error at the last prentheses
Error:(201, 5) error: class, interface, or enum expected
4 years ago
Please see code below. The error is at line 163. It states: Error:(202, 15) error: ')' expected

and line 21 & 22. It states : Error:(202, 16) error: reached end of file while parsing





[moderator edit: disabled smilies]
4 years ago
Errors

1: Error ')' expected
2. Error: reached end of file while parsing
3. Execution Failed for task :app:compileDebugJavaWithJavac
4 years ago
I've corrected by removing the advanced functions but still getting the errors or reached end of file while parsing:

4 years ago
Just got home and had a look at it. It's showing the error on the java code between line 204 - 216.
4 years ago