Showing posts with label movie. Show all posts
Showing posts with label movie. Show all posts

Friday, March 30, 2012

NEED HELP and GUIDANCE!

I have a HUGE project (at least for me) and need some guidance.

I am trying to create a database for a local university movie club
that allows users to input there basic personal information (name,
address, telephone number) as well as movies in there collection. The
movies will be categorized by genre (comedy, romance, horror, etc.)
and title. I want to be able to let the users add and remove movies
to their list of movies they own, I'll call it "MOVIES I OWN".

The user will also need to be able to create a SECOND list of movies
they would like to see, again they can choose by genre and title.
They need to also be able to add and remove from this list also, i'll
call it "MOVIES I WANT TO SEE".

The last part of the project will be to match the users of "movies i
want to see" with "movies I own" users. It will be displayed on the
local university website when the user logs in and will alert the user
to the match. If there is a match at a later time, maybe the user can
be emailed? Also if there is a match, perhaps the two movies can be
taken off record after the user acknowledges the match. I would need
it to be able to handle a small amount of users now logged in at the
same time , but would like for it to eventually handle several hundred
users logged on at the same time in the distant future with out
performance problems.

I am not sure if sql 2000 is the best to get this done or perhaps
oracle. I am currently trying this on mySQL with PHP but currently am
lost in a forest of data. Any guidance suggestions will be greatly
appreciated. I am pretty new to this so please be kind...Somthing like this maybe:

CREATE TABLE Members (login VARCHAR(10) NOT NULL PRIMARY KEY, membername
VARCHAR(30) NOT NULL UNIQUE);

CREATE TABLE Movies (cat_no CHAR(10) NOT NULL PRIMARY KEY, title VARCHAR(30)
NOT NULL, released INTEGER NOT NULL, UNIQUE (title,released));

CREATE TABLE MembersMovies (login VARCHAR(10) NOT NULL REFERENCES Members
(login), cat_no CHAR(10) REFERENCES Movies (cat_no), media CHAR(3) NOT NULL
CHECK (media IN ('DVD','VHS')), Memberstatus CHAR(1) NOT NULL CHECK
(Memberstatus IN ('H','W') /* "Has" or "Wants" */), PRIMARY KEY
(login,cat_no,Memberstatus));

Query: Who has the movies that member 'X' wants?:

SELECT U.membername, M.title, M.released
FROM MembersMovies AS H,
MembersMovies AS W,
Movies AS M,
Members AS U
WHERE H.cat_no = W.cat_no
AND H.media = W.media
AND H.Memberstatus = 'H'
AND W.Memberstatus = 'W'
AND W.login = 'X'
AND W.cat_no = M.cat_no
AND H.login = U.login ;

> I am not sure if sql 2000 is the best to get this done or perhaps
> oracle. I am currently trying this on mySQL with PHP but currently am

Any of those products should be capable of your specified requirements. I
expect your choice will be guided mostly by what you know and the existing
environment you have to work with.

--
David Portas
SQL Server MVP
--|||dahct@.yahoo.com (new_GUY) wrote in message news:<c978d8cf.0406131603.34edddc9@.posting.google.com>...
> I have a HUGE project (at least for me) and need some guidance.
> I am trying to create a database for a local university movie club
> that allows users to input there basic personal information (name,
> address, telephone number) as well as movies in there collection. The
> movies will be categorized by genre (comedy, romance, horror, etc.)
> and title. I want to be able to let the users add and remove movies
> to their list of movies they own, I'll call it "MOVIES I OWN".
> The user will also need to be able to create a SECOND list of movies
> they would like to see, again they can choose by genre and title.
> They need to also be able to add and remove from this list also, i'll
> call it "MOVIES I WANT TO SEE".
> The last part of the project will be to match the users of "movies i
> want to see" with "movies I own" users. It will be displayed on the
> local university website when the user logs in and will alert the user
> to the match. If there is a match at a later time, maybe the user can
> be emailed? Also if there is a match, perhaps the two movies can be
> taken off record after the user acknowledges the match. I would need
> it to be able to handle a small amount of users now logged in at the
> same time , but would like for it to eventually handle several hundred
> users logged on at the same time in the distant future with out
> performance problems.
> I am not sure if sql 2000 is the best to get this done or perhaps
> oracle. I am currently trying this on mySQL with PHP but currently am
> lost in a forest of data. Any guidance suggestions will be greatly
> appreciated. I am pretty new to this so please be kind...

