Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
MOVIE TIME
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
CREATE TABLE Admin ( AID INT NOT NULL, Afname VARCHAR(15), Alname VARCHAR(15), Aemail VARCHAR (50), Apassword VARCHAR (10), Aphone VARCHAR (10), Abirth_date DATE, PRIMARY KEY(AID) ); CREATE TABLE Branch ( Bname VARCHAR(15) NOT NULL, Bcity VARCHAR(15), Bvenue VARCHAR (15), PRIMARY KEY(Bname) ); CREATE TABLE Screen ( Branch_name VARCHAR(15) NOT NULL, Sc_number INT NOT NULL, Sctype VARCHAR(15), FOREIGN KEY (Branch_name) REFERENCES Branch(Bname), PRIMARY KEY(Branch_name, Sc_number) ); CREATE TABLE Movie ( MID INT NOT NULL, Mname TEXT, Mgenre TEXT, Mdescrption TEXT, Mrun_time VARCHAR (8), AdID INT NOT NULL, FOREIGN KEY (AdID) REFERENCES Admin(AID), PRIMARY KEY(MID) ); CREATE TABLE Movie_dates ( MoID INT NOT NULL, Mdate DATE NOT NULL, FOREIGN KEY (MoID) REFERENCES Movie(MID), PRIMARY KEY(MoID, Mdate) ); INSERT INTO Branch (Bname,Bcity,Bvenue) VALUES ('VOX CINEMA', 'Riyadh', 'Riyadh Park'); INSERT INTO Branch (Bname,Bcity,Bvenue) VALUES ('Movie', 'Riyadh', 'U Walk'); INSERT INTO Branch (Bname,Bcity,Bvenue) VALUES ('Movie Theaters', 'Jeddah', 'AlYasmin Mall'); INSERT INTO Branch (Bname,Bcity,Bvenue) VALUES ('S Branch', 'Khubar', 'AlRashid Mall'); INSERT INTO Branch (Bname,Bcity,Bvenue) VALUES ('Fun Time', 'Riyadh', 'AlNakheel Mall');
View schema
Execution time: 0,02 sec, rows selected: 0, rows affected: 5, absolute service time: 0,19 sec, absolute service time: 0,18 sec
edit mode
|
history
|
discussion