Hi! We're a bit stuck while making a database. Could use a bit of advice
Posted by: Carlos Rodriguez
Date: April 15, 2019 01:01PM

Hi! Me and my friend are trying to make a simple database for a small business. Thing is that we're currently having a bit of a discussion. I need something like this:

Client number/ID (#324)
|________Year (2018)
| |_____Operation #1 (we did X service in 01/07/2018)
| |_____Operation #2 (we did X service in 11/02/2018)
|________Year (2019)
|_____Operation #1 (we did X service in 01/12/2019)
|_____Operation #2 (we did X service in 04/17/2019)
|_____Operation #3 (we did X service in 11/27/2019)
Client number/ID (#325)
|________Year (2018)
| |_____Operation #1 (...you get the hist of it)
| |_____Operation #2
|________Year (2019)
|_____Operation #1
|_____Operation #2
|_____Operation #3

...etc, where the client number would be unique, and the years and operations would be dynamically create once needed.

The questions my friend has is what it should be the primary key of the table to begin with (I say Client Number/ID), and that he says that it's impossible to nest data that way and to create new Operations/Years on demand, instead of allocating them like he wants.

P.D: Sorry if the names aren't on point. We both are kinda noobs with databases. Thanks in advance for the help.

Options: ReplyQuote


Subject
Written By
Posted
Hi! We're a bit stuck while making a database. Could use a bit of advice
April 15, 2019 01:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.