From the information you've given, it sounds like the database
platform is more or less irrelevant - if you're "lost in a forest of
data", then you probably need to spend some time looking at your
requirements and your data model. You might want to start by searching
Google for existing data models for CD or movie collections, then look
at extending them to allow for multiple users.

I wouldn't worry too much about the database - your application sounds
like many other PHP/MySQL ones (web-based, low budget, few users, no
critical data etc.). Unless you have some clear and compelling reason
for moving to a different database, that's likely to be a distraction
from addressing your key issues.

Simon|||In article <c978d8cf.0406131603.34edddc9@.posting.google.com>,
dahct@.yahoo.com says...
> I am not sure if sql 2000 is the best to get this done or perhaps
> oracle. I am currently trying this on mySQL with PHP but currently am
> lost in a forest of data. Any guidance suggestions will be greatly
> appreciated. I am pretty new to this so please be kind...

If your project is going be connected to a web server, then you are
going to need to stick with something like MySQL - Both Oracle and MS
SQL require licenses, MS SQL requires a CPU license for anything used by
a web server to present data. A CPU license is about $4900 for MS SQL, I
have no idea what Oracle licenses run today.

If this is a class project, that won't hit the web for anyone but
yourself, then you can use the 120 Day eval version without limitation.

Now, to answer your question, based on the small size of your database,
I would say that ANY of the databases you've mentioned should be more
than enough to handle it.

Things to consider when building a database:

1) Database and web server belong on different machines

2) The OS is installed on one set of drives, the database log files on
another set that is mirrored, and the data files are installed on yet
another set of drives configured as RAID 5 or RAID 0+1. For personal use
a single drive with multiple volumes will also do, but the multi-drive
methods is the best option.

3) Size your database ahead of time - meaning if you think it's going to
need 1GB of space, go ahead and make it 1GB, saves grow time later.

4) Make sure that you build proper indexes and clustered indexes

5) Make sure that you don't over-normalize the database, but make sure
it's easy to expand your tables.

6) Memory - make sure you have enough, how much is enough, well, as much
as the OS can handle :) In most cases, based on what you seem to be
building, if your testing platform has 1GB of RAM you should be in good
shape. If you are testing and running the web server and database server
on the same machine, make sure (for MS SQL) that you limit the SQL
Server to 65% of the memory - this saves room for the OS and IIS/PHP so
that the SQL Server doesn't have to spend time releasing memory to the
system.

To handle several hundred users, at the same time, you should consider a
small Dual CPU server with 3GB of RAM for the database and another small
Dual CPU server with 2GB of RAM for the web server. If you don't have
funding, the ASUS PC-DL Deluxe motherboard allows Dual Xeon CPU's, up to
4GB of RAM, and lets you use up to 6 IDE (4 SATA) devices. You could go
cheap and buy 4 120GB SATA drives and use the PC-DL Onboard RAID
controller to build one (4 drive) RAID 5 array, and then partition it
for OS, LOGS, DATA.

One other thing, if you are using a MS platform for the web server,
don't install your web site on the "C" drive, make sure that you have a
"D" drive and install your site there - to many people fail to secure
their systems and it's a lot easier to secure if you have the web site
on the NON-OS drives.

--
--
spamfree999@.rrohio.com
(Remove 999 to reply to me)

Friday, March 23, 2012

NEED DIRECTION and suggestions!

