SQL nublet here

SQL nublet here.
How would I implement tags as a foreign key into jav_bigtable to allow for multiple values (big_tits, bbw, milf, etc)

Here is what I have so far:
/*
GOAL: Organize and categorize muh JAVs.
*/

DROP TABLE jav_bigtable;

/* Reverse of the CREATE order. */

/*
CREATE ORDER:
jav_bigtable
*/

/* Part 1: Creation */

/*
Table for tags? Dunno.
CREATE TABLE tags
tag_id VARCHAR2(10)
, tag_name VARCHAR2(10)
);
*/

CREATE TABLE jav_bigtable (
vendor_id VARCHAR2(10)
, actresses VARCHAR2(20)
, release_date DATE
, genre VARCHAR2(10)
, CONSTRAINT jav_bigtable_pk PRIMARY KEY (vendor_id)
);


/* END CREATION */

/* Part 2: Insertion */
INSERT INTO jav_bigtable (vendor_id, actresses, release_date, genre)
VALUES ( 'TBTB-115'
, 'Yuuki Iori'
, TO_DATE('2018-09-07', 'YYYY-MM-DD')
, 'huge_tits'
);

/* END INSERTION */

Attached: IMG_20161121_150951.jpg (1920x2560, 1.79M)

Other urls found in this thread:

en.wikipedia.org/wiki/Database_normalization#Initial_data
twitter.com/AnonBabble

okay so I'm no DBA here, but I'd attack this problem by using multiple tables and then joining them. You have a main table of videos, which would have the ID, studio, release date, and anything else that there's only one of per video. Then have other tables for the actresses and tags.

You want them to be separate tables so that each (ID, tag) or (ID, actress) pairing doesn't have to be stuffed into one big row in a main table. That way one ID can have as many tags as you care to and you don't have to change the schema if you want to add lots. Similarly you won't have to decide ahead of time how many actresses you can have for one video.

Attached: jav.jpg (489x301, 17K)

Doesn't milf presuppose big tits?

You're a fucking degenerate.

table tags(id,...)
table whores(id,...)
table tagged_whores(tag.id,whore.id)

learn joins

>tfw your big titty japanese porn database isn't even 5NF

Attached: file.png (1300x1019, 866K)

How would you organize the same girl being casted under different names / as "amateur"?

yes

Alias table.

Use access

Split out actresses and their aliases.

Draw the ERD first bro

> addressing the real hard engineering questions

Jow Forums is only really productive when they have to deal with either porn or anime. nothing wrong with that, though.

No

How flawed is my approach for organising hentai?

Attached: db.png (1201x1077, 99K)

That's a nice E250 user

Not OP, but I have one in my garage for years already, got it after it was decommissioned at my last job. Fully kitted out, probably the highest end configuration it can take, some parts not even officially supported by the 250, since it got used well into the early 2010's and upgraded several times.
I should clean it up and find a home for it, not particularly interested in using it myself and old Sun hardware isn't that popular or expensive on the market for some reason.

Asian milfs in particular can violate this constraint.

>VARCHAR for uuid
Get yourself a real database like postgres
And use citext while you're at it
Too lazy to point out the rest of the flaws

OP, just follow this
>en.wikipedia.org/wiki/Database_normalization#Initial_data
and learn JOINS and INDICES

>gratuitously inconsistent key types
>personal preferences (favourites, ratings) not stored in separate link tables
>pointless link table PK's (without additional constraints, they allow duplicate lines), use composite primary keys (e.g. circle + comic) instead
If you have zero college credits on this under your belt, it's not too bad.

>gratuitously inconsistent key types
Intentional, I generate those outside the db and use the ID's the link tables I use let the db handle the id's as I don't care about them
>pointless link tables ...
I didn't write the constrains on the ER as I couldn't be bothered and it looks cluttered but the link tables do have uniqueness constrains on the linking ID's.

>pointless link tables ...
No, I said
>pointless link table PK's
There are three columns on multiple link tables
e.g.
>id
>circle
>comic
the id column is redundant. use a composite key (circle + comic) as the primary key instead.