Designing a Database
Let's design a database for our CD collection. Assume that, until now, we've been keeping all the information about our CDs on index cards and that, for each CD, we've written down the artist's name, what country the artist is from, the title of the album, the release date, the label, and a list of the songs on the album. We want to convert this system of cards into an Oracle database.
Based on our index cards, we first design a table with the following columns, omitting for now the list of songs:
CD_COLLECTION
TITLE
ARTIST
COUNTRY
RELEASE_DATE
LABEL
Our database table is shown in Figure 2-1.
Figure 2-1. CD database table.
Notice that, to identify each CD uniquely, we can use the combination of the two columns TITLE and ...
Get Java™ Oracle® Database Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.