I have a HUGE project and need some guidance.
I am trying to create a database for a local university movie club that allows users to input there basic personal information (name, address, telephone number) as well as movies in there collection. The movies will be categorized by genre (comedy, roman
ce, horror, etc.) and title. I want to be able to let the users add and remove movies to their list of movies they own, I'll call it "MOVIES I OWN".
The user will also need to be able to create a SECOND list of movies they would like to see, again they can choose by genre and title. They need to also be able to add and remove from this list also, i'll call it "MOVIES I WANT TO SEE".
The last part of the project will be to match the users of "movies i want to see" with "movies I own". It will be displayed on the local university website when the user logs in and will alert the user to the match. If there is a match at a later time,
maybe the user can be emailed? Also if there is a match, perhaps the two movies can be taken off record. I would need it to be able to handle a small amount of users now logged in at the same time , but would like for it to handle several hundred to thou
sand users logged on at the same time in the distant future with out performance problems.
I am not sure if sql server 2000 is the best or perhaps oracle. I am currently trying this on mySQL but currently lost in a forest of data. Any guidance suggestions will be greatly appreciated. I am pretty new to this so please be kind...
Most databases can do what you need, in terms of your database design. I
feel you should research more on the front-end, to address the 'several
hundred to thousand users' issue. A database can handle that load, given
the right hardware (and budget). But for cost and efficiency purposes, your
application layer should be capable of creating and managing a pool of
transactions so that connnections can be shared. It should also allow you
to specify the transaction isolation level to deal with concurrency issues.
Peter Yeoh
http://www.yohz.com
Need smaller backup files? Try MiniSQLBackup
"new_GUY" <new_GUY@.discussions.microsoft.com> wrote in message
news:51334783-729B-4E94-A7B8-D72E922DEAF4@.microsoft.com...
> I have a HUGE project and need some guidance.
> I am trying to create a database for a local university movie club that
allows users to input there basic personal information (name, address,
telephone number) as well as movies in there collection. The movies will be
categorized by genre (comedy, romance, horror, etc.) and title. I want to
be able to let the users add and remove movies to their list of movies they
own, I'll call it "MOVIES I OWN".
> The user will also need to be able to create a SECOND list of movies they
would like to see, again they can choose by genre and title. They need to
also be able to add and remove from this list also, i'll call it "MOVIES I
WANT TO SEE".
> The last part of the project will be to match the users of "movies i want
to see" with "movies I own". It will be displayed on the local university
website when the user logs in and will alert the user to the match. If
there is a match at a later time, maybe the user can be emailed? Also if
there is a match, perhaps the two movies can be taken off record. I would
need it to be able to handle a small amount of users now logged in at the
same time , but would like for it to handle several hundred to thousand
users logged on at the same time in the distant future with out performance
problems.
> I am not sure if sql server 2000 is the best or perhaps oracle. I am
currently trying this on mySQL but currently lost in a forest of data. Any
guidance suggestions will be greatly appreciated. I am pretty new to this
so please be kind...
>

NEED DIRECTION and suggestions!

