
tekcap
Members-
Posts
24 -
Joined
-
Last visited
Everything posted by tekcap
-
Hello, I have a few more questions about my digital MP3 Shop's Tables, located here. http://img156.imageshack.us/my.php?image=erdom0.jpg First of all, in my Purchase Table I Have a Column called E-Mail. Whenever a user makes a purchase certain information(E-Mail) is recorded in the Purchase Table. Now do I really need an E-Mail Column In the purchase Table? Or can The E-Mail be fetched From The User Table Directly since User ID is a foreign key In the Purchase Table? If this is possible is it dangerous? Can It cause Data Redundencies? Basically what im scared of is down the road when a User changes E-mail or Adress, or I change a song price, the records wont show the OLD E-Mail Or Price but the new UPDATED one. This is BAD because at the time the song might have been cheaper. Does anyone follow what I mean here?
-
Hello Im building a fairly complex MP3 shop which consists of way to many scripts to memorise. I was wondering if there is maybe any programs out there that help organise a PHP project. If such a thing doesnt exist, then atleast a guideline to follow for large projects.
-
Your right... I can just pull it from the User since User ID is already a foreign key.
-
I figured the E-Mail will Change in every table that uses it as a foreign key. Basically the way I see it is if a user changes his E-Mail then it will change all records of his E-Mail in all the tables that use it as a foreign key. Does it only apply to new records added? Or does it do that AND go change all records in the database contaning the Old Email?
-
Gonna do a bit of research on the ENUM data type. My problem with E-Mail being foreign key is that if a user changes his Email then it will change in the purchase history. Is there a way to avoid that?
-
Was looking at my tables today and was wondering if maybe I should remove the E-Mail attribute from Purchase since its already in the User Table. If I do this will I still be able to additionally display the E-mail everytime I query up a list of purchases for viewing? Im also having trouble figuring what would be the optimum data type for my Available status and access level attributes. Basically I only need ON/OFF and 1 for Admin and 0 for User. Also wondering how long I should make my file references.
-
http://img99.imageshack.us/my.php?image=erdxs7.jpg This is my new ERD let me know what you think
-
I mean granting users different access levels which wouls basically be 1 or 0. 0 for normal users and 1 for administrator.
-
Fenway I have an administrator table which contains a username and password. Should I just get rid of the table and put access levels in the user table? If it will improve speed and make code easier to read ill change it.
-
I was told to get rid of my admin table and just put access levels in the user table. Will this improve coding readability and speed up database access?
-
Ive never heard the term denormalized table what is that? I was thinking of also using a php include DEFINE file that lists all the Countries and the currencies associated with it. I also just thought of something. My artist and song relationship is a many to many because a song may have many artists and an artist may have many songs. Should I create a table called artist_songs?
-
Ok so I will apply an activity field to the neccesary tables. Thanks ! I was also wondering how should I relate my review table to my song table? Also wondering if my users are choosing country and province does that mean I need tables for Countries and Provinces?
-
here is a link to my ERD. http://img185.imageshack.us/my.php?image=erdao9.jpg Am I missing anything here? Should I be connecting these relationships any more? Im also wondering if I should put a on off status on tables such as song so if delete a song im not breaking referential integrity to l the purchase items. Is this a good way to approach this? Any links to tutorials that I might find appropriate would be appreciated as well.
-
How would I do that? Im also wondering if I should create a column in user called Logged_in_status or if I should make a whole other table called Logged_in.
-
Hello Im creating a ERD for my Database and am having some problems. First of all my Database which is for an Mp3 shop has the following Entities so far. Customer , Administrator , Purchase , Cart , News , Currency , Label , Artist , Song , Genre , Review. My problem right now is if im keeping referential integrity inbetween my tables and I delete a song then im also deleting any Purchases in my Purchase Table that contain that song. This is a bad idea because I always have to keep track of sales even if I delete a particular song. What is a safe method for creating such a database.
-
Im still a bit confused. The top ten list will be the same on every page EXCEPT for the actual genre related pages. If I click on a certain genre and any page related to it my top ten list will reflect that genre. Where would I get the genre id from and what would be the genre id if im not looking at a specific genre page.
-
hello main_page.php • Display News in downwards fashion • The right_menu.php will run an if statement and if it matches the main_page.php it will display top 10 songs from all genres. The right_menu.php is my right menu bar which always displays a top 10 list It always changes depends which genre im browsing My question is how would I run a check? Do I make a huge if else statement which tests every page on mywebsite and displays the appropriate top ten list?
-
I have this so far. Would it be better put Artist, Label, Genre in there own table? <?php mysql_connect("localhost", "username", "password") or die(mysql_error()); echo "Connected to The Vault<br />"; mysql_select_db("database") or die(mysql_error()); echo "Connected to The Vault Database"; mysql_query("CREATE TABLE song( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), genre VARCHAR(20), title varchar(50), artist varchar(30), label varchar(40) sample_file_reference varchar(80), full_file_reference varchar(80), image_reference varchar(80), sold_count int(6), reviews or die(mysql_error()); echo "Table Created!"; mysql_query("CREATE TABLE transaction( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), music_id) int(12), purchase_date date, username varchar(15), or die(mysql_error()); echo "Table Created!"; mysql_query("CREATE TABLE users( id INT NOT NULL AUTO_INCREMENT, username varchar(15), password varchar(20), first_name varchar(20), last_name varchar(20), address varchar(64), city varchar(32), province varchar(32), country varchar(32), postalcode varchar(32), phone varchar(32), email varchar(40), or die(mysql_error()); echo "Table Created!"; mysql_query("CREATE TABLE administrator( username varchar(15), password varchar(20), or die(mysql_error()); echo "Table Created!"; ?>
-
If by Database structure you mean my tables well I can have something done in a few days.
-
Hello, im trying to figure out how to display my dynamically loaded products from a mysqldatabase. This site displays the products in the fashion that im looking for. http://www.phonicarecords.co.uk/genre.aspx?CatID=3 What is neccerary for accomplishing something like this? Does it go beyond php? requiring work in photoshop before hand?
-
Hello, this my second post regarding the mp3 shop im trying to set up. My question is about registration information. During the sign up for my site should I be asking the information for credit card transactions.. Adress,Phone#,credit card. OR do the customers enter that information on a special form created by the bank who handles the transactions? Can anyone recommend some articles or transaction handlers that would be good in my situation? Thank You.
-
The style of music im selling is not found on Itunes. The market and situation is perfect at the moment for what im doing. Ill be putting a lot of effort into this site, including security and possibly hiring a hacking team to test the site. If I wanted to do this song reference trick which part or tutorial of PHP should I read?
-
Elis, my plan is to contact the labels and have them sign some sort of contract consenting me to sell the songs. This would be enough or are there other legal issues. Simcoweb if I upload the file through a form it will be as good as ftp. How would I go about storing this path or link to the song. Ill be using a form to upload the information for each song.
-
Hello everyone im building an mp3 shop and I have a question that has been on my mind for a while. On the server I will have a folder for each record label I am selling for. And all songs will be FTP'ed to the appropriate folder. I read that it isnt good to store songs in a MYSQL database and that its better to upload them in a folder by FTP. So my question is.. When I create a new MP3 for sale how would I attach it to a particular song file if its not in the database? Ill have a table with Title, Label Name, Release Date, Reviews, Genre but I wont have an entry for the actual mp3 file. How would I go about getting this system to work together?