I have a HUGE project and need some guidance.
I am trying to create a database for a local university movie club that allo
ws users to input there basic personal information (name, address, telephone
number) as well as movies in there collection. The movies will be categori
zed by genre (comedy, roman
ce, horror, etc.) and title. I want to be able to let the users add and rem
ove movies to their list of movies they own, I'll call it "MOVIES I OWN".
The user will also need to be able to create a SECOND list of movies they wo
uld like to see, again they can choose by genre and title. They need to als
o be able to add and remove from this list also, i'll call it "MOVIES I WANT
TO SEE".
The last part of the project will be to match the users of "movies i want to
see" with "movies I own". It will be displayed on the local university web
site when the user logs in and will alert the user to the match. If there i
s a match at a later time,
maybe the user can be emailed? Also if there is a match, perhaps the two mo
vies can be taken off record. I would need it to be able to handle a small a
mount of users now logged in at the same time , but would like for it to han
dle several hundred to thou
sand users logged on at the same time in the distant future with out perform
ance problems.
I am not sure if sql server 2000 is the best or perhaps oracle. I am curren
tly trying this on mysql but currently lost in a forest of data. Any guidanc
e suggestions will be greatly appreciated. I am pretty new to this so pleas
e be kind...Most databases can do what you need, in terms of your database design. I
feel you should research more on the front-end, to address the 'several
hundred to thousand users' issue. A database can handle that load, given
the right hardware (and budget). But for cost and efficiency purposes, your
application layer should be capable of creating and managing a pool of
transactions so that connnections can be shared. It should also allow you
to specify the transaction isolation level to deal with concurrency issues.
Peter Yeoh
http://www.yohz.com
Need smaller backup files? Try MiniSQLBackup
"new_GUY" <new_GUY@.discussions.microsoft.com> wrote in message
news:51334783-729B-4E94-A7B8-D72E922DEAF4@.microsoft.com...
> I have a HUGE project and need some guidance.
> I am trying to create a database for a local university movie club that
allows users to input there basic personal information (name, address,
telephone number) as well as movies in there collection. The movies will be
categorized by genre (comedy, romance, horror, etc.) and title. I want to
be able to let the users add and remove movies to their list of movies they
own, I'll call it "MOVIES I OWN".
> The user will also need to be able to create a SECOND list of movies they
would like to see, again they can choose by genre and title. They need to
also be able to add and remove from this list also, i'll call it "MOVIES I
WANT TO SEE".
> The last part of the project will be to match the users of "movies i want
to see" with "movies I own". It will be displayed on the local university
website when the user logs in and will alert the user to the match. If
there is a match at a later time, maybe the user can be emailed? Also if
there is a match, perhaps the two movies can be taken off record. I would
need it to be able to handle a small amount of users now logged in at the
same time , but would like for it to handle several hundred to thousand
users logged on at the same time in the distant future with out performance
problems.
> I am not sure if sql server 2000 is the best or perhaps oracle. I am
currently trying this on mysql but currently lost in a forest of data. Any
guidance suggestions will be greatly appreciated. I am pretty new to this
so please be kind...
>

NEED DIRECTION and suggestions!

I have a HUGE project and need some guidance.
I am trying to create a database for a local university movie club that allows users to input there basic personal information (name, address, telephone number) as well as movies in there collection. The movies will be categorized by genre (comedy, romance, horror, etc.) and title. I want to be able to let the users add and remove movies to their list of movies they own, I'll call it "MOVIES I OWN".
The user will also need to be able to create a SECOND list of movies they would like to see, again they can choose by genre and title. They need to also be able to add and remove from this list also, i'll call it "MOVIES I WANT TO SEE".
The last part of the project will be to match the users of "movies i want to see" with "movies I own". It will be displayed on the local university website when the user logs in and will alert the user to the match. If there is a match at a later time, maybe the user can be emailed? Also if there is a match, perhaps the two movies can be taken off record. I would need it to be able to handle a small amount of users now logged in at the same time , but would like for it to handle several hundred to thousand users logged on at the same time in the distant future with out performance problems.
I am not sure if sql server 2000 is the best or perhaps oracle. I am currently trying this on mySQL but currently lost in a forest of data. Any guidance suggestions will be greatly appreciated. I am pretty new to this so please be kind...Most databases can do what you need, in terms of your database design. I
feel you should research more on the front-end, to address the 'several
hundred to thousand users' issue. A database can handle that load, given
the right hardware (and budget). But for cost and efficiency purposes, your
application layer should be capable of creating and managing a pool of
transactions so that connnections can be shared. It should also allow you
to specify the transaction isolation level to deal with concurrency issues.
Peter Yeoh
http://www.yohz.com
Need smaller backup files? Try MiniSQLBackup
"new_GUY" <new_GUY@.discussions.microsoft.com> wrote in message
news:51334783-729B-4E94-A7B8-D72E922DEAF4@.microsoft.com...
> I have a HUGE project and need some guidance.
> I am trying to create a database for a local university movie club that
allows users to input there basic personal information (name, address,
telephone number) as well as movies in there collection. The movies will be
categorized by genre (comedy, romance, horror, etc.) and title. I want to
be able to let the users add and remove movies to their list of movies they
own, I'll call it "MOVIES I OWN".
> The user will also need to be able to create a SECOND list of movies they
would like to see, again they can choose by genre and title. They need to
also be able to add and remove from this list also, i'll call it "MOVIES I
WANT TO SEE".
> The last part of the project will be to match the users of "movies i want
to see" with "movies I own". It will be displayed on the local university
website when the user logs in and will alert the user to the match. If
there is a match at a later time, maybe the user can be emailed? Also if
there is a match, perhaps the two movies can be taken off record. I would
need it to be able to handle a small amount of users now logged in at the
same time , but would like for it to handle several hundred to thousand
users logged on at the same time in the distant future with out performance
problems.
> I am not sure if sql server 2000 is the best or perhaps oracle. I am
currently trying this on mySQL but currently lost in a forest of data. Any
guidance suggestions will be greatly appreciated. I am pretty new to this
so please be kind...
>sql

Monday, February 20, 2012

NB: query troubles

I'm making a movie site.

I have 3 tables: actors, movies, mov_act
mov_act is the link tables bacause of the many-to-many relationship.

i need to find the actors that aren't in a specified movie(id=2 for instance).

simple for you guys, hard for a newbie.

any help?

thanks.

btw: not subqueries usage please, because can't upgrade my isp's SQL version ;-)ah yes, good old mysql, no subqueries before version 4.1

select actors.name
from actors
left outer
join mov_act
on actors.id = mov_act.actorid
left outer
join movies
on mov_act.movieid = movies.id
and movies.name = 'ben hur'
group
by actors.name
having count(movies.name) = 0|||thanks you this worked

select mvs_actors.fname
from mvs_actors
left outer
join mvs_mov_act
on mvs_actors.id = mvs_mov_act.act_id
left outer
join mvs_movies
on mvs_mov_act.mov_id = mvs_movies.id
and mvs_movies.id = 1
group
by mvs_actors.fname
having count(mvs_movies.id) = 0

i now have all actors that aren't in movie with id=1

stupid question, but how do i get the once that are in that movie with id=1??

thank you very much|||how do i get the ones that are in that movie with id=1??

easy -- change the left outer joins to inner, and drop the GROUP BY and HAVING clauses

:cool:|||by the way, if you already (somehow) know what the id of the desired movie is, there's no need to join from the mvs_mov_act to the mvs_movies table

actors in the movie id=1 --

select mvs_actors.fname
from mvs_actors
inner
join mvs_mov_act
on mvs_actors.id = mvs_mov_act.act_id
and mvs_mov_act.mov_id = 1|||Thanks very much.

These are the two Queries that work.
The first one seems a bit long(in comparison to the second), but it works ;)

$query = "select mvs_actors.fname,mvs_actors.lname,mvs_actors.id ";
$query .= "from mvs_actors ";
$query .= "left outer ";
$query .= "join mvs_mov_act ";
$query .= "on mvs_actors.id = mvs_mov_act.act_id ";
$query .= "left outer ";
$query .= "join mvs_movies ";
$query .= "on mvs_mov_act.mov_id = mvs_movies.id ";
$query .= "and mvs_movies.id = ".$recordID." ";
$query .= "group by mvs_actors.fname ";
$query .= "having count(mvs_movies.id) = 0 ";

$query = "select mvs_actors.fname,mvs_actors.lname,mvs_actors.id ";
$query .= "from mvs_actors ";
$query .= "inner ";
$query .= "join mvs_mov_act ";
$query .= "on mvs_actors.id = mvs_mov_act.act_id ";
$query .= "and mvs_mov_act.mov_id = ".$recordID." ";